WT-841 Show correct Windows download link#1152
Conversation
d4abde9 to
8d4547c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1152 +/- ##
==========================================
+ Coverage 79.25% 79.30% +0.04%
==========================================
Files 135 137 +2
Lines 8375 8428 +53
==========================================
+ Hits 6638 6684 +46
- Misses 1737 1744 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Just proxying Hector's note from mozilla/bedrock#8635 (comment) for visibility. The TL;DR is the true x64 bitness is not provided by all user agents and is therefore not reliable. There should be a new query parameter available now locking the actual arch used for the installation that pointed back to this page. |
|
@janbrasna do you know how we can trigger the installer_arch param for testing? (Otherwise, I guess we just assume it will be there and use test urls that already include the installer_arch param) |
|
I believe it comes from within in-product flow, either from the stub installer unable to install, or the in-product updater not able to update(?) — @l-hedgehog Would you know how to trigger that for testing? (or who to ask on the installer team? TY) For the NSIS patch linked it's this: https://github.com/mozilla-firefox/firefox/blob/c1e060fc/browser/installer/windows/nsis/stub.nsh#L98-L101 so IIUC the archs are passed as literal |
|
@janbrasna Essentially you'll have to somehow interrupt the stub installer while it's downloading the full installer in the background. I guess you could try just disabling the network during that phase, or if the download finishes too quick to test, maybe adding an entry to hosts file and point downloads.mozilla.org to localhost. |
That's my understanding too. Thanks both for the tips. @bluewave41 for development I think the easiest route will be testing directly with the installer arch params:
We can try triggering from interrupting the stub installer to confirm these urls but I think it's safe to assume we can rely on the expected params being there |
|
Ahh I get the full scope now. Blocking /etc/hosts on Windows with: Brings you to this URL once pressing the OK/continue button when asked to retry.
|
OK that's kind of a good point. Let's cheat differently. Could you turn the extra query arg into a new body/html class (wherever is easier to reach from the jinja context you'll be touching) — say " |
7f8cc68 to
406ca56
Compare
That was my first thought but it seemed like I was touching a larger scope than I wanted to for something that will only be used on a single page. I replaced my code with a commit that adds an I think with this we should be able to also use user agent sniffing to apply the aarch64 class correctly as a quick Google search says they display like |
I think you're now offering win64 installers not only for |
Gotcha so. No installer_arch = win32 always |
d32296d to
04d7e72
Compare
maureenlholland
left a comment
There was a problem hiding this comment.
the installer arch work looks good to me 🎉
one blocking issue on Nightly download button for http://localhost:8000/en-US/channel/desktop/
We should confirm this PR passes existing integration tests before merge: https://mozmeao.github.io/platform-docs/operations/pipeline/#pushing-to-the-integration-tests-branch
(^ this may require some permissions you don't yet have, if you are blocked here, ask in www slack for permissions)
With any new download functionality, we should also add new tests
- jasmine: https://mozmeao.github.io/platform-docs/testing/jasmine/
- playwright: https://mozmeao.github.io/platform-docs/testing/playwright/
Jasmine is probably the best for the new logic in site.js, but we might need to adjust or update Playwright to confirm the channel page download functionality too
| display: none !important; | ||
| } | ||
|
|
||
| .windows.x64 .download-button .os_win64 { |
|
initial integration tests run: https://github.com/mozmeao/springfield/actions/runs/23549818496/job/68560367753 |
I perhaps forgot to mention only adding that template class override only for that one specific page where it's expected to be parsing the query string. Haven't checked actual feasibility in terms of what view handles that and how easy is to add the request args to the render context etc., so that was mainly thinking out loud, how to contain the change within the targeted page as much as possible.
That however sounds like this could affect any page running site.js, if a query param is added to any such arbitrary page? (Also, the issues surfaced by integration tests on other pages not subject to this change per se means the potential to change CTAs behavior is currently site-wide.) Why I'm mentioning it is, without deeper understanding of when the
It was not included in the Client/site.js because it is not exposed and most user agent strings realistically just freeze the values, or, was not deemed reliable even when using the JS navigator data. It might work for some browsers using client-hints, but e.g. will definitely not work if opened in Firefox. The code used to be there, but was never used: mozilla/bedrock#8454 (comment) |
04d7e72 to
36b9526
Compare
|
After all the feedback and such I stepped back and scrapped what I had to restart. I've scoped it now to just the I removed some code someone added to only show the |
|
Right I knew I wanted to add more notes to the above, incl. specifically mentioning how I'm forcing the CTAs to show, sorry forgot — basically that should be the underlying nonJS version, or, shown in cases no supported UA is detected. I usually use Focus iOS for that, which has a weird enough UA;D — but the easiest is "non matching" products, e.g. opening Nightly or ESR release from iOS, as these do not have a product for iOS — so all other options get listed instead. Responsive mode with iPad UA should do the trick for you: (reload after changing the device/UA to force new parsing) (I also wanted to understand the linked tickets with reasoning when the special casing was added back then, still catching up on code archaeology, will post what I learn.) |
|
The rationale for these was here: |
|
Another thing I think is worth pointing out as I catch up on these bugs is the 32 and 64 bit stub installers on https://www.firefox.com/en-US/firefox/149.0/releasenotes/ are both the same file. The OS detection in the stub isn't just nightly specific. I'm still reading to try and find out why this was only done for nightly |
|
Hmmh right, download.mozilla.org/?product=firefox-stub&os=win64&lang=en-US and download.mozilla.org/?product=firefox-stub&os=win&lang=en-US serve the exact same binary, true. Because, well, there's no 64-only stub installer; compare:
Notably, this Nightly special casing comes from Fx 54~era, and mostly likely before bouncer; when bedrock linked the FTP archive downloads directly, so it was doing its own logic. Maybe that was the first universal stub and the subsequent Release channel was supposed to follow the same the riding trains? Maybe all of that is completely noop these days, and should be left to what release above does, serve the same for both … or, dunno, maybe the extra buttons although serving the same bouncer link most of time can be forced to point to full installer instead, and THEN they are helpful there's more of them? But yea good call pointing this out, this had been godfathered from redesign to redesign, and nobody really wanted to touch it, but it seems outdated these days — or, the difference between nightly and the rest looks weird (even though the nightly combo makes more sense in a way). |
maureenlholland
left a comment
There was a problem hiding this comment.
This seems a well-scoped update for the installer-arch pages
- new force arch param on download helper defaults to None
- only the installer arch page calls the helper with force arch argument
- "force-" css classes will only take effect when force arch is not None
I don't have any context to add around the Nightly special casing. It seems like a docs update might be helpful here if we need to keep it.
r+ but will call in another dev to check on the Nightly case
| await expect(downloadButtonRelease).toBeVisible(); | ||
| }); | ||
|
|
||
| test('Download Firefox (Windows) forced win64 architecture', async ({ |
There was a problem hiding this comment.
non-blocking is it also worth checking the unexpected win downloads are not visible?
| # Firefox Nightly: The Windows stub installer is now universal, | ||
| # automatically detecting a 32-bit and 64-bit desktop, so the | ||
| # win64-specific entry can be skipped. | ||
| if channel == "nightly": |
There was a problem hiding this comment.
@stevejalim do you know if this special casing is still necessary (related tests here: https://github.com/mozmeao/springfield/pull/1152/changes#diff-787fdc6db4abb92a972f332cdf45bf50fbe8d61618b74f507a937285e8ff6139L173)
More detail in comments: #1152 (comment)
There was a problem hiding this comment.
Keeping this behavior makes it confusing and would make the CSS look worse
Release
installer_arch=1? show .win
installer_arch=2? show .win64
installer_arch=3? show .win64-aarch64
Nightly
installer_arch=1? show .win
installer_arch=2? show nothing. win64 sets the platform to win but arch 2 shows win64 which doesn't exist
installer_arch=3? show .win64-aarch64
So now we need to specifically CSS nightly and show .win for forced arch 1 and 2. This also means you can't get a 64 bit installer for nightly from this page despite one existing. The stub installers are universal but these full installers are different
https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-151.0a1.en-US.win32.installer.exe
https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-151.0a1.en-US.win64.installer.exe
matthew:~/Downloads$ md5sum '/home/matthew/Downloads/firefox-151.0a1.en-US.win64.installer.exe'
a662d6d7a3d2f19f4d638bf57a5b90bd /home/matthew/Downloads/firefox-151.0a1.en-US.win64.installer.exe
matthew:~/Downloads$ md5sum '/home/matthew/Downloads/firefox-151.0a1.en-US.win32.installer.exe'
0140dd3abcbb070f8889d4d8b83fc653 /home/matthew/Downloads/firefox-151.0a1.en-US.win32.installer.exe




One-line summary
Windows users are shown the 32 bit download link on https://www.mozilla.org/firefox/installer-help/?channel=release regardless of their current architecture.
Issue / Bugzilla link
https://bugzilla.mozilla.org/show_bug.cgi?id=1564333
Testing
Before each step remember to change the HTML class OS to "windows"
The x64 doesn't matter as it doesn't affect the shown download button. Only "win" is ever displayed
https://download.mozilla.org/?product=firefox-latest-ssl&os=win&lang=en-UShttps://download.mozilla.org/?product=firefox-latest-ssl&os=win&lang=en-UShttps://download.mozilla.org/?product=firefox-latest-ssl&os=win&lang=en-UShttps://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-UShttps://download.mozilla.org/?product=firefox-latest-ssl&os=win64-aarch64&lang=en-US