Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify static version ? #134

Open
foremtehan opened this issue Aug 4, 2022 · 11 comments
Open

How to specify static version ? #134

foremtehan opened this issue Aug 4, 2022 · 11 comments

Comments

@foremtehan
Copy link

foremtehan commented Aug 4, 2022

Hey i dont want to automatically update chromedriver/browser, How can i do that ? chromvedriver has env variable, but what about this package ? the CHROMEDRIVER_VERSION thing not working i explained here heroku/heroku-buildpack-chromedriver#39

@nachoal
Copy link

nachoal commented Aug 4, 2022

Same issue for me, any guide on how to block? Thinking about forking and just blocking the version before the updates

@mapapuche
Copy link

same issue for me :/

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 104

CHROMEDRIVER_VERSION not working

@CodingMeSwiftly
Copy link

Same issue here.

@mikhama
Copy link

mikhama commented Sep 29, 2022

The same 😢

@dancherb
Copy link

A pull request was submitted for this but it wasn't merged, and is now likely out of date as a fork:
#118

@bkuhn25
Copy link

bkuhn25 commented Feb 27, 2023

Also having the same issue. It would be very helpful if we could specify the chrome version we'd like to use that way we could intentionally change the version when there is a new update instead of crashing without knowing there was an update.

@awl19
Copy link

awl19 commented Mar 29, 2023

I also had an app break after pushing an update and the Chrome browser version updated without my knowledge.
I've forked this repo with an update that adds an env var for the Chrome browser version. Key for the env var is in the readme.
https://github.com/awl19/heroku-buildpack-google-chrome

@nbarrett
Copy link

nbarrett commented Apr 12, 2023

Hey @awl19 - thanks for creating the buildpack that allows the Chrome version to be specified! I tried tonight on my project and it didn't work quite as I expected though. On my heroku settings I'm using:

https://github.com/awl19/heroku-buildpack-google-chrome and https://github.com/heroku/heroku-buildpack-chromedriver

I've specified config vars CHROMEDRIVER_VERSION=110.0.5481.77 and CHROME_VERSION=110.0.5481.77

However, When I run run a webdriver process that uses the headless chrome + ChromeDriver I've just installed, I get the following error:

[21:44:45] E/launcher - Error: SessionNotCreatedError: session not created: 
This version of ChromeDriver only supports Chrome version 110 Current browser version is 112.0.5615.49 with binary path /app/.apt/opt/google/chrome/chrome (Driver info: chromedriver=110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839}),platform=Linux 4.4.0-1104-aws x86_64) at Object.checkLegacyResponse (/app/server/node_modules/selenium-webdriver/lib/error.js:546:15) 
at parseHttpResponse (/app/server/node_modules/selenium-webdriver/lib/http.js:509:13) at /app/server/node_modules/selenium-webdriver/lib/http.js:441:30 at processTicksAndRejections (node:internal/process/task_queues:96:5)

I had a detailed look at the heroku install log and noticed the following:

-----> Fetching https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.77-1_amd64.deb
.....
-----> Installing google-chrome-stable_110.0.5481.77-1_amd64.deb
-----> Installing google-chrome-stable_current_amd64.deb

I'm wondering whether the second installation is overwriting the binary in /app/.apt/opt/google/chrome/chrome?

Thanks in advance for your help!

@awl19
Copy link

awl19 commented Apr 12, 2023

Hey @nbarrett, that is odd.

When I executed the URL of the Chrome browser bin provided from your log, it did initiate download, so the version is valid and the link is working as expected.
https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.77-1_amd64.deb

Do you have 2 versions of this buildpack in your Heroku app? One being the original "heroku-buildpack-google-chrome" and the other being my fork? Because if so, I could see that being a conflicting issue.

If that's not the case, then I could see it maybe having to with your build cache, which you can clear by following these instructions. It's something I had to do in order to get things working in my app.
https://help.heroku.com/18PI5RSY/how-do-i-clear-the-build-cache

If it's not either of those two issues, I'm not sure what it could be.

@nbarrett
Copy link

Thanks @awl19 for your quick and informative response - I do only have the two buildpacks:

...and had already removed https://github.com/heroku/heroku-buildpack-google-chrome in favour of your one.

I did try the heroku builds:cache:purge command though and when I re-deployed I only saw the version I expected:
-----> Installing google-chrome-stable_110.0.5481.77-1_amd64.deb

And more importantly I didn't get the SessionNotCreatedError error so I think my problem is solved... Thanks so much for your help!

@awl19
Copy link

awl19 commented Apr 12, 2023

@nbarrett Awesome, glad to hear it! Happy coding :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants