Closed jLouzado closed 6 years ago
hi @jLouzado, i see that there was a mistake in electron docs, the correct for configuration in extensions
object should be electron-pdf
, not electron
, docs have been updated to fix the problem. your configuration should look like this:
"extensions": {
"authentication": {
"cookieSession": {
"secret": "some secret"
},
"admin": {
"username": "some name",
"password": "some password"
},
"enabled": true
},
"scripts": {
"timeout": 40000,
"strategy": "http-server"
},
"electron-pdf":{
"strategy":"electron-ipc",
"pingTimeout":100,
"timeout":5000
}
},
for your timeout problem it seems that it is related to electron issues with linux, electron does not run by default on linux machines, it needs to use Xvfb along with your app to be able to work (it is mentioned in installation notes). are you using Xvfb
already? i see in you electron docs that the env var DISPLAY
is defined, are you defining that env var in some way?, i see that it contains a value of localhost:10.0
i have never used a value like that in the past so i'm not sure if that is a valid value, most common value for env var DISPLAY
i have saw is :99
(without localhost
) but it really depends on how you start Xvfb
in your server.
we have a docker image that has been configured to setup and start Xvfb properly, maybe it can help you. you can find how to install Xvfb and other required deps for electorn in linux here and to start it, here.
as you can see, to be able to run electron in linux is not that easy, so that is why we provide and in most cases recommend the usage of our jsreport full docker image which is configured to handle all of this.
Thank you @bjrmatos I'll take a look at the jsreport docker image and thank you for updating the documentation. My team decided to restyle the reports using chrome-pdf
since we were on a deadline, but for next time I'll keep in mind that I'll need to configure electron a particular way.
Oh and I think the $DISPLAY
value is because I was running jsreport on an AWS instance that I'd ssh'd into with the -X
x-forwarding flag enabled. That's probably what caused it. Next time I'll ssh into it without activating that and see what happens.
Thank you for all your help, should I close this issue for now? Can reopen it later if I have any follow-up issues. :pray:
Can reopen it later if I have any follow-up issues.
sure!! you are welcome 😃
Issue
Steps
jsreport-electron-pdf
andelectron
sinceelectron-prebuilt
is now Deprecated.jsreport.config.json
file:Description
t2.medium
instance so that has 2 coresstrategy
is defaulting todedicated-process
even though I'm setting it aselectron-ipc
in the jsreport "extensions" configuration.pingTimeout
andtimeout
values from the config file