js report : Failed to launch chrome error
I am getting error while running js pdf report
Error: Failed to launch chrome!
[0328/092947.147491:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
at onClose (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Launcher.js:342:14) at Interface.helper.addEventListener (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Launcher.js:331:50) at Interface.emit (events.js:187:15) at Interface.close (readline.js:414:8) at Socket.onend (readline.js:167:10) at Socket.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1098:12) at process.internalTickCallback (internal/process/next_tick.js:72:19)
Please help me to resolve this issue.
Please always try to share as much information you can.
This question is basically just an error message and we even don't know what OS you use and how did you install jsreport.
Please try to use the installations steps we provide for particular OS and platform here. (click on the particular icon)
If it don't help, come back and share as much information as you can.
we are using UBUNTU and we referred same(https://jsreport.net/on-prem) website for installation.
Getting exactly the same thing when running on a headless CENTOS 7 server. Chrome is not even loaded on the box.
Followed the install procedure mentioned above.
BTW, don't know if this is related, but when running that using "Advanced REST Client" as mentioned in quickstart, I keep getting issues concerning that I need to "Install self signed certificate in Chrome". Any relation to problem above? Can live with this, but not with the above problem.
I got this error too. do you have any solutions yet? thanks
Sorry for your troubles. Don't you run the
jsreport startas root on ubuntu? You shouldn't.
Follow the exact steps we share here.
yep i just did that. Actually the server is really working fine but the error comes when i start running pdf templates, when i run an example template like "invoice-main" the error suddenly popup.
I just solve it by replacing chrome-pdf to phantom-pdf, maybe the chrome-pdf is the problem.
Just tried again on my headless CENTOS system with a new install. Still getting the same errors.
Did see this error: error while loading shared libraries: libXss.so.1
What is this library for?
What is phantom-pdf and how could I try that?
Found out how to load the lixXss file. Use: sudo yum install libXScrnSaver-1.2.2-6.1.el7.x86_64
But after this, when I run the report I now get: error while loading shared libraries: libXrandr.so.2
Trying to find this gets me into never-never land. One site told me to load libXrandr-1.5.2-alt1.x86_64.rpm. But when I try to load that library, yum tells me that it is unavailable.
@Stan-Banes you probably need to follow the instructions here which describe what libraries needs to be installed on CentOS, check the "CentOS Dependencies" section
Thank you so much. That is exactly what I needed to do.
Would be nice to include a link to that page in install instructions for other users of headless servers.
I do like the report I am seeing. Now need to figure out how to write my own reports.