Page MenuHomePhabricator

VisualEditor fails to load on first-run, throwing JS SecurityError due to ? reading from localStorage in maybeShowWelcomeDialog
Closed, ResolvedPublic1 Estimated Story Points

Description

On https://meta.wikimedia.org/w/index.php?title=User:FrussiWM&veaction=edit as unregistered user (before the page was created), the VE seems to load but when the loading bar is full it stops and I can't proceed to the editor

This page is using the deprecated ResourceLoader module "jquery.ui.widget".  load.php:18:86
This page is using the deprecated ResourceLoader module "jquery.ui.core".
Please use "mediawiki.ui.button" or "oojs-ui" instead.  load.php:11:84
This page is using the deprecated ResourceLoader module "jquery.ui.position".  load.php:40:291
SecurityError: The operation is insecure.  load.php:301
	ve.init.mw.ArticleTarget.prototype.maybeShowWelcomeDialog https://meta.wikimedia.org/w/load.php:301:683
	ve.init.mw.DesktopArticleTarget.prototype.surfaceReady https://meta.wikimedia.org/w/load.php:1107:102
	bound  self-hosted

Event Timeline

Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
Jdforrester-WMF subscribed.

From the error, like the browser JS-fatals on localstorage reads? Odd.

Jdforrester-WMF renamed this task from VisualEditor fails to load to VisualEditor fails to load on first-run, throwing JS SecurityError due to ? reading from localStorage in maybeShowWelcomeDialog.Dec 15 2016, 6:39 PM

It looks like the behaviour that Chrome & FF exhibit when you disable cookies/localStorage will break this code (though I'm not sure what exactly causes "The operation is insecure" here), so let's assume that's the problem.

Change 327663 had a related patch set uploaded (by Alex Monk):
Wrap localStorage.getItem calls in try { ... } catch () {}

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

Change 327663 merged by jenkins-bot:
Wrap localStorage.getItem calls in try { ... } catch () {}

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