Puppeteer and getting a Chrome version error

I’m trying to deploy a library with puppeteer and getting a Chrome version error. Any Ideas on how to fix it?

I have npx puppeteer browsers install chrome in a post install

Instance is healthy. All health checks are passing.
Error: Could not find Chrome (ver. 126.0.6478.63). This can occur if either
 1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or
 2. your cache path is incorrectly configured (which is: /app/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
    at ChromeLauncher.resolveExecutablePath (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:295:27)
    at ChromeLauncher.executablePath (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:209:25)
    at ChromeLauncher.computeLaunchArguments (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:89:37)
    at async ChromeLauncher.launch (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:70:28)
    at async Promise.all (index 0)
    at async initBrowserAndServer (/workspace/node_modules/@revideo/renderer/lib/server/render-video.js:33:31)
    at async initializeBrowserAndStartRendering (/workspace/node_modules/@revideo/renderer/lib/server/render-video.js:132:47)
    at async Promise.all (index 0)
    at async renderVideo (/workspace/node_modules/@revideo/renderer/lib/server/render-video.js:207:5)
    at async renderWithCallback (/workspace/node_modules/@revideo/cli/dist/server/render.js:29:9)
Error: Could not find Chrome (ver. 126.0.6478.63). This can occur if either
 1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or
 2. your cache path is incorrectly configured (which is: /app/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
    at ChromeLauncher.resolveExecutablePath (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:295:27)
    at ChromeLauncher.executablePath (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:209:25)
    at ChromeLauncher.computeLaunchArguments (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:89:37)
    at async ChromeLauncher.launch (/workspace/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:70:28)
    at async Promise.all (index 0)
    at async initBrowserAndServer (/workspace/node_modules/@revideo/renderer/lib/server/render-video.js:33:31)
    at async initializeBrowserAndStartRendering (/workspace/node_modules/@revideo/renderer/lib/server/render-video.js:132:47)
    at async Promise.all (index 0)
    at async renderVideo (/workspace/node_modules/@revideo/renderer/lib/server/render-video.js:207:5)
    at async renderWithCallback (/workspace/node_modules/@revideo/cli/dist/server/render.js:29:9)

Hi @Chop_Wood,

What kind of “post install” do you mean? Are you sure it was executed?

Package.json "postinstall": "npx puppeteer browsers install chrome"

I installed through the console.
Customize your command, then hit `return` to run. $ /bin/sh $ cd /app/.cache/puppeteer && ls /bin/sh: 1: cd: can't cd to /app/.cache/puppeteer $ npx puppeteer browsers install chrome Downloading chrome 126.0.6478.63 - 160.1 MB [====================] 100% 0.0s chrome@126.0.6478.63 /app/.cache/puppeteer/chrome/linux-126.0.6478.63/chrome-linux64/chrome $ cd /app/.cache/puppeteer && ls chrome $ cd /app/.cache/puppeteer && ls chrome $

New Error:

TROUBLESHOOTING: https://pptr.dev/troubleshooting
    at Interface.onClose (/workspace/node_modules/@puppeteer/browsers/lib/cjs/launch.js:310:24)
    at Interface.emit (node:events:526:35)
    at Interface.close (node:internal/readline/interface:527:10)
    at Socket.onend (node:internal/readline/interface:253:10)
    at Socket.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1589:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Port 9000 is in use, trying another one...
Port 9001 is in use, trying another one...
Error: Failed to launch the browser process!
/app/.cache/puppeteer/chrome/linux-126.0.6478.63/chrome-linux64/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory```

Hey @Chop_Wood,

It seems you are missing some dependencies. The error message

Error: Failed to launch the browser process!
/app/.cache/puppeteer/chrome/linux-126.0.6478.63/chrome-linux64/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory

means that you are missing libatk in the container. How are you trying to build the app with buildpack? Mind sharing some more details?