2

my original aim was to run a headless selenium webdriver on a Raspberry Pi 3 (rasbian). After hours and hours of failing, I make a step back and now I only try to run chromium-browser which needed for the webdriver.

There... I recognize some errors after execute:

 sudo ./chromium-browser --headless --no-sandbox --disable-gpu --disable-extensions

Error-Stack:

 --disable-quic --enable-tcp-fast-open --disable-gpu-compositing --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version=
[1015/183516.617458:ERROR:browser_main_loop.cc(670)] Failed to put Xlib into threaded mode.
[1015/183516.625190:ERROR:gpu_process_transport_factory.cc(1029)] Lost UI shared context.

I search for solution in internet but I found no results.

Following I have to add: -everything works fine if run the webdriver on my windows system -I reproduce the error on two complete different raspberry Pi's -I also try to run on a Raspbian virtual machine -I try to run the webdriver with iceweasel and geckodriver with the result "Error: connection refused"

So I am out of ideas, thankful for any response.

Mar Tin
  • 2,132
  • 1
  • 26
  • 46
  • Found the correct chromedriver version on: https://launchpad.net/ubuntu/trusty/armhf/chromium-chromedriver/65.0.3325.181-0ubuntu0.14.04.1 , it is compatible with current sudo get-apt install chromium-browser version – Mar Tin Oct 16 '18 at 15:23
  • I had the same error in my docker container with chromium-browser@77. I was able to find image balenalib/raspberry-pi-debian:buster-run which could install chromium-browser@88 and chromium-chromedriver@88. Then I got different error which I solved with this answer https://stackoverflow.com/a/66513433/1303387 – Jirik Sep 20 '21 at 15:01

1 Answers1

1

For others who are still struggling to find a solution: It seems that the issue is with diplay resource when running the program on a remote server having multiple display.

You may try setting the DISPLAY environment parameter

export DISPLAY=:1.0;

Alpesh Patil
  • 1,672
  • 12
  • 15