Skip to content

Instant Loading: External fetch calls break on Firefox #6565

@SaltyAimbOtter

Description

@SaltyAimbOtter

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

  1. Setup the reproduction example
  2. Setup a Firefox and a Chromium based browser to work around CORS (our build repo only allows downloads from docs.betonquest.org).
  1. Open the docs index page with Firefox and a Chromium based browser.
  2. Open the developer console in both.
  3. Click the Download button.
  4. Observe the different behaviour where Chromium successfully downloads the builds but Firefox fails.
  5. Disable instant loading
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions