Steveorevo / node-red-contrib-nbrowser

Provides a virtual web browser (a.k.a. "headless browser") appearing as a node.
35 stars 13 forks source link

Exception on linux container #25

Open mannharleen opened 4 years ago

mannharleen commented 4 years ago

I am running in a docker container that runs node red. I install this, but when i try to run it, it throws this error:

[red] Uncaught Exception: 6 Dec 05:19:09 - Error: spawn /data/node_modules/electron/dist/electron EACCES at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19)

Steveorevo commented 4 years ago

Did you read “run it in node-red docker? #5”

mannharleen commented 4 years ago

I did actually. specifically: https://github.com/Steveorevo/node-red-contrib-nbrowser/issues/5#issuecomment-385444269

But the new docker images is based on alpine and this covers ubuntu (app add vs apt get )

Steveorevo commented 4 years ago

I see. We’re there any console messages or errors regarding your installation of xvfb?

mannharleen commented 4 years ago

xvfb installs well. Here is what I am doing:

apk add xvfb 
Xvfb -ac -screen scrn 1280x2000x24 :9.0 & export DISPLAY=:9.0

My assumption is that I have to perhaps install some other libraries too

Steveorevo commented 4 years ago

nbrowser is based on nightmarejs. Are you able to run an example script from http://www.nightmarejs.org/ ?

mannharleen commented 4 years ago

yes of course. the same thing works on my windows machine