puppeteer: [Bug]: Get a 404 when trying to download Firefox during its version transition
Bug expectation
I expect to not have any issue while downloading Firefox.
Instead of using the inaccurate data from firefox_versions.json
, maybe it could use:
https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US
Bug behavior
- Flaky
Minimal, reproducible example
Just update puppeteer when Firefox is transitioning.
Error string
Error: Download failed: server returned code 404. URL: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-116.0a1.en-US.linux-x86_64.tar.bz2
Puppeteer configuration
No response
Puppeteer version
20.7.2
Node version
v18.15.0
Package manager
npm
Package manager version
9.5.0
Operating system
Windows
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15
That’s right. Firefox buildIds are timestamps with the format
YYYYMMDDhhmmss
. We ensure the uniqueness of these dates by relying on the timestamp of the commit that the current nightly is based upon.Yeah, I’m not aware of any place that exposes a string like
YYYY/MM/YYYY-MM-DD-hh-mm-ss
or the full URL of a nightly.I’m sorry, I’m not sure to follow. Could you expand on this?
That’s right. Mozilla has a stricter policy before builds other than nightlies reach https://archive.mozilla.org/pub/firefox/release/. Several teams are involved to ensure the quality of the build. This process also ensure versions like 115.0b8 are unique.
I didn’t manage to find one. I remember we had conversation about this topic. I’ll file a bug.
I’m sorry, that will require some development. I don’t think Mozilla has the bandwidth to implement this, at the moment. Mozilla provides multiple ways to download either the latest build or a specific one. We also have https://buildhub.moz.tools/ which provides an ElasticSearch endpoint to look build up (https://buildhub2.readthedocs.io/en/latest/user.html#id1).
Awesome! 😃 Yes, a similar approach works on DevEdition, Beta, Release, and ESR. For all these cases, fetch https://product-details.mozilla.org/1.0/firefox_versions.json,
Then, you can build URLs like:
https://archive.mozilla.org/pub/devedition/releases/115.0b8/linux-x86_64/en-US/firefox-115.0b8.tar.bz2
(replace
devedition
byfirefox
for beta, release and ESR)Yes! 😃 Once you know the buildId, you can build this kind of URLs:
https://archive.mozilla.org/pub/firefox/nightly/YYYY/MM/YYYY-MM-DD-hh-mm-ss-mozilla-central/{path_to_binary}
E.g.: https://archive.mozilla.org/pub/firefox/nightly/2023/06/2023-06-20-09-44-33-mozilla-central/
The ideal solution would be for Mozilla to automate this manual process[1]. In the meantime, falling back to the previous major version of nightly should do the trick. By the way, only Nightly is impacted by this bug. DevEdition, Beta, Release, and ESR are all fully automated which means the data at https://product-details.mozilla.org/1.0/firefox_versions.json is accurate.
[1] https://docs.mozilla-releng.net/en/latest/procedures/release-duty/merge-duty/merge_duty.html#bump-nightly-version-and-release-dates-in-shipit