Page MenuHomePhabricator

Upload Wizard fails to load because of RL dependency race condition
Closed, ResolvedPublic

Description

1<matanya> is upload wizard broken ? UploadWizard uses JavaScript for an improved interface. Your browser either does not support JavaScript or has JavaScript turned off, so we are showing you a simple upload form.
2<prtksxna> matanya: Its not supposed to be. Where are you seeing this?
3<matanya> prtksxna: i get it on uploadwizard page (spaecial:upload) once every few minutes
4<prtksxna> matanya: Sorry, I didn't realize that commons was the only wiki with the extension enabled.
5<prtksxna> matanya: Strange. I don't see it happening here. What browser/os are you on?
6<matanya> firefox on linux
7
8prtksxna tries with FF
9<prtksxna> Looks alright on MacOS.
10<prtksxna> matanya: The error isn't consistent for you, right?
11<matanya> yes
12<prtksxna> I took a look at the logs and I can't see anything that could have caused this. There wasn't going to be a commit message saying "Breaking JS support in unpredictable ways" anyway :P
13<bawolff> lol
14<bawolff> Well commons community would be rioting if its broken in production, or do you just mean on master
15<prtksxna> master (53059a2) is working on FF on MacOS
16<matanya> prtksxna: I don't know, don't have a smart way to reproduce apart from many refreshes
17<matanya> prtksxna: "NS_ERROR_DOM_QUOTA_REACHED: Persistent storage maximum size reached" DOMException [NS_ERROR_DOM_QUOTA_REACHED: "Persistent storage maximum size reached"
18<matanya> code: 1014
19<matanya> nsresult: 0x805303f6
20<matanya> location: https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:174]
21<matanya> prtksxna: also: https://dpaste.de/XyQ6
22<matanya> does that help prtksxna ?
23<prtksxna> matanya: Taking a look now. My computer timed out :\
24
25prtksxna shakes fist at localStorage
26<prtksxna> FF seems to have a different limit than Chrome…
27<prtksxna> brb
28<prtksxna> matanya: A local solution would be clearing your cache
29<matanya> prtksxna: did that, and the other one popped up (https://dpaste.de/XyQ6)
30<prtksxna> matanya: Can you run localStorage.clear() in your dev console?
31<matanya> undefined
32<prtksxna> matanya: That is strange, OO is clearly defined as a dependency, and has been since Mon Dec 8.
33<prtksxna> matanya: Cool
34<matanya> prtksxna: it is still happenning even after clearing
35<prtksxna> matanya: Not "NS_ERROR_DOM_QUOTA_REACHED: Persistent storage maximum size reached", right?
36<matanya> yes, that
37<prtksxna> /o\
38<matanya> but the OO is more worring
39<prtksxna> Can you type "OO" in your console?
40
41prtksxna is unable to reproduce any of it here :(
42<matanya> Object { initClass: oo.initClass(), inheritClass: oo.inheritClass(), mixinClass: oo.mixinClass(), getProp: oo.getProp(), setProp: oo.setProp(), cloneObject: oo.cloneObject(), getObjectValues: oo.getObjectValues(), compare: oo.compare(), copy: oo.copy(), getHash: oo.getHash(), 9 more… }
43<matanya> prtksxna: might it be a load order issue ?
44<prtksxna> matanya: It could, but looking at https://github.com/wikimedia/mediawiki-extensions-UploadWizard/blob/master/UploadWizardHooks.php#L530, I am not sure how.
45<prtksxna> I've hear Resource Loader does take up a lot of localStorage, and if you're running out of that, it might be failing at doing its job right
46<prtksxna> Which is why OO isn't loaded on time either.
47<matanya> prtksxna: so fixing the local storage for firefox seems to be the right action, is it ?
48<prtksxna> The way I am looking at it, yes. Create a phab task I guess, marktraceur would have much a better understanding of this anyway.
49<thedj> localStorage is basically broken richt now
50<thedj> there is SO much in it, if you use more than one WMF site.

Also throws "Exception in module-execute in module uw.ui.Step:" load.php:175:967.

1"Exception in module-execute in module uw.ui.Step:" load.php:175:967
2"ReferenceError: OO is not defined" ReferenceError: OO is not defined
3Stack trace:
4@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=schema.UploadWizardFlowEvent%2CUploadWizardStep%2CUploadWizardTutorialActions%2CUploadWizardUploadActions%2CUploadWizardUploadFlowEvent%7Cuw.EventFlowLogger%2Cbase%7Cuw.controller.Deed%2CDetails%2CStep%2CThanks%2CTutorial%2CUpload%2Cbase%7Cuw.model.Description%2Cbase%7Cuw.ui.Deed%2CDeedPreview%2CDetails%2CStep%2CThanks%2CTutorial%2CUpload%2CWizard%2Cbase&skin=vector&version=20150513T075127Z&*:22:95
5runScript@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:160:951
6execute/</checkCssHandles@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:161:493
7execute@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:162:272
8handlePending@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:159:495
9runScript@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:160:963
10execute/</checkCssHandles@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:161:493
11execute@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:162:272
12mw.loader</<.implement@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20150512T181929Z:168:770
13@https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=schema.UploadWizardFlowEvent%2CUploadWizardStep%2CUploadWizardTutorialActions%2CUploadWizardUploadActions%2CUploadWizardUploadFlowEvent%7Cuw.EventFlowLogger%2Cbase%7Cuw.controller.Deed%2CDetails%2CStep%2CThanks%2CTutorial%2CUpload%2Cbase%7Cuw.model.Description%2Cbase%7Cuw.ui.Deed%2CDeedPreview%2CDetails%2CStep%2CThanks%2CTutorial%2CUpload%2CWizard%2Cbase&skin=vector&version=20150513T075127Z&*:34:42

The persistent DOM storage error is always a fluke - the OOJS error is the real one. Fixed in the patch.

Event Timeline

Matanya created this task.May 13 2015, 10:06 AM
Matanya raised the priority of this task from to Needs Triage.
Matanya updated the task description. (Show Details)
Matanya added a project: UploadWizard.
Matanya added a subscriber: Matanya.
Restricted Application added a project: Multimedia. · View Herald TranscriptMay 13 2015, 10:06 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Matanya updated the task description. (Show Details)May 13 2015, 10:09 AM
Matanya set Security to None.
Matanya added a subscriber: MarkTraceur.
Prtksxna updated the task description. (Show Details)May 13 2015, 10:09 AM
Prtksxna removed a subscriber: MarkTraceur.

In addition: It is hard to reproduce, as it doesn't happen any time. The only way is to try hard refresh many times.

I'm guessing a missing RL dependency race condition. Fixing.

Change 210707 had a related patch set uploaded (by MarkTraceur):
Add oojs to uwui.Step dependencies

https://gerrit.wikimedia.org/r/210707

MarkTraceur renamed this task from Upload Wizard fails to load with: "NS_ERROR_DOM_QUOTA_REACHED: Persistent storage maximum size reached" to Upload Wizard fails to load because of RL dependency race condition.May 13 2015, 4:25 PM
MarkTraceur updated the task description. (Show Details)

Change 210707 merged by jenkins-bot:
Add oojs to uw.ui.Step dependencies

https://gerrit.wikimedia.org/r/210707

Prtksxna closed this task as Resolved.May 14 2015, 4:09 AM