Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update troubleshooting.md #6529

Merged
merged 1 commit into from Oct 27, 2020
Merged

Update troubleshooting.md #6529

merged 1 commit into from Oct 27, 2020

Conversation

macbre
Copy link
Contributor

@macbre macbre commented Oct 20, 2020

The latest Chromium provided by Alpine is at version 85.

The latest Chromium provided by Alpine is at version 85.
@google-cla google-cla bot added the cla: yes label Oct 20, 2020
@mathiasbynens mathiasbynens merged commit 8f4a79e into puppeteer:main Oct 27, 2020
@macbre macbre deleted the patch-1 branch October 27, 2020 14:43
@scooleo
Copy link

scooleo commented Nov 3, 2020

I'm having the following problem with chromium/puppeteer. my docker file is at the bottom of the page. Any help resolving this would be really appreciated. I have tried many iterations and different ways to get it working over a few days but it just fails.

Error: Failed to launch the browser process!
[1103/104153.165097: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 0x56106caf1219 base::debug::CollectStackTrace()
#1 0x56106ca55363 base::debug::StackTrace::StackTrace()
#2 0x56106ca67195 logging::LogMessage::~LogMessage()
#3 0x56106e2e300e service_manager::ZygoteHostImpl::Init()
#4 0x56106c65ef27 content::ContentMainRunnerImpl::Initialize()
#5 0x56106c6adafa service_manager::Main()
#6 0x56106c65d501 content::ContentMain()
#7 0x56106c6ac8f5 headless::(anonymous namespace)::RunContentMain()
#8 0x56106c6ac59d headless::HeadlessShellMain()
#9 0x56106a221aa7 ChromeMain
#10 0x7fd2b47e62e1 __libc_start_main
#11 0x56106a2218ea _start

Received signal 6
#0 0x56106caf1219 base::debug::CollectStackTrace()
#1 0x56106ca55363 base::debug::StackTrace::StackTrace()
#2 0x56106caf0d61 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7fd2ba7700e0
#4 0x7fd2b47f8fff gsignal
#5 0x7fd2b47fa42a abort
#6 0x56106caefb65 base::debug::BreakDebugger()
#7 0x56106ca67634 logging::LogMessage::~LogMessage()
#8 0x56106e2e300e service_manager::ZygoteHostImpl::Init()
#9 0x56106c65ef27 content::ContentMainRunnerImpl::Initialize()
#10 0x56106c6adafa service_manager::Main()
#11 0x56106c65d501 content::ContentMain()
#12 0x56106c6ac8f5 headless::(anonymous namespace)::RunContentMain()
#13 0x56106c6ac59d headless::HeadlessShellMain()
#14 0x56106a221aa7 ChromeMain
#15 0x7fd2b47e62e1 __libc_start_main
#16 0x56106a2218ea _start
r8: 0000000000000000 r9: 00007ffc4a8d4280 r10: 0000000000000008 r11: 0000000000000246
r12: 00007ffc4a8d5538 r13: 00007ffc4a8d4510 r14: 00007ffc4a8d5540 r15: aaaaaaaaaaaaaaaa
di: 0000000000000002 si: 00007ffc4a8d4280 bp: 00007ffc4a8d44c0 bx: 0000000000000006
dx: 0000000000000000 ax: 0000000000000000 cx: 00007fd2b47f8fff sp: 00007ffc4a8d42f8
ip: 00007fd2b47f8fff 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.js:750:14)
at Interface.<anonymous> (/usr/src/app/node_modules/puppeteer/lib/Launcher.js:739:50)
at Interface.emit (node:events:339:22)
at Interface.close (node:readline:424:8)
at Socket.onend (node:readline:202:10)
at Socket.emit (node:events:339:22)
at endReadableNT (node:internal/streams/readable:1289:12)
at processTicksAndRejections (node:internal/process/task_queues:80:21)

node:internal/process/promises:218
triggerUncaughtException(err, true /* fromPromise */);
^

Error: Failed to launch the browser process!
[1103/104153.165097: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 0x56106caf1219 base::debug::CollectStackTrace()
#1 0x56106ca55363 base::debug::StackTrace::StackTrace()
#2 0x56106ca67195 logging::LogMessage::~LogMessage()
#3 0x56106e2e300e service_manager::ZygoteHostImpl::Init()
#4 0x56106c65ef27 content::ContentMainRunnerImpl::Initialize()
#5 0x56106c6adafa service_manager::Main()
#6 0x56106c65d501 content::ContentMain()
#7 0x56106c6ac8f5 headless::(anonymous namespace)::RunContentMain()
#8 0x56106c6ac59d headless::HeadlessShellMain()
#9 0x56106a221aa7 ChromeMain
#10 0x7fd2b47e62e1 __libc_start_main
#11 0x56106a2218ea _start

Received signal 6
#0 0x56106caf1219 base::debug::CollectStackTrace()
#1 0x56106ca55363 base::debug::StackTrace::StackTrace()
#2 0x56106caf0d61 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7fd2ba7700e0
#4 0x7fd2b47f8fff gsignal
#5 0x7fd2b47fa42a abort
#6 0x56106caefb65 base::debug::BreakDebugger()
#7 0x56106ca67634 logging::LogMessage::~LogMessage()
#8 0x56106e2e300e service_manager::ZygoteHostImpl::Init()
#9 0x56106c65ef27 content::ContentMainRunnerImpl::Initialize()
#10 0x56106c6adafa service_manager::Main()
#11 0x56106c65d501 content::ContentMain()
#12 0x56106c6ac8f5 headless::(anonymous namespace)::RunContentMain()
#13 0x56106c6ac59d headless::HeadlessShellMain()
#14 0x56106a221aa7 ChromeMain
#15 0x7fd2b47e62e1 __libc_start_main
#16 0x56106a2218ea _start
r8: 0000000000000000 r9: 00007ffc4a8d4280 r10: 0000000000000008 r11: 0000000000000246
r12: 00007ffc4a8d5538 r13: 00007ffc4a8d4510 r14: 00007ffc4a8d5540 r15: aaaaaaaaaaaaaaaa
di: 0000000000000002 si: 00007ffc4a8d4280 bp: 00007ffc4a8d44c0 bx: 0000000000000006
dx: 0000000000000000 ax: 0000000000000000 cx: 00007fd2b47f8fff sp: 00007ffc4a8d42f8
ip: 00007fd2b47f8fff 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.js:750:14)
at Interface.<anonymous> (/usr/src/app/node_modules/puppeteer/lib/Launcher.js:739:50)
at Interface.emit (node:events:339:22)
at Interface.close (node:readline:424:8)
at Socket.onend (node:readline:202:10)
at Socket.emit (node:events:339:22)
at endReadableNT (node:internal/streams/readable:1289:12)
at processTicksAndRejections (node:internal/process/task_queues:80:21)

my docker image.

FROM node:15.0.1
#FROM node:12-slim
#FROM debian:buster

RUN apt-get update &&
apt-get install -y wget gnupg &&
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&
apt-get update &&
apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 &&
apt-get -y --no-install-recommends install
yarn nodejs vim &&
apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

COPY package*.json ./
RUN npm i --only=production

COPY . .

ENV NODE_ENV=production
RUN npm i puppeteer
&& 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 node_modules

EXPOSE 8080
CMD [ "node", "index.js" ]
USER pptruser

/*
my versions:
node -v v15.0.1
npm -v 7.0.7
*/

@macbre
Copy link
Contributor Author

macbre commented Nov 4, 2020

@scooleo
Copy link

scooleo commented Nov 4, 2020

@scooleo , https://github.com/Zenika/alpine-chrome#-the-best-with-seccomp might help you

Thanks @macbre for the reply, really appreciated - I'll check it out now!

I spun up an Ubuntu VM and had the same problem. I ran the following to fix the issue in Ubuntu. I am trying to build an image now to include the packages.

sudo apt-get install gconf-service libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxss1 libxtst6 libappindicator1 libnss3 libasound2 libatk1.0-0 libc6 ca-certificates fonts-liberation lsb-release xdg-utils wget

@macbre
Copy link
Contributor Author

macbre commented Nov 4, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants