-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Context
We use mkdocs-material to build our project's entire homepage. Therefore we have build a customized page that serves as a download page for our builds.
This is achieved with a small JS script that is added to that specific page and fetches the builds from our nexus repository.
Bug description
When instant loading is enabled, fetch calls to external domains fail in Firefox.
The developer console displays Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.
The network tab shows NS_BINDING_ABORTED.
The same JS script work fine when instant loading is not enabled.
It always works in Chromium based browsers, no matter if instant loading is enabled.
The only known workaround is to disable instant loading.
Related links
There are four open bugs for instant loading since it is scheduled for a rework.
#6345, #6334, #6275, #6102
None of them specifically adress this issue.
I also though about instant loading's quirk that is described in #5925 and in the docs. I don't think it is related though.
Reproduction
9.5.3+insiders.4.48.0-instant-loading-breaks-fetch-firefox.zip
Steps to reproduce
- Setup the reproduction example
- Setup a Firefox and a Chromium based browser to work around CORS (our build repo only allows downloads from docs.betonquest.org).
- For the chromium based browser this can be done by starting the browser via CMD:
chromium --user-data-dir="/tmp/chromeDeleteMe/" --disable-web-security - For Firefox I used https://addons.mozilla.org/en-US/firefox/addon/cors-everywhere/
- Open the docs index page with Firefox and a Chromium based browser.
- Open the developer console in both.
- Click the Download button.
- Observe the different behaviour where Chromium successfully downloads the builds but Firefox fails.
- Disable instant loading
- Observe that now both browser are able to download the builds.
Check docs/webCode/download.js, the fetch call couldn't get more vanilla than this. It should definitely work.
Browser
Firefox
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.