buitron / geckodriver-buildpack

Heroku geckodriver buildpack for Selenium use with Firefox
7 stars 12 forks source link

geckodriver breaks heroku build #5

Open toomanyjoes opened 2 years ago

toomanyjoes commented 2 years ago

This just started happening to me but when I deploy my code with this buildpack my heroku build fails with the following error:

remote: -----> Found geckodriver version: verifie
remote: -----> Fetching geckodriver package from https://github.com/mozilla/geckodriver/releases/download/verifie/geckodriver-verifie-linux64.tar.gz
remote: -----> Extracting geckodriver binaries to /tmp/build_02d7abcd/vendor/geckodriver
remote:
remote: gzip: stdin: not in gzip format
remote: tar: Child returned status 1
remote: tar: Error is not recoverable: exiting now
remote:  !     Push rejected, failed to compile geckodriver app.
remote:
remote:  !     Push failed

Anything I can do to fix this?

toomanyjoes commented 2 years ago

Something like this looks like it fixes the issue

LATEST="https://github.com/mozilla/geckodriver/releases"
VERSION=$(grep -om 1 '">v\d.*' <(curl -s $LATEST) | cut -c 4-9)

But I ended up just setting the GECKODRIVER_VERSION environment variable to get around this.

donno2048 commented 2 years ago

I have this problem too and cannot solve it...

toomanyjoes commented 2 years ago

@donno2048 if you set your GECKODRIVER_VERSION environment variable or config variable on Heroku, (I set mine to 0.26.0) then the code that is trying to parse the latest release version is bypassed and you no longer get this error. It probably makes sense to lock the version you are using anyways until new versions are tested. Hope that helps.

donno2048 commented 2 years ago

I used another Geckodriver buildpack but ended up getting a server error, eventually I gave up on my project.... But thanks anyway...