-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instant Loading: External fetch
calls break on Firefox
#6565
Comments
Unfortunately, instant loading breaks fetch calls to external websites in Firefox. See squidfunk/mkdocs-material#6565 for more information.
Unfortunately, instant loading breaks fetch calls to external websites in Firefox. See squidfunk/mkdocs-material#6565 for more information.
Thanks for reporting. Adding
Two solutions:
Closing as resolved by customization. This is not something we're canonically optimizing for. However, if you find the problem in instant loading that fixes the issue, you can create a PR and we can discuss merging it. |
I've tested this again with the latest refactoring of instant navigation in #6662 and it seems we could fix the reported problem as well! We are still waiting for some users to test drive the latest changes on their projects, so we know that we did not introduce new bugs. We're waiting eagerly to release the fixes
To fix this, you should either put all JavaScript code inside: document$.subscribe(() => {
// ... all code goes here
}) ... or use |
I've reopened the issue to signal that we fixed the bug, and that it's awaiting a release. |
Released as part of 9.5.5. |
Hi Martin, We do not use the standard Markdown link syntax because there is much more to this setup. I excluded all of it to make your debugging easier. We essentially build a fancy system that polls our Nexus repo for all available dev builds and releases. The user can easily download them on the docs page. Sometimes, the script also needs to rename the downloaded artifact which is why we create the link in that weird way. |
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
chromium --user-data-dir="/tmp/chromeDeleteMe/" --disable-web-security
Check docs/webCode/download.js, the fetch call couldn't get more vanilla than this. It should definitely work.
Browser
Firefox
Before submitting
The text was updated successfully, but these errors were encountered: