General error on live environment Laravel #93
Replies: 2 comments 1 reply
-
I have the same error on live server |
Beta Was this translation helpful? Give feedback.
-
Facing a similar issue here. I have puppeteer installed and the
This still resulted in the same error. I then tried solution 2 This time the error changed to : I tried ldd again an no packages were reported as missing, the cache dir has been set correctly and I am none the wiser how to solve this. Anybody else mayby having the sam issue or have been able to fix it? Is this a permission or a configuration/installation issue? |
Beta Was this translation helpful? Give feedback.
-
When running this local, it works perfect (converting tailwind css to pdf). On live environment (Linux, OS Debian buster 10) it gives an error.
I tried adjusting the NPM (which npm = /usr/bin/npm) and node (which node = /usr/bin/node) paths. This gives the same error.
Code:
return pdf()->view('quote_pdf', ['quoteData' => $quoteData, 'productRows' => $productRows, 'billingAddress' => $currentBillingAddress, 'endDate' => $endDate, 'vat' => $vat]) ->withBrowsershot(function (Browsershot $browsershot) { $browsershot->newHeadless()->setIncludePath('$PATH:/usr/bin'); }) ->name('#'.$quote->id.' - '.$quote->customer->company_name.' - '.$quote->customer->last_name);
Error:
The command "PATH=$PATH:/usr/bin NODE_PATH=
npm root -g` node '/data/web/apps/quotes.maxiaxi.com/releases/87/vendor/spatie/browsershot/src/../bin/browser.cjs' '{"url":"file:///tmp/1932751629-0168181001709298436/index.html","action":"pdf","options":{"args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":false,"newHeadless":true,"printBackground":true}}'" failed.Exit Code: 1(General error)
Working directory: /data/web/apps/quotes.maxiaxi.com/releases/87/public
Output:
Error Output:
npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead.Error: Failed to launch the browser process!
/data/web/.cache/puppeteer/chrome/linux-122.0.6261.69/chrome-linux64/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at Interface.onClose (/data/web/apps/quotes.maxiaxi.com/releases/87/node_modules/@puppeteer/browsers/lib/cjs/launch.js:267:24)
at Interface.emit (node:events:539:35)
at Interface.close (node:internal/readline/interface:535:10)
at Socket.onend (node:internal/readline/interface:261:10)
at Socket.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1344:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)`
Does anyone know a solution for this? thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions