spatie/pdf not work on production #204
Unanswered
Darnes1958
asked this question in
Q&A
Replies: 1 comment
-
I had the exact same issue. Worked on local, not in production. After more than a day of scouring and trying to fix the error, I found this article which mentioned using noSandbox() on browsershot to avoid errors. This is recommended only if you absolutely trust the source or made it yourself. Here is a snippet from my controller, it now works in prod.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I install spatie/pdf and puppeteer , it work well in local but when deployment to server it is not work.
fisrt error about chaching
as I search I had create .puppeteerrc.cjs and add this content :
const {join} = require('path');
/**
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
the error is disapeare but another error is rise after take log period of process:
Page.printToPDF timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed. at <instance_members_initializer>
the server is windows serve with Plesk panel
Beta Was this translation helpful? Give feedback.
All reactions