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

Failed to launch browser process on Debian Server #533

Closed
JohannesMP opened this issue Oct 17, 2020 · 5 comments
Closed

Failed to launch browser process on Debian Server #533

JohannesMP opened this issue Oct 17, 2020 · 5 comments
Assignees

Comments

@JohannesMP
Copy link

JohannesMP commented Oct 17, 2020

Description

I've run nvidia-snatcher on my windows machine with no issues.

However I wanted to move it to a headless Debian server so I can ensure that it's running even if I turn my computer off.
I copied my .env file, used git to clone the repo and ran npm install.

However when I run it using npm run start I get an error that it 'failed to load the browser process':

jo@mp:/opt/app_nvidia-snatcher/nvidia-snatcher [main]$ cat /etc/debian_version
9.7

jo@mp:/opt/app_nvidia-snatcher/nvidia-snatcher [main]$ node --version
v14.13.1

jo@mp:/opt/app_nvidia-snatcher/nvidia-snatcher [main]$ npm --version
6.14.8

jo@mp:/opt/app_nvidia-snatcher/nvidia-snatcher [main]$ git status
On branch main
Your branch is up-to-date with 'origin/main'.
nothing to commit, working tree clean

jo@mp:/opt/app_nvidia-snatcher/nvidia-snatcher [main]$ git show --oneline -s
d575b8b chore(deps-dev): bump nodemon from 2.0.4 to 2.0.5 (#518)

jo@mp:/opt/app_nvidia-snatcher/nvidia-snatcher [main]$ npm run start

> nvidia-snatcher@ start /opt/app_nvidia-snatcher/nvidia-snatcher
> npm run build && node build/index.js


> nvidia-snatcher@ build /opt/app_nvidia-snatcher/nvidia-snatcher
> rimraf ./build && tsc


                    $$\       $$\ $$\                                                  $$\               $$\
                    \__|      $$ |\__|                                                 $$ |              $$ |
$$$$$$$\ $$\    $$\ $$\  $$$$$$$ |$$\  $$$$$$\           $$$$$$$\ $$$$$$$\   $$$$$$\ $$$$$$\    $$$$$$$\ $$$$$$$\   $$$$$$\   $$$$$$\
$$  __$$\\$$\  $$  |$$ |$$  __$$ |$$ | \____$$\ $$$$$$\ $$  _____|$$  __$$\  \____$$\\_$$  _|  $$  _____|$$  __$$\ $$  __$$\ $$  __$$\
$$ |  $$ |\$$\$$  / $$ |$$ /  $$ |$$ | $$$$$$$ |\______|\$$$$$$\  $$ |  $$ | $$$$$$$ | $$ |    $$ /      $$ |  $$ |$$$$$$$$ |$$ |  \__|
$$ |  $$ | \$$$  /  $$ |$$ |  $$ |$$ |$$  __$$ |         \____$$\ $$ |  $$ |$$  __$$ | $$ |$$\ $$ |      $$ |  $$ |$$   ____|$$ |
$$ |  $$ |  \$  /   $$ |\$$$$$$$ |$$ |\$$$$$$$ |        $$$$$$$  |$$ |  $$ |\$$$$$$$ | \$$$$  |\$$$$$$$\ $$ |  $$ |\$$$$$$$\ $$ |
\__|  \__|   \_/    \__| \_______|\__| \_______|        \_______/ \__|  \__| \_______|  \____/  \_______|\__|  \__| \_______|\__|

[7:55:25 AM] info :: ℹ selected stores: adorama, amazon, asus, bandh, bestbuy, gamestop, newegg, nvidia, nvidia-api, officedepot
[7:55:25 AM] info :: ℹ selected models: strix, rog strix, rog strix oc
[7:55:25 AM] info :: ℹ selected series: 3080
(node:31937) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[1017/075525.583718:FATAL:zygote_host_impl_linux.cc(117)] 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 0x55fef11ac2a9 base::debug::CollectStackTrace()
#1 0x55fef1124a83 base::debug::StackTrace::StackTrace()
#2 0x55fef11361a0 logging::LogMessage::~LogMessage()
#3 0x55feef77505e content::ZygoteHostImpl::Init()
#4 0x55fef0ccebbb content::ContentMainRunnerImpl::Initialize()
#5 0x55fef0d1e96a service_manager::Main()
#6 0x55fef0ccd191 content::ContentMain()
#7 0x55fef0d1d52d headless::(anonymous namespace)::RunContentMain()
#8 0x55fef0d1d22c headless::HeadlessShellMain()
#9 0x55feee4c5ca7 ChromeMain
#10 0x7fbb80cde2e1 __libc_start_main
#11 0x55feee4c5aea _start

Received signal 6
#0 0x55fef11ac2a9 base::debug::CollectStackTrace()
#1 0x55fef1124a83 base::debug::StackTrace::StackTrace()
#2 0x55fef11abe4b base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7fbb8685a0c0 (/lib/x86_64-linux-gnu/libpthread-2.24.so+0x110bf)
#4 0x7fbb80cf0fff gsignal
#5 0x7fbb80cf242a abort
#6 0x55fef11aada5 base::debug::BreakDebugger()
#7 0x55fef113661b logging::LogMessage::~LogMessage()
#8 0x55feef77505e content::ZygoteHostImpl::Init()
#9 0x55fef0ccebbb content::ContentMainRunnerImpl::Initialize()
#10 0x55fef0d1e96a service_manager::Main()
#11 0x55fef0ccd191 content::ContentMain()
#12 0x55fef0d1d52d headless::(anonymous namespace)::RunContentMain()
#13 0x55fef0d1d22c headless::HeadlessShellMain()
#14 0x55feee4c5ca7 ChromeMain
#15 0x7fbb80cde2e1 __libc_start_main
#16 0x55feee4c5aea _start
  r8: 0000000000000000  r9: 00007ffd27702350 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffd27703610 r13: 00007ffd27702dd0 r14: 00007ffd27703620 r15: 00007ffd277025a0
  di: 0000000000000002  si: 00007ffd27702350  bp: 00007ffd27702590  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007fbb80cf0fff  sp: 00007ffd277023c8
  ip: 00007fbb80cf0fff 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/main/docs/troubleshooting.md

    at onClose (/opt/app_nvidia-snatcher/nvidia-snatcher/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
    at Interface.<anonymous> (/opt/app_nvidia-snatcher/nvidia-snatcher/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
    at Interface.emit (events.js:326:22)
    at Interface.close (readline.js:424:8)
    at Socket.onend (readline.js:202:10)
    at Socket.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1252:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:31937) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:31937) [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.

Are there any linux-specific installation steps or dependencies that are not listed in the readme?

@jef
Copy link
Owner

jef commented Oct 19, 2020

@jef jef closed this as completed Oct 19, 2020
@JohannesMP
Copy link
Author

I've installed the dependencies without any visible errors using this command:

sudo apt-get install -y ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils

I then restarted the server as was recommended in the prompt.

Unfortunately despite that, I get the same UnhandledPromiseRejectionWarning as before when I run npm-snatcher.

@jef
Copy link
Owner

jef commented Oct 26, 2020

Perhaps pull the latest and try and to run again. It may be working now.

@JohannesMP
Copy link
Author

Hi @jef

I got latest (6b9ecae) and ran npm install, but am still seeing a crash regarding not having a usable sandbox.

Here is the output when running npm start | tee output.txt:
output.txt

I've been looking at the puppeteer github (namely this issue puppeteer/puppeteer#290) and have been unable to find a resolution. For what it's worth, using the script in this comment I've verified that namespacing is enabled in my kernel, and that my kernel is new enough (4.9.0-8-amd64) to support the required features.

@Tiippex
Copy link

Tiippex commented Nov 25, 2020

Hi @jef

I got latest (6b9ecae) and ran npm install, but am still seeing a crash regarding not having a usable sandbox.

Here is the output when running npm start | tee output.txt:
output.txt

I've been looking at the puppeteer github (namely this issue puppeteer/puppeteer#290) and have been unable to find a resolution. For what it's worth, using the script in this comment I've verified that namespacing is enabled in my kernel, and that my kernel is new enough (4.9.0-8-amd64) to support the required features.

Is there any solution for this? I have the same issue.

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

No branches or pull requests

3 participants