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

Firefox ESR 31 used despite firefox: "39.0" plugin in .travis.yml #4649

Closed
miketaylr opened this issue Aug 12, 2015 · 17 comments
Closed

Firefox ESR 31 used despite firefox: "39.0" plugin in .travis.yml #4649

miketaylr opened this issue Aug 12, 2015 · 17 comments

Comments

@miketaylr
Copy link

@miketaylr miketaylr commented Aug 12, 2015

See for example, https://travis-ci.org/webcompat/webcompat.com/builds/75348340 (or https://s3.amazonaws.com/archive.travis-ci.org/jobs/75348341/log.txt):

�[34m�[1mInstalled Firefox version�[0m
firefox 31.0esr

As well as

�[0K�[33;1mInstalling Firefox v39.0�[0m

https://github.com/webcompat/webcompat.com/blob/master/.travis.yml#L16 has:

addons:
  firefox: "39.0"

But you can see that it's actually just using 31:

@BanzaiMan
Copy link
Member

@BanzaiMan BanzaiMan commented Aug 18, 2015

How are your tests invoking firefox? https://travis-ci.org/BanzaiMan/travis_production_test/builds/76097930#L114 shows that /usr/local/bin/firefox (which is at the top of $PATH) does indeed point to version 39.0. There is also /usr/local/firefox-31.0esr/firefox, but I am not sure how you might be invoking that instead.

@vladikoff
Copy link

@vladikoff vladikoff commented Aug 18, 2015

@miketaylr as part of your script it might be a good idea to run which firefox, and here is how to force the binary path: https://github.com/mozilla/fxa-content-server/blob/master/tests/intern.js#L94

@miketaylr
Copy link
Author

@miketaylr miketaylr commented Aug 18, 2015

@BanzaiMan I'm just pointing to firefox from the browserName of the Intern.js environments array (https://theintern.github.io/intern/#option-environments):

https://github.com/webcompat/webcompat.com/blob/master/tests/intern.js#L30

@vladikoff do you know how Intern resolves the environment to a $PATH?

@evilaliv3
Copy link

@evilaliv3 evilaliv3 commented May 10, 2016

i'm experiencing the same issue trying to use the latest and using protractor: https://api.travis-ci.org/jobs/129151209/log.txt?deansi=true

i'm now satisfied using this fix on the PATH:
globaleaks/GlobaLeaks@1788bec

https://api.travis-ci.org/jobs/129176010/log.txt?deansi=true

@AutomatedTester
Copy link

@AutomatedTester AutomatedTester commented Jun 15, 2016

We are now on Firefox 45ESR...

This is now creating an issue in mozilla/geckodriver#85

@BanzaiMan
Copy link
Member

@BanzaiMan BanzaiMan commented Jun 15, 2016

@AutomatedTester I understand that we are behind in updating the build environment, including Firefox, but this iissue is unlikely to have anything to do with the issue you are seeing.

This issue is about, despite using the firefox addon, the version invoked is not what you specify.

Your issue is most likely fixed by using the addon in your .travis.yml.

@bjdevil21
Copy link

@bjdevil21 bjdevil21 commented Jun 17, 2016

Also having this problem. Using Selenium 2.53.0 on Travis-CI. Using .travis.yml addon: firefox: "46.0.1", I get Firefox v38. There was no mention of adding the newer FF to $PATH in the output (see truncated CI output below):

Installing Firefox 46.0.1 1.47s$ wget -O /tmp/firefox-46.0.1.tar.bz2 $FIREFOX_SOURCE_URL --2016-06-17 05:31:24-- https://download.mozilla.org/?product=firefox-46.0.1&lang=en-US&os=linux64 ... 2016-06-17 05:31:25 (44.9 MB/s) -/tmp/firefox-46.0.1.tar.bz2' saved [52884219/52884219] ....
Driver info: org.openqa.selenium.firefox.FirefoxDriver ...
Capabilities {platform=LINUX, acceptSslCerts ... version=38.4.0}`

FF46 + Selenium 2.53.0 work fine locally when running Behat tests with the same Selenium + FF versions.

@BanzaiMan
Copy link
Member

@BanzaiMan BanzaiMan commented Jun 17, 2016

How does Selenium invoke Firefox?

@bjdevil21
Copy link

@bjdevil21 bjdevil21 commented Jun 17, 2016

It was with:

addons:
  firefox: "46.0.1"

...in a .travis.yml, which isn't working. I Get the FF 38.4.0 version.

To get it to work with 46.0.1, I used the following workaround in .travis.yml:

 - sudo mkdir /usr/local/bin/firefoxhack
  - sudo wget --directory-prefix=/tmp http://ftp.mozilla.org/pub/firefox/releases/46.0.1/linux-x86_64/en-US/firefox-46.0.1.tar.bz2
  - sudo tar -xjf /tmp/firefox-46.0.1.tar.bz2 -C /usr/local/bin/firefoxhack --strip-components=1
  - export PATH="/usr/local/bin/firefoxhack:$PATH"
@shane-tomlinson
Copy link

@shane-tomlinson shane-tomlinson commented Oct 14, 2016

We saw the same problem, we installed Firefox 46 using addons:

addons:
  firefox: "46.0"

In our script section, I printed the version of both firefox and firefox-bin:

script:
  - which firefox
  - firefox --version
  - which firefox-bin
  - firefox-bin --version

firefox version was Mozilla Firefox 46.0
firefox-bin version was Mozilla Firefox 31.0

When The Intern/Selenium fired up its instance of Firefox, I had it print it's ua string and saw Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0

Here's the output run: https://travis-ci.org/mozilla/fxa-content-server/builds/167695971

We got around this problem by passing the result of which firefox to The Intern's config.capabilities.firefox_binary configuration option as mentioned by @vladikoff above.

@BanzaiMan
Copy link
Member

@BanzaiMan BanzaiMan commented Nov 14, 2016

I think this is worth documenting. @shane-tomlinson Would you like to give us a hand in polishing up https://github.com/travis-ci/docs-travis-ci-com/blob/gh-pages/user/firefox.md?

@nenadalm
Copy link

@nenadalm nenadalm commented Nov 20, 2016

another option to setting config.capabilities.firefox_binary would be to replace argument --binary for geckodriver by some wrapper https://github.com/nenadalm/Warehouse/blob/1378825e8f0c32fbd2878697753939fef1fd9420/.travis.yml#L34

@BanzaiMan
Copy link
Member

@BanzaiMan BanzaiMan commented Nov 23, 2016

I will try updating the addon to create symlink for firefox-bin as well as firefox. This might solve the issue.

@BanzaiMan
Copy link
Member

@BanzaiMan BanzaiMan commented Nov 23, 2016

Actually, there are more executables than just firefox and firefox-bin in the firefox directory of the archive, so I think it is better to just add the expanded archive directory to $PATH.

@henrahmagix
Copy link

@henrahmagix henrahmagix commented Nov 23, 2016

For my uses with Protractor, this worked for me (thanks @shane-tomlinson for your info):

script:
    - alias firefox-bin='firefox'
    - protractor stuff
@nolanlawson
Copy link

@nolanlawson nolanlawson commented Nov 26, 2016

FWIW we have been battling this problem in PouchDB as well (pouchdb/pouchdb#5947). I've tried several different combinations, and I can't get our Selenium tests to consistently use the right version of Firefox, but thanks to comments in this thread I've been able to get it to work at least a majority of the time. Setting an explicit firefox_binary option in the Selenium config to point to /usr/local/bin/firefox seems to be the best strategy. (We're using the selenium-standalone npm package.)

It'd be great if Travis provided some way to install a later version of Firefox and replace the existing Firefox version. Apparently having the two installed at the same time causes a lot of wonkiness, although I'm still not sure what the actual problem is.

BanzaiMan added a commit to travis-ci/travis-build that referenced this issue Nov 28, 2016
The firefox archive contains more than just `firefox`, so we need to put
the directory into which we expanded the archive to `$PATH`, so that all
associated binaries are found correctly.

This resolves travis-ci/travis-ci#4649.
@henrahmagix
Copy link

@henrahmagix henrahmagix commented Nov 28, 2016

Thanks @BanzaiMan!

dbmeneses added a commit to SonarSource/travis-build that referenced this issue Dec 7, 2016
The firefox archive contains more than just `firefox`, so we need to put
the directory into which we expanded the archive to `$PATH`, so that all
associated binaries are found correctly.

This resolves travis-ci/travis-ci#4649.
dbmeneses added a commit to SonarSource/travis-build that referenced this issue Dec 7, 2016
The firefox archive contains more than just `firefox`, so we need to put
the directory into which we expanded the archive to `$PATH`, so that all
associated binaries are found correctly.

This resolves travis-ci/travis-ci#4649.
marceloboeira added a commit to feedcast/scott that referenced this issue Jan 8, 2017
It seems that for the selenium webdriver to work it requires gecko that
requires firefox that requires a xserver.

Now we install firefox, then gecko, then start a xserver before the
tests.

References:
mozilla/geckodriver#85
travis-ci/travis-ci#4649
NikolayRys/Likely@cc1fe56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

10 participants
You can’t perform that action at this time.