Skip to content

failed to launch chrome in heroku #141

@abbrechen

Description

@abbrechen

When I include "vue-cli-plugin-prerender-spa" into my dependencies and I deploy my app to heroku I get a puppeteer error. But I only get it with your vue plugin. My project already uses puppeteer and I already included the buildpack. I have no idea why it only happens to "vue-cli-plugin-prerender-spa".
This is the full error I get in the heroku console:

-  Building for production...
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Error: Failed to launch chrome!
/tmp/build_a7b338b0_/node_modules/puppeteer/.local-chromium/linux-650583/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
    at onClose (/tmp/build_a7b338b0_/node_modules/puppeteer/lib/Launcher.js:342:14)
    at Interface.helper.addEventListener (/tmp/build_a7b338b0_/node_modules/puppeteer/lib/Launcher.js:331:50)
    at Interface.emit (events.js:203:15)
    at Interface.close (readline.js:397:8)
    at Socket.onend (readline.js:173:10)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[Prerenderer - PuppeteerRenderer] Unable to start Puppeteer
(node:1285) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of null
    at PuppeteerRenderer.destroy (/tmp/build_a7b338b0_/node_modules/@prerenderer/renderer-puppeteer/es6/renderer.js:140:21)
    at Prerenderer.destroy (/tmp/build_a7b338b0_/node_modules/@prerenderer/prerenderer/es6/index.js:87:20)
    at PrerendererInstance.initialize.then.then.then.then.then.then.then.then.catch.err (/tmp/build_a7b338b0_/node_modules/prerender-spa-plugin/es6/index.js:144:29)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1285) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1285) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
-----> Timed out running buildpack Node.js
Terminated
 !     Push failed

Versions
node version in heroku: v10.22.1
"vue-cli-plugin-prerender-spa": "^1.1.6"
"vue": "^2.6.10"
vue CLI: 3.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions