Page MenuHomePhabricator

NWE doesn't load in Firefox ESR
Closed, ResolvedPublic1 Estimated Story Points

Description

NWE currently doesn't load for me. While due to T185303 I'm not perfectly sure whether one of my scripts causes this, I'm pretty sure that this isn't the case, as it also happens in Monobook skin, where my scripts don't load.

Steps to reproduce:

  1. Open a random page (if you have only a single tab for visual mode, use one in a namespace with source editing only).
  2. Click "Edit source".

Expected:
NWE should load or at least show a visible error.

Actual:
The toolbar is shown in the background, the progressbar shows some progress until about 70 %, no error is logged, but the editor won't load.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Loading VE first and then switching to source mode works without problems (but of course only for pages where the visual mode is available).

Does it fail when you aren't logged in?

As NWE is only available for logged in users (or is there a way I don't know of?), I can't test it.
The API query for metadata and text succeeds as shown in the net console:

nwe.png (944×1 px, 289 KB)

After this, the process is stuck.
As you can see in the background tab, there are some intermittent server errors (in this case: Request from 2003:cb:ebd3:a4f8:84:fd5a:3484:8fd5 via cp3040 frontend, Varnish XID 228557396, Error: 503, Backend fetch failed at Sat, 20 Jan 2018 09:20:17 GMT), which might be related.

Schnark renamed this task from NWE doesn't load to NWE doesn't load in Firefox.Jan 20 2018, 9:53 AM

This doesn't occur in Vivaldi, so this is seems to be a problem with Firefox, either Firefox in general, or Firefox 52 ESR, which I'm forced to use.

I get an exception on
this.$element[0].setSelectionRange(0, 0);
inside the VeUiMwTempWikitextEditorWidget constructor (since it is inside a promise handler, jQuery silently eats the exception and doesn't tell you anything about it).

Did the exception have a message? It's not immediately obvious how that line would thrown an exception...

I get a system DOM exception on Firefox ESR. Looks like you can't call setSelectionRange on an unattached DOM node. Works fine in Chrome and Firefox Quantum though.

Change 405662 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] NWE: Don't attempt to set selection on unattached textarea

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

Esanders renamed this task from NWE doesn't load in Firefox to NWE doesn't load in Firefox ESR.Jan 22 2018, 6:29 PM

Change 405662 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] NWE: Don't attempt to set selection on unattached textarea

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

Change 405933 had a related patch set uploaded (by Jforrester; owner: Esanders):
[mediawiki/extensions/VisualEditor@wmf/1.31.0-wmf.17] NWE: Don't attempt to set selection on unattached textarea

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

Change 405933 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.31.0-wmf.17] NWE: Don't attempt to set selection on unattached textarea

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

Mentioned in SAL (#wikimedia-operations) [2018-01-24T01:10:00Z] <matt_flaschen> Deployed 'T185304: NWE: Don't attempt to set selection on unattached textarea' in extensions/VisualEditor

Deskana assigned this task to Esanders.
Deskana triaged this task as Medium priority.
Deskana set the point value for this task to 1.
Deskana moved this task from To Triage to TR1: Releases on the VisualEditor board.