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.

Recommended Docker configuration stopped working, resulting in failure to launch due to no usable sandbox

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 3.2.0
  • Platform / OS version: Docker node:12.16.1 image
  • URLs (if applicable):
  • Node.js version: 12.16.1

What steps will reproduce the problem?

Please include code that reproduces the issue.

My Dockerfile includes the following:

RUN npm ci \
    && groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
    && mkdir -p /home/pptruser/Downloads \
    && chown -R pptruser:pptruser /home/pptruser \
    && chown -R pptruser:pptruser /app

This was working until recently, but after I rebuilt the Docker image today without changing any dependencies or Dockerfile contents, then I call puppeteer.launch() in my JS code

What is the expected result?

Browser launches

What happens instead?

Error: Failed to launch the browser process!
[1009/032320.966900:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
#0 0x55b47b44a399 base::debug::CollectStackTrace()
#1 0x55b47b3ab2a3 base::debug::StackTrace::StackTrace()
#2 0x55b47b3bcc95 logging::LogMessage::~LogMessage()
#3 0x55b47cc9940e service_manager::ZygoteHostImpl::Init()
#4 0x55b47af75060 content::ContentMainRunnerImpl::Initialize()
#5 0x55b47afd65e7 service_manager::Main()
#6 0x55b47af73631 content::ContentMain()
#7 0x55b47afd580d headless::(anonymous namespace)::RunContentMain()
#8 0x55b47afd550c headless::HeadlessShellMain()
#9 0x55b4789c95a7 ChromeMain
#10 0x7f10185b62e1 __libc_start_main
#11 0x55b4789c93ea _start

Received signal 6
#0 0x55b47b44a399 base::debug::CollectStackTrace()
#1 0x55b47b3ab2a3 base::debug::StackTrace::StackTrace()
#2 0x55b47b449f35 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f101eb600e0 (/lib/x86_64-linux-gnu/libpthread-2.24.so+0x110df)
#4 0x7f10185c8fff gsignal
#5 0x7f10185ca42a abort
#6 0x55b47b448e95 base::debug::BreakDebugger()
#7 0x55b47b3bd132 logging::LogMessage::~LogMessage()
#8 0x55b47cc9940e service_manager::ZygoteHostImpl::Init()
#9 0x55b47af75060 content::ContentMainRunnerImpl::Initialize()
#10 0x55b47afd65e7 service_manager::Main()
#11 0x55b47af73631 content::ContentMain()
#12 0x55b47afd580d headless::(anonymous namespace)::RunContentMain()
#13 0x55b47afd550c headless::HeadlessShellMain()
#14 0x55b4789c95a7 ChromeMain
#15 0x7f10185b62e1 __libc_start_main
#16 0x55b4789c93ea _start
  r8: 0000000000000000  r9: 00007ffd53951040 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffd539522f8 r13: 00007ffd539512d0 r14: 00007ffd53952300 r15: aaaaaaaaaaaaaaaa
  di: 0000000000000002  si: 00007ffd53951040  bp: 00007ffd53951280  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007f10185c8fff  sp: 00007ffd539510b8
  ip: 00007f10185c8fff efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:181:20)
    at Interface.<anonymous> (/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:171:65)
    at Interface.emit (events.js:323:22)
    at Interface.close (readline.js:409:8)
    at Socket.onend (readline.js:187:10)
    at Socket.emit (events.js:323:22)
    at endReadableNT (_stream_readable.js:1204:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

Is there something that changed in the version of Chrome that Puppeteer downloads that could be causing this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
richardkazuomillercommented, Oct 9, 2020

I’m going to add --no-sandbox as a temporary workaround for this, since I’m not running any third party code, but it would be a lot better if I could get it working the way it was before.

0reactions
stale[bot]commented, Jul 25, 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

Node.js + Puppeteer on Docker, No usable sandbox
I tried looking at puppeteer troubleshooting page as suggested, but i didn't found any solution. Any suggestions? node.js · docker · google- ...
Read more >
Workarounds for common problems - Docker Documentation
Workarounds for common problems. Reboot . Restart your PC to stop / discard any vestige of the daemon running from the previously...
Read more >
I've tried everything and I can't get chromium headless to run ...
Error: Failed to launch chrome! [25:25:1026/212518.536212:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see ...
Read more >
No usable sandbox with non root user - jsreport forum
Hello, I have a jsreport server running on debian 10 with PM2. The server is runned by a specific user (not root).
Read more >
Chrome Headless doesn't launch on Debian · Issue #290
Running this example code from the README: const puppeteer = require('puppeteer'); (async() => { const browser = await puppeteer.launch(); ...
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