I am facing error on server #615
Replies: 2 comments
-
It seems that you have to install the needed dependencies on your server. |
Beta Was this translation helpful? Give feedback.
-
I am exporting the PDF using below code and facing error.
-> 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 |
Beta Was this translation helpful? Give feedback.
-
I am implementing pdf download functionality of browsershot. It was working fine on my local but when I upload it on server it is showing me error kindly guide how I can resolve them all
error
Symfony\Component\Process\Exception\ProcessFailedException
The command "PATH=$PATH:/usr/local/bin NODE_PATH=
npm root -g
node '/home/staging/public_html/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:///tmp/1782316692-0224693001647935241/index.html","action":"pdf","options":{"path":"/home/staging/public_html/storage/file.pdf","args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":false,"margin":{"top":"60px","right":"50px","bottom":"1px","left":"40px"}}}'" failed. Exit Code: 1(General error) Working directory: /home/staging/public_html/en Output: ================ Error Output: ================ Error: Failed to launch the browser process! /home/staging/public_html/node_modules/puppeteer/.local-chromium/linux-970485/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md at onClose (/home/staging/public_html/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:237:20) at Interface. (/home/staging/public_html/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:227:68) at Interface.emit (events.js:412:35) at Interface.close (readline.js:530:8) at Socket.onend (readline.js:254:10) at Socket.emit (events.js:412:35) at endReadableNT (internal/streams/readable.js:1334:12) at processTicksAndRejections (internal/process/task_queues.js:82:21)my code:
$invoice = Browsershot::html(view('wallet.orderInvoiceDownloadArticlePurchase')
->with('_orderDetails', $_orderDetails)->render())
->margins('60', '50', '1', '40', 'px')->save(storage_path('file.pdf'));
Beta Was this translation helpful? Give feedback.
All reactions