jontewks/puppeteer-heroku-buildpack

Error: Could not find Chrome (ver. 119.0.6045.105)

areeburrub opened this issue · 2 comments

It was working earlier but now when I have upgraded the puppeteer version to latest it stopped working.

I have also followed the clear build cache guide and that also didn't helped.

023-11-04T04:16:49.697621+00:00 app[web.1]:   Puppeteer old Headless deprecation warning:�[0m�[33m

2023-11-04T04:16:49.697621+00:00 app[web.1]:     In the near future `headless: true` will default to the new Headless mode

2023-11-04T04:16:49.697622+00:00 app[web.1]:     for Chrome instead of the old Headless implementation. For more

2023-11-04T04:16:49.697622+00:00 app[web.1]:     information, please see https://developer.chrome.com/articles/new-headless/.

2023-11-04T04:16:49.697622+00:00 app[web.1]:     Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`

2023-11-04T04:16:49.697623+00:00 app[web.1]:     If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.�[0m

2023-11-04T04:16:49.697623+00:00 app[web.1]: 

2023-11-04T04:16:49.700570+00:00 app[web.1]: /app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:298

2023-11-04T04:16:49.700571+00:00 app[web.1]:                     throw new Error(`Could not find Chrome (ver. ${this.puppeteer.browserRevision}). This can occur if either\n` +

2023-11-04T04:16:49.700571+00:00 app[web.1]:                           ^

2023-11-04T04:16:49.700571+00:00 app[web.1]: 

2023-11-04T04:16:49.700572+00:00 app[web.1]: Error: Could not find Chrome (ver. 119.0.6045.105). This can occur if either

2023-11-04T04:16:49.700572+00:00 app[web.1]:  1. you did not perform an installation before running the script (e.g. `npm install`) or

2023-11-04T04:16:49.700572+00:00 app[web.1]:  2. your cache path is incorrectly configured (which is: /app/.cache/puppeteer).

2023-11-04T04:16:49.700573+00:00 app[web.1]: For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.

2023-11-04T04:16:49.700573+00:00 app[web.1]:     at ChromeLauncher.resolveExecutablePath (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:298:27)

2023-11-04T04:16:49.700573+00:00 app[web.1]:     at ChromeLauncher.executablePath (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:204:25)

2023-11-04T04:16:49.700573+00:00 app[web.1]:     at ChromeLauncher.computeLaunchArguments (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:97:37)

2023-11-04T04:16:49.700574+00:00 app[web.1]:     at async ChromeLauncher.launch (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:79:28)

2023-11-04T04:16:49.700574+00:00 app[web.1]:     at async /app/app.js:33:23

Packages

{
  "name": "project",
  "version": "1.0.0",
  "scripts": {
    "start": "node app.js"
  },
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "express": "^4.18.2",
    "nodemon": "^3.0.1",
    "puppeteer": "^21.5.0",
    "puppeteer-screen-recorder": "^2.1.2"
  }
}

Hello sorry for long delay. Hope you got this working in the mean time though. This build pack only installs certain Linux packages so that chromium can run correctly on heroku, but doesn’t install chromium or puppeteer itself, which is where your issue lies.