WebDriver Chrome session fails with SessionNotCreatedException even though manual Selenium Chrome test works #4226
Replies: 1 comment
-
|
Root cause diagnosis + actionable steps Your manual Selenium script works because you control the Most likely causes in your specific setup:
Step 1: confirm the exact flags being sent Step 2: patch the fetcher to inject the required args Look for the These are the same flags your working manual script uses. Restart changedetection after editing. Additional info that would help narrow this down:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to use changedetection.io with Chrome via WebDriver on an Ubuntu server.
What I did
Installed google-chrome-stable.
Installed and verified chromedriver.
Manually tested a Selenium Python script that launches Chrome headless with:
--headless=new
--no-sandbox
--disable-dev-shm-usage
--disable-gpu
That manual Selenium test works correctly and successfully opens https://example.com, so Chrome + ChromeDriver are working fine on this machine.
changedetection configuration
In the UI, I selected:
WebDriver Chrome/Javascript via "http://localhost:9515"
In settings:
fetch_backend = html_webdriver
Environment variables:
WEBDRIVER_URL=http://localhost:9515
CHROME_BIN=/usr/bin/google-chrome
GOOGLE_CHROME_BIN=/usr/bin/google-chrome
What happens
changedetection.io starts normally.
When I click Recheck on a watch, the log reaches RemoteWebDriver.
Then it fails with:
text
SessionNotCreatedException: session not created: Chrome instance exited. Examine ChromeDriver verbose log to determine the cause.
What I already verified
The WebDriver endpoint is reachable.
ChromeDriver is running.
Chrome works when launched manually through Selenium with the same machine and a working headless flag set.
The issue is not a missing browser installation.
My suspicion
It looks like changedetection.io is launching Chrome with a set of capabilities / flags that are incompatible with this environment, even though the same Chrome setup works when I launch it manually.
What I’m trying to achieve
I want changedetection.io to use the same Chrome launch options that work in the manual Selenium test, ideally via configuration only. If that is not possible, it seems like the WebDriver/Chrome startup logic may need to be adjusted.
Summary
Manual Selenium test: works
changedetection.io + WebDriver: reaches ChromeDriver, but Chrome exits immediately on session start
Likely issue: launch/capability handling inside changedetection.io, not Chrome itself
Beta Was this translation helpful? Give feedback.
All reactions