OpenWPM icon indicating copy to clipboard operation
OpenWPM copied to clipboard

Platform should track current Firefox version and warn user if different

Open englehardt opened this issue 9 years ago • 3 comments

Right now we only suggest a Firefox version in the install script. Since different versions will have incompatibilities, especially in the Javascript instrumentation, we should track the required version within the infrastructure and warn the user if the version they are launching with doesn't match the required version.

Examples include the renaming of mozRTCPeerConnection to RTCPeerConnection in the jump from 41 to 45.

englehardt avatar Apr 08 '16 20:04 englehardt

We should do this an have the install script grab the newest version of the current ESR. The accepted way to get the latest version seems to be to use the following: curl "https://download.mozilla.org/?product=firefox-esr-latest" | sed -e 's/.*releases\///g' | cut -d "/" -f1 (see the README). However, that will start returning Firefox 59 during the 52-59 ESR transition period.

Instead, it looks like we can just grep the ftp listing: curl "https://ftp.mozilla.org/pub/firefox/releases/" | grep "/pub/firefox/releases/52." | tail -n 1 | sed -e 's/.*releases\///g' | cut -d "/" -f1.

englehardt avatar Oct 19 '17 19:10 englehardt

454c25a30d0bf9ca74ba203df2514e607b12fc1f changes the install script to automatically grab the latest point release of the current ESR. We should consider warning the user if their current release is behind the latest point release and prompt them to re-run the install script. That requires two things:

  1. The install script should check the currently installed version in the firefox-bin directory and update if outdated.
  2. We want to check the latest version in such a way that we don't end up hammering the FTP server if users happen to run the platform in a way we don't anticipate.

englehardt avatar Feb 19 '18 15:02 englehardt

Let's move the version out of the install script (https://github.com/mozilla/OpenWPM/blob/93ddf80c185de5f4298a2870eb04b05a0bc522e8/scripts/install-firefox.sh#L12) and into a new file formatted like below:

Mozilla Firefox 80.0
bd5d1f49975deb730064a16b3079edb53c4a5f84

Have the openwpm startup function check this version file and compare the version number to the number via geckodriver. This is possible to check as we're deploying the browser. After we initialize the driver (https://github.com/mozilla/OpenWPM/blob/93ddf80c185de5f4298a2870eb04b05a0bc522e8/automation/DeployBrowsers/deploy_firefox.py#L175-L180) we can query its capabilities. If the versions don't match we should throw a critical error (https://github.com/mozilla/OpenWPM/blob/93ddf80c185de5f4298a2870eb04b05a0bc522e8/automation/Errors.py#L21).

englehardt avatar Nov 06 '20 14:11 englehardt