The puppeteer is working on local machine, PDF is also being generated but is giving error could not found chromeon render

Nov 13 12:11:19 AM ==> Uploading build…
Nov 13 12:11:31 AM ==> Deploying…
Nov 13 12:11:29 AM ==> Build uploaded in 9s
Nov 13 12:11:29 AM ==> Build successful :tada:
Nov 13 12:11:56 AM ==> Detected service running on port 10000
Nov 13 12:11:56 AM ==> Docs on specifying a port
Nov 13 12:12:04 AM ==> Using Node version 18.18.0 via environment variable NODE_VERSION
Nov 13 12:12:04 AM ==> Docs on specifying a Node version:
Nov 13 12:12:04 AM ==> Running ‘node app.js’
Nov 13 12:12:09 AM Warning: connect.session() MemoryStore is not
Nov 13 12:12:09 AM designed for a production environment, as it will leak
Nov 13 12:12:09 AM memory, and will not scale past a single process.
Nov 13 12:12:14 AM Server is running on
Nov 13 12:12:17 AM Connected to MongoDB
Nov 13 12:12:21 AM Your service is live :tada:
Nov 13 12:22:27 AM
Nov 13 12:22:27 AM Puppeteer old Headless deprecation warning:
Nov 13 12:22:27 AM In the near future headless: true will default to the new Headless mode
Nov 13 12:22:27 AM for Chrome instead of the old Headless implementation. For more
Nov 13 12:22:27 AM information, please see
Nov 13 12:22:27 AM Consider opting in early by passing headless: "new" to puppeteer.launch()
Nov 13 12:22:27 AM If you encounter any bugs, please report them to
Nov 13 12:22:27 AM
Nov 13 12:22:27 AM Error: Could not find Chrome (ver. 119.0.6045.105). This can occur if either
Nov 13 12:22:27 AM 1. you did not perform an installation before running the script (e.g. npm install) or
Nov 13 12:22:27 AM 2. your cache path is incorrectly configured (which is: /opt/render/.cache/puppeteer).
Nov 13 12:22:27 AM For (2), check out our guide on configuring puppeteer at

Configuration | Puppeteer.
Nov 13 12:22:27 AM at ChromeLauncher.resolveExecutablePath (/opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:286:27)
Nov 13 12:22:27 AM at ChromeLauncher.executablePath (/opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:204:25)
Nov 13 12:22:27 AM at ChromeLauncher.computeLaunchArguments (/opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:97:37)
Nov 13 12:22:27 AM at async ChromeLauncher.launch (/opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:79:28)
Nov 13 12:22:27 AM at async getreportPDF (/opt/render/project/src/backend/controllers/userController.js:672:21)

Did you find a solution?

Hi there,

Were you setting the PUPPETEER_CACHE_DIR as part of your services config? Looks like you set it to /opt/render/.cache/puppeteer? One thing you need to be careful with is if you set this after you run your first build, npm install of the Puppeteer module, Chrome will have been installed in a different location. Subsequent builds after this will not have reinstalled the Puppeteer node module and thus not installed Chrome to the correct location.

I would try running a manual deployment without build cache, which would reinstall all your node modules and put Chrome in the correct PUPPETEER_CACHE_DIR location.

Regards,

Keith
Render Support, UTC+10 :australia:

my problem is solve after using docker

Could you send me your docker file?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.