google chrome no longer running
Steven4294 opened this issue · 14 comments
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /app/.apt/usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed
.)
Getting the above error in my python script. Have been running the same script for the past year or so, so I'm guessing something updated with Chrome but that wasn't updated in this buildpack.
*Note I would have received a different error if there were a mismatch between the chromedriver version and the version of chrome. E.g. (when running locally to force the error):
Message: session not created: This version of ChromeDriver only supports Chrome version 78
and my previously working python code:
options = webdriver.ChromeOptions()
options.binary_location = os.environ.get("GOOGLE_CRHOME_BIN")
options.add_argument("--no-sandbox")
options.add_argument("--headless")
options.add_argument("--disable-dev-shm-usage")
options.add_argument('--disable-gpu')
the_path = os.environ.get("CHROMEDRIVER_PATH")
driver = webdriver.Chrome(executable_path=the_path, options=options)
I don't know if it helps, but you have a mistyping on your snippet code :
GOOGLE_CRHOME_BIN > GOOGLE_CHROME_BIN
Since today I have a similar issue:
This version of ChromeDriver only supports Chrome version 81
But I do not understand I to fix this.
Checking the current driver version it seems 81.0.4044.69
And yesterday on https://github.com/heroku/heroku-buildpack-google-chrome I see a change saying:
Fix missing dependencies for Google Chrome 81
I'm not changing the default env vars GOOGLE_CHROME_BIN
and GOOGLE_CHROME_SHIM
so they should work without any issue.
Do you have any suggestion?
Regards
R
I opened the heroku console and typed:
/app/.apt/usr/bin/google-chrome-stable --version
Google Chrome 80.0.3987.106 unknown
/app/.apt/opt/google/chrome/chrome --version
Google Chrome 80.0.3987.106 unknown
Even setting the Config Var CHROMEDRIVER_VERSION
does not upgrade it
I tried also to remove the buildpacks and add again, but it does not update to the 81
Hello,
I have the same error since today:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81
Yesterday my script on python worked fine.
I can solve temporaly usin the chromedriver version: 80.0.3987.106
Regards
Sorry @youcycling I'm using Java, but can you share how did you apply the workaround of 80.0.3987.106
?
Did you just set it in the CHROMEDRIVER_VERSION
config var and restarted dynos?
Yes @sixro, but also I did a deploy in order to install the version 80.
Unfortunately @youcycling it does not work on Java... the error remains
Anyway thanks
Edited: no I made some mistakes, because trying again it worked thanks
Some hints from my debugging:
I see that on my prod instance I somehow got it to
Google Chrome 81.0.4044.92 unknown
but my dev instance is showing
Google Chrome 80.0.3987.163 unknown
I typically build on my dev instance so I think maybe building manually on the prod instance it didn't have a cache of that file or something and decided to rebuild it? Or maybe somehow my playing around with the buildpack on prod worked but didn't in dev?
I figured out the fix, you need to reset your cache
`
$ heroku plugins:install heroku-repo
$ heroku repo:purge_cache -a appname
`
and then redeploy with an empty commit or deploy from master.
https://help.heroku.com/18PI5RSY/how-do-i-clear-the-build-cache
@vezzick's solution did not work for me. Heroku Support said to instead use the "Run Again Without Cache" option in the CI UI.
They also recommended using https://github.com/titusfortner/webdrivers which is smarter about keeping versions in sync. Then the chromedriver buildpack is unnecessary. I have not yet investigated this.
Hey all, this buildpacked worked perfectly for a few days, unfortunately it ended up crashing after a recent deploy due to being incompatible with the latest version of Chrome.
I was getting the following error:
Selenium::WebDriver::Error::SessionNotCreatedError (session not created: This version of ChromeDriver only supports Chrome version 83):
@schwern thanks for the suggestion, that worked for me!
For anyone having compatibility issues between this buildpack and the Chrome one, here's a guide on switching to the webdrivers gem, which installs versions of chromedriver (or other webdrivers if needed) to be compatible with the local version of Chrome.
Since many people use this buildpack in combination with the Google Chrome buildpack, it would be amazing if it automatically checked the installed version of Chrome and always ensured it was downloading a compatible version of chromedriver. I think the only requirement for this would be to have the Chrome buildpack run first.
I could be wrong if this is solely a caching issue, but clearing the cache via the CLI did not work for me.
Closing stale issues. If the issue persists with the latest version of the buildpack please open a new issue with a minimal reproducable example (but also bear in mind that this buildpack is not an officially supported buildpack, so unless there is an actual bug with the buildpack, application debugging issues are generally out of scope).