Open annaerdi opened 2 months ago
Very strange days on Ubuntu (with this and some other issues on newer versions).
Could there be missing dependencies that Chrome requires in a headless environment? I am not sure, but though the graphical version works, headless mode may require additional packages or settings to function properly.
Can you try running chrome headless directly please? Should be something like this:
/path/to/your/chrome --headless https://www.google.com
It seems to be a chrome issue indeed. Running it directly resulted in the following error:
$ ./chrome-linux64/chrome --headless https://www.google.com
chrome_crashpad_handler: --database is required
Try 'chrome_crashpad_handler --help' for more information.
[5651:5651:0925/103029.921387:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)
Trace/breakpoint trap (core dumped)
After going through these steps trying to debug it unsuccessfully, I have installed a previous version of chrome and chromedriver, which works fine.
(I'll leave them here in case someone comes accross the same issue: Chrome: https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.60/linux64/chrome-linux64.zip Chromedriver: https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.60/linux64/chromedriver-linux64.zip)
However, I encountered some strange behavior while experimenting with different Chrome versions:
executable-location
parameter, but it was still using the newer version. Fair enough, since the /home/anna/.cache/selenium/chromedriver/linux64/129.0.6668.59/chromedriver
folder still existed, so it probably just took it from the cache./home/anna/.cache/selenium/
and /root/.cache/selenium/
folders), yet GHOSTS was still able to start Chrome, and it recreated the /home/anna/.cache/selenium/
folder.Is it possible that GHOSTS is still caching an instance of chrome somewhere else?
Thanks for all the detail!
Ghosts shouldn't cache (if it does, I am unaware how that is happening) anything like this.
There is a setting in ./config/application.json for "FirefoxInstallLocation"
- you can try setting this with an absolute path, otherwise Ghosts looks in
/bin/firefox /usr/bin/firefox
for the FF binaries. It shouldn't be accessing chrome from anywhere else.
I think I found what is causing this behaviour: https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/
As of Selenium 4.11, it automatically downloads Chrome if it is not already installed on your system. This feature manages both drivers (like chromedriver) and browser versions. It seems that the executable-location
parameter is being overridden by Selenium.
And another update: the original issue, which I had with Chrome version 129.0.6668.58
, is not present anymore with the latest version 129.0.6668.70
.
So, long story short: we actually don't have to bother anymore with manually installing Chrome :)
Sorry, I was crossing firefox and chrome wires!!
Hi!
When I run ghosts in
"isheadless": "false"
mode, everything works fine. But when I use"isheadless": "true"
, I get asession not created: DevToolsActivePort file doesn't exist
error.I'm using Ubuntu 22.04. I have installed the latest Chrome and its corresponding ChromeDriver. They are both in the ghosts folder.
This is my
timeline.json
file:This is the
app.log
file:After some googling, I tried adding these option, but they don't solve the issue either: