screenshot icon indicating copy to clipboard operation
screenshot copied to clipboard

Crash without `--no-sandbox` on docker

Open captn3m0 opened this issue 3 years ago • 0 comments

docker run -p 8080:8080 gcr.io/as-a-service-dev/screenshot

> [email protected] start /usr/src/app
> node server.js

App listening on port 8080
(node:19) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[0129/163041.181072: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 0x55f12282d399 base::debug::CollectStackTrace()
#1 0x55f12278e2a3 base::debug::StackTrace::StackTrace()
#2 0x55f12279fc95 logging::LogMessage::~LogMessage()
#3 0x55f12407c40e service_manager::ZygoteHostImpl::Init()
#4 0x55f122358060 content::ContentMainRunnerImpl::Initialize()
#5 0x55f1223b95e7 service_manager::Main()
#6 0x55f122356631 content::ContentMain()
#7 0x55f1223b880d headless::(anonymous namespace)::RunContentMain()
#8 0x55f1223b850c headless::HeadlessShellMain()
#9 0x55f11fdac5a7 ChromeMain
#10 0x7f00e10bb2e1 __libc_start_main
#11 0x55f11fdac3ea _start

Received signal 6
#0 0x55f12282d399 base::debug::CollectStackTrace()
#1 0x55f12278e2a3 base::debug::StackTrace::StackTrace()
#2 0x55f12282cf35 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f00e76650e0 (/lib/x86_64-linux-gnu/libpthread-2.24.so+0x110df)
#4 0x7f00e10cdfff gsignal
#5 0x7f00e10cf42a abort
#6 0x55f12282be95 base::debug::BreakDebugger()
#7 0x55f1227a0132 logging::LogMessage::~LogMessage()
#8 0x55f12407c40e service_manager::ZygoteHostImpl::Init()
#9 0x55f122358060 content::ContentMainRunnerImpl::Initialize()
#10 0x55f1223b95e7 service_manager::Main()
#11 0x55f122356631 content::ContentMain()
#12 0x55f1223b880d headless::(anonymous namespace)::RunContentMain()
#13 0x55f1223b850c headless::HeadlessShellMain()
#14 0x55f11fdac5a7 ChromeMain
#15 0x7f00e10bb2e1 __libc_start_main
#16 0x55f11fdac3ea _start
  r8: 0000000000000000  r9: 00007ffd118fe250 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffd118ff508 r13: 00007ffd118fe4e0 r14: 00007ffd118ff510 r15: aaaaaaaaaaaaaaaa
  di: 0000000000000002  si: 00007ffd118fe250  bp: 00007ffd118fe490  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007f00e10cdfff  sp: 00007ffd118fe2c8
  ip: 00007f00e10cdfff 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 (/usr/src/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:159:20)
    at Interface.helper_1.helper.addEventListener (/usr/src/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:149:65)
    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)
(node:19) 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:19) [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.
(node:19) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[0129/163046.759697: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 0x563765cd1399 base::debug::CollectStackTrace()
#1 0x563765c322a3 base::debug::StackTrace::StackTrace()
#2 0x563765c43c95 logging::LogMessage::~LogMessage()
#3 0x56376752040e service_manager::ZygoteHostImpl::Init()
#4 0x5637657fc060 content::ContentMainRunnerImpl::Initialize()
#5 0x56376585d5e7 service_manager::Main()
#6 0x5637657fa631 content::ContentMain()
#7 0x56376585c80d headless::(anonymous namespace)::RunContentMain()
#8 0x56376585c50c headless::HeadlessShellMain()
#9 0x5637632505a7 ChromeMain
#10 0x7f4f80bd32e1 __libc_start_main
#11 0x5637632503ea _start

Received signal 6
#0 0x563765cd1399 base::debug::CollectStackTrace()
#1 0x563765c322a3 base::debug::StackTrace::StackTrace()
#2 0x563765cd0f35 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f4f8717d0e0 (/lib/x86_64-linux-gnu/libpthread-2.24.so+0x110df)
#4 0x7f4f80be5fff gsignal
#5 0x7f4f80be742a abort
#6 0x563765ccfe95 base::debug::BreakDebugger()
#7 0x563765c44132 logging::LogMessage::~LogMessage()
#8 0x56376752040e service_manager::ZygoteHostImpl::Init()
#9 0x5637657fc060 content::ContentMainRunnerImpl::Initialize()
#10 0x56376585d5e7 service_manager::Main()
#11 0x5637657fa631 content::ContentMain()
#12 0x56376585c80d headless::(anonymous namespace)::RunContentMain()
#13 0x56376585c50c headless::HeadlessShellMain()
#14 0x5637632505a7 ChromeMain
#15 0x7f4f80bd32e1 __libc_start_main
#16 0x5637632503ea _start
  r8: 0000000000000000  r9: 00007ffdf38cf8a0 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffdf38d0b58 r13: 00007ffdf38cfb30 r14: 00007ffdf38d0b60 r15: aaaaaaaaaaaaaaaa
  di: 0000000000000002  si: 00007ffdf38cf8a0  bp: 00007ffdf38cfae0  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007f4f80be5fff  sp: 00007ffdf38cf918
  ip: 00007f4f80be5fff 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 (/usr/src/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:159:20)
    at Interface.helper_1.helper.addEventListener (/usr/src/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:149:65)
    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)
(node:19) 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: 2)

Using the latest version from GCR.

captn3m0 avatar Jan 29 '22 16:01 captn3m0