Skip to content

Conversation

@MikeMcC399
Copy link
Collaborator

Situation

Version string comparisons in factory/installScripts/firefox/install-firefox-version.js are flawed. They will fail if the version of Firefox exceeds 999.

Change

Extract the major version of Firefox, and make numerical comparisons based on this.

The installation script factory/installScripts/firefox/install-firefox-version.js:

  • Switches from bz2 to xz (de-)compression for Firefox >=135.x
  • Allows installing Firefox >=136.x on arm64
Environment variable Before After
FACTORY_VERSION 7.0.0 7.0.1

Verification

  • use --no-cache to repeat test
FIREFOX_VERSION Build message
134.0 Success
134.0.2 Success
135.0 Success
135.0.1 Success
136.0 Success
136.0.4 Success
140.4.0esr Success
144.0.2 Success
999.0 Fail 404 Not Found
1000.0 Fail 404 Not Found
cd factory
docker compose build factory

export FIREFOX_VERSION='134.0'
docker compose build firefox # expect success

export FIREFOX_VERSION='134.0.2'
docker compose build firefox # expect success

export FIREFOX_VERSION='135.0'
docker compose build firefox # expect success

export FIREFOX_VERSION='135.0.1'
docker compose build firefox # expect success

export FIREFOX_VERSION='136.0'
docker compose build firefox # expect success

export FIREFOX_VERSION='136.0.4'
docker compose build firefox # expect success

export FIREFOX_VERSION='140.4.0esr'
docker compose build firefox # expect success

export FIREFOX_VERSION='144.0.2'
docker compose build firefox # expect success

export FIREFOX_VERSION='999.0.0'
docker compose build firefox # expect 404 error

export FIREFOX_VERSION='1000.0.0'
docker compose build firefox # expect 404 error

cd ..

@cypress-app-bot
Copy link

jennifer-shehane pushed a commit to MikeMcC399/cypress-docker-images that referenced this pull request Nov 5, 2025
@jennifer-shehane jennifer-shehane merged commit 12a796a into cypress-io:master Nov 5, 2025
12 of 39 checks passed
@MikeMcC399 MikeMcC399 deleted the fix/firefox-version-comparison branch November 5, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firefox installation script version string comparison flawed

3 participants