Steveorevo / node-red-contrib-nbrowser

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

Ubuntu Server ARM: Stuck at "running: getHTML" #34

Open mdazmir opened 3 years ago

mdazmir commented 3 years ago

This is on a clean installation of Ubuntu Server 21.04. Below are the specs:

Hardware: Raspberry Pi 4 Model B Rev 1.2 Operating System: Ubuntu Server 21.04 Kernel: Linux 5.11.0-1017-raspi Architecture: arm64 Node.js: v14.17.6 Node-RED: v2.0.6 XVFB: v2:1.20.11-1ubuntu1.1 node-red-contrib-xvfb: v1.0 node-red-contrib-nbrowser: v1.4.4 (nightmare@2.10.0, electron@1.8.8)

The nbrowser node within Node-Red just stuck at "running: getHTML" and there's nothing shown within the debug window.

I ran a simple test using this script (test.js) by running the command below: $ DEBUG=nightmare:*,electron:* xvfb-run node test.js

It shown that I'm missing a few libraries as listed below:

I've fixed it by installing all the missing libraries as below:

Running again the command below was successful as I've managed to get the correct result: $ DEBUG=nightmare:*,electron:* xvfb-run node test.js

Somehow when I test the nbrowser node again, it still stuck at "running: getHTML" and nothing shown within the debug window. Obviously, based on the previous test, nightmare@2.10.0 and electron@1.8.8 is working fine but somehow there's a problem with nbrowser.

I've tested nbrowser on the specs below but failed as well: Hardware: Raspberry Pi 4 Model B Rev 1.2 Operating System: Raspbian GNU/Linux 10 (buster) Kernel: Linux 5.10.52-v7l+ Architecture: arm Node.js: v14.17.4 Node-RED: v2.0.5 XVFB: v2:1.20.4-1+rpt3+deb10u3 node-red-contrib-xvfb: v1.0 node-red-contrib-nbrowser: v1.1.4 (nightmare@2.10.0, electron@1.8.8)

The only time nbrowser is working fine is when I ran it on VM with the specs below: Operating System: Raspbian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-13-amd64 Architecture: x86-64 Node.js: v10.21.0 Node-RED: v1.2.6 XVFB: v2:1.20.4-1+rpt2+deb10u2 node-red-contrib-xvfb: v1.0 node-red-contrib-nbrowser: v1.1.4 (nightmare@2.10.0, electron@1.8.8)

Does nbrowser has problem when running on ARM architecture? Does anyone know how to fix this? Perhaps some tweaks on nbrowser codes could solve this.

Here is the screen log of all the command within this post including its result that I've ran on my Ubuntu Server 21.04 installed on Raspberry Pi 4 Model B.

Here's my test Node-Red flow

igisho commented 1 year ago

same here