Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF export error for chart and HTM amchart5 #12235

Closed
singhvibhuti2 opened this issue Apr 8, 2024 · 1 comment
Closed

PDF export error for chart and HTM amchart5 #12235

singhvibhuti2 opened this issue Apr 8, 2024 · 1 comment

Comments

@singhvibhuti2
Copy link

I am exporting the PDF using below code and facing error.

Browsershot::url('http://127.0.0.1:8000/ahip')->format('A2')->save('NationalReport1.pdf');

$file = public_path('NationalReport1.pdf');
$headers = ['Content-Type: application/pdf'];
$updateNewPdfName = 'NationalReport'.time().'.pdf';


return response()->download($file, $updateNewPdfName, $headers);

-> This view has a normal HTML and some amchart5 pie/donut charts. and throwing the below error. could you please help me to resolve this

Symfony\Component\Process\Exception\ProcessFailedException
The command "node ^"C:^\Laravel Projects^\morningconsult^\vendor^\spatie^\browsershot^\src/../bin/browser.js^" ^"^{^^"url^^":^^"http:^/^/127.0.0.1:8000^/ahip^^",^^"action^^":^^"pdf^^",^^"options^^":^{^^"path^^":^^"NationalReport1.pdf^^",^^"args^^":^[^],^^"viewport^^":^{^^"width^^":800,^^"height^^":600^},^^"format^^":^^"A2^^"^}^}^"" failed. Exit Code: 1(General error) Working directory: C:\Laravel Projects\morningconsult\public Output: ================ Error Output: ================ �[1m�[43m�[30m Puppeteer old Headless deprecation warning:�[0m�[33m In the near future headless: true will default to the new Headless mode for Chrome instead of the old Headless implementation. For more information, please see https://developer.chrome.com/articles/new-headless/. Consider opting in early by passing headless: "new" to puppeteer.launch() If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.�[0m TimeoutError: Navigation timeout of 30000 ms exceeded at new Deferred (C:\Laravel Projects\morningconsult\node_modules\puppeteer-core\lib\cjs\puppeteer\util\Deferred.js:54:34) at Deferred.create (C:\Laravel Projects\morningconsult\node_modules\puppeteer-core\lib\cjs\puppeteer\util\Deferred.js:16:16) at new LifecycleWatcher (C:\Laravel Projects\morningconsult\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\LifecycleWatcher.js:65:60) at CdpFrame.goto (C:\Laravel Projects\morningconsult\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\Frame.js:135:29) at CdpFrame. (C:\Laravel Projects\morningconsult\node_modules\puppeteer-core\lib\cjs\puppeteer\util\decorators.js:98:27) at CdpPage.goto (C:\Laravel Projects\morningconsult\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Page.js:603:43) at callChrome (C:\Laravel Projects\morningconsult\vendor\spatie\browsershot\bin\browser.js:171:20) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ERROR: The process "11732

@OrKoN
Copy link
Collaborator

OrKoN commented Apr 8, 2024

Please report the issue to https://github.com/spatie/browsershot The issue indicates that the navigation timed out which likely indicates that the site is slow to load or unaccessible.

@OrKoN OrKoN closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants