Page MenuHomePhabricator

MediaWiki JS documentation not loading
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
I see two spinning gears but nothing happens

mw core doc gears.png (383×661 px, 11 KB)

What should have happened instead?:
Show documentation

Other information (browser name/version, screenshots, etc.):
Tried with Firefox and Chromium, same result.

Event Timeline

Cannot reproduce with Chromium on https://doc.wikimedia.org/mediawiki-core/master/js/ ; can reproduce with Firefox 118 with some add-ons; cannot reproduce on another machine with Firefox 118 with no add-ons so I very much assume that it's a browser settings thing...

@Aklapper I figured anyone could reproduce this easily. Okay, here's the console info for Firefox 102:

Loading failed for the <script> with source “https://doc.wikimedia.org/mediawiki-core/master/js/data-09ee2e87d700cdcc44f40c7e47fc8718.js”. js:16:1
Uncaught TypeError: Docs.data is undefined
    <anonymous> https://doc.wikimedia.org/mediawiki-core/master/js/app-0c945a27f43452df695771ddb60b3d14.js:1
app-0c945a27f43452df695771ddb60b3d14.js:1:87592
Content Security Policy: The page’s settings blocked the loading of a resource at https://fonts.googleapis.com/css?family=Exo (“style-src”).

Firefox 118 (zero addons):

Loading failed for the <script> with source “https://doc.wikimedia.org/mediawiki-core/master/js/data-09ee2e87d700cdcc44f40c7e47fc8718.js”. js:16:80
Uncaught TypeError: can't access property "localStorageDb", Docs.data is undefined
    <anonymous> https://doc.wikimedia.org/mediawiki-core/master/js/app-0c945a27f43452df695771ddb60b3d14.js:1
app-0c945a27f43452df695771ddb60b3d14.js:1:87592
Content-Security-Policy: The page’s settings blocked the loading of a resource at https://fonts.googleapis.com/css?family=Exo (“style-src”). js:404:13

Chromium 108:

GET https://doc.wikimedia.org/mediawiki-core/master/js/data-09ee2e87d700cdcc44f40c7e47fc8718.js net::ERR_ABORTED 404
app-0c945a27f43452df695771ddb60b3d14.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'localStorageDb')
    at app-0c945a27f43452df695771ddb60b3d14.js:1:87605
(anonymous) @ app-0c945a27f43452df695771ddb60b3d14.js:1
(index):404 Refused to load the stylesheet 'https://fonts.googleapis.com/css?family=Exo' because it violates the following Content Security Policy directive: "style-src 'unsafe-inline' 'self'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

Chromium 116:

GET https://doc.wikimedia.org/mediawiki-core/master/js/data-09ee2e87d700cdcc44f40c7e47fc8718.js net::ERR_ABORTED 404
app-0c945a27f43452df695771ddb60b3d14.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'localStorageDb')
    at app-0c945a27f43452df695771ddb60b3d14.js:1:87605
(anonymous) @ app-0c945a27f43452df695771ddb60b3d14.js:1
(index):404 Refused to load the stylesheet 'https://fonts.googleapis.com/css?family=Exo' because it violates the following Content Security Policy directive: "style-src 'unsafe-inline' 'self'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

And yes, https://doc.wikimedia.org/mediawiki-core/master/js/data-09ee2e87d700cdcc44f40c7e47fc8718.js gives me a 404. I wonder which addon causes that. Even wget is affected for me, must be misconfigured, but I'm clueless as to how that's possible.

Likely a cache invalidation issue. This is master, so the urls change all the time (after each commit and merge basically). The current url for me was: https://doc.wikimedia.org/mediawiki-core/master/js/data-09e2f9d739eec7e7f66a57691ce0b97d.js

If you have an older index.html cached somewhere, then it might try to load the old javascript url, and that might not be available any longer.

This is duplicate with T257188: MediaWiki JS documentation on doc.wikimedia.org loads infintely, shows "TypeError: Docs.data is undefined"

Likely a cache invalidation issue. This is master, so the urls change all the time (after each commit and merge basically). The current url for me was: https://doc.wikimedia.org/mediawiki-core/master/js/data-09e2f9d739eec7e7f66a57691ce0b97d.js

If you have an older index.html cached somewhere, than it might try to load the old javascript url, and that might not be available any longer.

This is duplicate with T257188: MediaWiki JS documentation on doc.wikimedia.org loads infintely, shows "TypeError: Docs.data is undefined"

I don't understand. It works now.

In ALL browsers. I didn't change *anything*. And several of the browsers I tried couldn't have had browser cache of this site, or it would be long expired. What would be the odds anyway of three different browsers (Firefox DE, Firefox and Chromium) all of a sudden all having bad cache and also all three of them starting to work again at the same time?

I'm starting to doubt my perception of reality, maybe I finally lost it.

It can't be something like Varnish cache, right?

I suspect it's one of the intermediary cache layers, not the browser cache. Although it possibly can be made worse by browsers cache.

I've seen this same issue on similar websites that are behind cloudfront caching, where you sometimes hit different caching centers, with differing results. The index.html is cached too long, and the old JS files are invalidated too fast. "There are two hard problems in computer science: naming things, cache invalidation and off-by-1 errors"