Page MenuHomePhabricator

[BUG] Unresponsive script when loading articles in non-default language [8 hours]
Open, Needs TriagePublicBUG REPORT

Description

What is the problem?

JavaScript appears to hang when accessing articles in a language different to the wiki's default language.

I have seen it happen on all 5 wikis we support, in different languages.

It does not happen every time.

Steps to reproduce problem

Seen with articles such as:

Expected behavior: Article loads
Observed behavior: Article continues to load; Browser eventually warns you of a long running/unresponsive script.

Environment

Browser: Chromium 73 and Firefox 60

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2019, 11:18 AM
ifried added a subscriber: ifried.Sep 17 2019, 10:25 PM

@dom_walden :

When I tried to access the links provided, the articles appeared to load fine (see some examples below). Could this be because I first accessed them before enabling WWT (even though I cleaned the cache before accessing the again)?

ifried renamed this task from [BUG] Unresponsive script when loading articles in non-default language to [BUG] Unresponsive script when loading articles in non-default language [8 hours].Sep 17 2019, 11:23 PM
ifried moved this task from To be estimated/discussed to Estimated on the Community-Tech board.

@ifried Are you using the gadget? I was using the extension. I tried briefly with the gadget, but could not reproduce either.

@dom_walden Ah, thanks for the clarification!

@Mooeypoo This bug may only be reproducible with the extension rather than the gadget. Do you know why that may be?

@dom_walden Ah, thanks for the clarification!
@Mooeypoo This bug may only be reproducible with the extension rather than the gadget. Do you know why that may be?

Nooo... but... it is very interesting.

Language blob is just an object, it *should* work. And since the extension injects the script into the page, it *acts* like a gadget.

... so I have no idea why it doesn't load, but the fact it's only happening with the extension is useful as a starting point, for sure.

Mooeypoo added a comment.EditedSep 20 2019, 7:33 PM

@dom_walden I just re-tested this in an effort to figure out what's going on, and I can no longer reproduce it...

Can you retest? I tested both the extension and user script.

If you want, I have the user script on my userpage, you can load it on the supported wikis by putting this in your /common.js

// WhoWroteThat test
mw.loader.load( 'https://www.mediawiki.org/w/index.php?title=User:MSchottlender-WMF/WhoWroteThat.js&action=raw&ctype=text/javascript' );

(Just beware of loading it alongside the extension; if both load it might cause conflicts)

I can't reproduce it anymore... We have no translations yet, so it looks weird (especially since it's forcing RTL for an English text) but the code runs fine, and everything works. I was testing on this: https://en.wikipedia.org/wiki/William_Hayden_English?uselang=he

@dom_walden I just re-tested this in an effort to figure out what's going on, and I can no longer reproduce it...
Can you retest? I tested both the extension and user script.

With commit 090bf2462268873f10b39a22caf5017cce7c3082 of WWT, I could reproduce on Chromium 73 (Debian) and Firefox 69 (Win10) with https://de.wikipedia.org/wiki/Bertha_Lamme?uselang=he and on Chromium 76 (Debian) with https://de.wikipedia.org/wiki/Bethel_Township_(Clark_County,_Ohio)?uselang=ar (the previous link worked ok on 76).

Could this have been related to the bundled jQuery? I can't reproduce it with current master (which is now without jQuery).

I had this issue when I tried https://eu.wikipedia.org/wiki/Thorichthys_ellioti?uselang=fr (on master) in Chromium. @ifried is reporting similar issues with the deployed Firefox extension.

After enabling the beta Firefox add-on, I received the following message on Wikipedia pages: "A web page is slowing down your browser. What would you like to do?" Am I doing something wrong?