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

Error: Failed to launch chrome #690

Closed
jmorrisIII opened this issue Feb 6, 2020 · 4 comments
Closed

Error: Failed to launch chrome #690

jmorrisIII opened this issue Feb 6, 2020 · 4 comments

Comments

@jmorrisIII
Copy link

I installed jsreport using the link here. When I use the chrome-pdf or the html-to-xlsx recipe I get the error below. I found a possible solution here from @bjrmatos but not sure if I need to install additional software.

Ubuntu 18.04.4 LTS
jsreport 2.6.1

Error

Error: Failed to launch chrome!
[0206/092523.200380:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.


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

    at onClose (/srv/jsreportapp/node_modules/puppeteer/lib/Launcher.js:342:14)
    at Interface.helper.addEventListener (/srv/jsreportapp/node_modules/puppeteer/lib/Launcher.js:331:50)
    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)
@pofider
Copy link
Contributor

pofider commented Feb 6, 2020

In the linked installation steps we don't start the process as root.
You seem to do. I recommend to start over installation as none root.

Or if you need to start as root, change in jsreport.config.json prop chrome to have

"chrome": {
  "launchOptions": {
    "args": ["--no-sandbox"]
  }
}

@jmorrisIII
Copy link
Author

Thanks @pofider adding the launchOptions worked but I will redo as non root user.

@devagrawal09
Copy link

I am also running into this issue. I am using jsreport-core, so I don't have a global configuration file. I already tried passing in { launchOptions: { args: [ '--no-sandbox' ] } } to the jsreport-chrome-pdf but it doesn't work. How do I pass the --no-sandbox configuration?

@pofider
Copy link
Contributor

pofider commented Apr 9, 2020

@devagrawal09 please report the jsrepor-core problems to the jsreport-core repository

However this should work

jsreport.use(require('jsreport-chrome-pdf')({ launchOptions: { args: [ '--no-sandbox' ] } }))

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

No branches or pull requests

3 participants