Page MenuHomePhabricator

VisualEditor sometimes not available
Closed, ResolvedPublic1 Estimated Story Points

Description

svwiki users NH and Larske report at https://sv.wikipedia.org/wiki/Wikipedia:Wikipediafr%C3%A5gor#Fliken_.22Redigera.22_.28dvs_Visual_Editor.29_finns_ibland_inte that VisualEditor is sometimes not available.

The message in the console is "Your skin is incompatible with VisualEditor. See https://www.mediawiki.org/wiki/VisualEditor/Skin_requirements for the requirements.".

This only happens sometimes (one in 5, or one in 10 page loads), indicating a race condition.

Event Timeline

It can be added the same thing happens when logged out (in a new browser session), so it should not have to do with user specific settings etc.

When logged in, Visual Editor seems absent in about 1 of 5 times. When not logged in the error appears less frequently, maybe 1 in 20 or 50 times.

For me this happens in Safari 10.1. User:Larske reports other web browsers as well.

I cannot replicate this on en.wikipedia.org or fr.wikipedia.org.

I saw this happening very reliably on it.wikipedia.org when looking at another bug report.

It's possible that a user script or gadget is re-writing the page and so sometimes (depending on timing) when VisualEditor looks at the page it looks like we won't be able to load?

Jdforrester-WMF changed the task status from Open to Stalled.Apr 25 2017, 7:14 PM
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF edited projects, added VisualEditor-MediaWiki; removed Regression.

Stalled on reproduction steps (ideally from our end).

Change 350471 had a related patch set uploaded (by Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] init: Relax checks for required skin elements to avoid false positives

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

matmarex added a subscriber: PerfektesChaos.

As @PerfektesChaos noticed on T164061, it looks like this is a race condition caused by not waiting for DOM ready.

Change 350471 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] init: Fix checks for required skin elements to avoid false positives

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

Jdforrester-WMF assigned this task to matmarex.
Jdforrester-WMF removed a project: Patch-For-Review.

Hopefully fixed.

Change 351282 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@REL1_29] init: Fix checks for required skin elements to avoid false positives

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

Change 351282 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@REL1_29] init: Fix checks for required skin elements to avoid false positives

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