question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Puppeteer broken on Ubuntu 18.04 after upgrade & restart

See original GitHub issue

The exact same setup worked a few hours ago. I’ve ran apt-get full-upgrade and it fails to run anymore. Not sure what exactly it is related to. Running in docker from latest.

Update: I was able to reproduce this on another Ubuntu 18.04 with the same kernel version. It worked fine with Linux kernel 4.15! This means that this might be a problem with chrome itself, not puppeteer - please confirm.

Update: Works fine with 5.0.0-25-generic but fails on 5.0.0-27-generic.

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: docker image buildkite/puppeteer:23a2e145eb22
  • Platform / OS version: Ubuntu 18.04.03, Linux 5.0.0-27-generic #28~18.04.1-Ubuntu SMP
  • Node.js version: v10.15.3 (bundled in the docker image)
const puppeteer = require('puppeteer');
puppeteer.launch({
  args: [
    '--disable-setuid-sandbox',
    '--no-sandbox',
    '--disable-dev-shm-usage',
  ],
})
  .then(async browser => {
    const page = await browser.newPage();
    await page.goto('https://example.com');
    // await page.screenshot({ path: '/app/screenshot.png' });
    // await browser.close();
  })
  .catch(e => {
    console.log(e);
  });

$ docker run -it -v $(pwd):/app -u node -w /app buildkite/puppeteer node test.js
Error: Navigation failed because browser has disconnected!
    at CDPSession.LifecycleWatcher._eventListeners.helper.addEventListener (/node_modules/puppeteer/lib/LifecycleWatcher.js:46:107)
    at CDPSession.emit (events.js:189:13)
    at CDPSession._onClosed (/node_modules/puppeteer/lib/Connection.js:215:10)
    at Connection._onClose (/node_modules/puppeteer/lib/Connection.js:138:15)
    at WebSocketTransport._ws.addEventListener.event (/node_modules/puppeteer/lib/WebSocketTransport.js:45:22)
    at WebSocket.onClose (/node_modules/ws/lib/event-target.js:124:16)
    at WebSocket.emit (events.js:189:13)
    at WebSocket.emitClose (/node_modules/ws/lib/websocket.js:191:10)
    at Socket.socketOnClose (/node_modules/ws/lib/websocket.js:850:15)
    at Socket.emit (events.js:189:13)
  -- ASYNC --
    at Frame.<anonymous> (/node_modules/puppeteer/lib/helper.js:110:27)
    at Page.goto (/node_modules/puppeteer/lib/Page.js:629:49)
    at Page.<anonymous> (/node_modules/puppeteer/lib/helper.js:111:23)
    at puppeteer.launch.then (/app/test.js:12:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)

$ uname -a
Linux cascara 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic

$ docker -v
Docker version 19.03.2, build 6a30dfc

$ docker image ls | grep puppeteer
buildkite/puppeteer   latest              23a2e145eb22        4 months ago        830MB

$ docker run -it -v $(pwd):/app -u node -w /app buildkite/puppeteer node -v     
v10.15.3

The same script (same flags) worked before the upgrade & reboot.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:13

github_iconTop GitHub Comments

8reactions
mikk351commented, Sep 24, 2019

puppeteer.launch({ args: [ '--single-process' ]} Seems to fix the issue for me, running ubuntu 5.0.0-27-generic

0reactions
stale[bot]commented, Jul 27, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Puppeteer broken on Ubuntu 18.04 after upgrade & restart
Update : I was able to reproduce this on another Ubuntu 18.04 with the same kernel version. It worked fine with Linux kernel...
Read more >
Puppeteer install fails on Ubuntu 18.04 LTS - Stack Overflow
I am trying to install puppeteer on a VPS hosted by Linode (Ubuntu 18.04 LTS). I run npm install puppeteer and run into...
Read more >
How to Install and Configure Puppeteer on Ubuntu 18.04 LTS
In this post we are going to learn how to install and configure Puppeteer on top of Ubuntu 18.04 LTS by following few...
Read more >
linux - Kde Plasma Task Manager is Broken after an update in ...
Just update again and the problem should be solved. ... Try to update your package using this command pkcon update.
Read more >
Ubuntu upgrade to 20.04 broken by sudden restart of system
I wrote the following commands. sudo apt update && sudo apt upgrade sudo do-release-upgrade -d. The second command downloaded the packages of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found