Page MenuHomePhabricator

worker-javascript.js is 404 when editing
Closed, ResolvedPublic

Description

https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-collapsibleTables.js&action=edit results in the following js error:

"NetworkError: 404 Not Found - https://www.mediawiki.org/w/worker-javascript.js"

worker...ript.js
WorkerErrorEvent { message="Script file not found: worker-javascript.js", lineno=0, type="error", more...}
mode-c...8777074 (line 1)

uncaught exception: [object WorkerErrorEvent]

Script file not found: worker-javascript.js


Version: 1.22.0
Severity: normal

Details

Reference
bz46588

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:21 AM
bzimport set Reference to bz46588.
bzimport added a subscriber: Unknown Object (MLST).

What gadgets, user scripts or browser scripts do you have that load a file called worker-javascript.js?

That file isn't anywhere in any Wikimedia maintained codebase that I know of.

Looks like it is related to https://github.com/ajaxorg/ace/issues/655 and the ACE editor which is loaded from https://toolserver.org/~brion/extensions/CodeEditor/ which comes from the "Code editor" gadget.

(In reply to comment #2)

Looks like it is related to https://github.com/ajaxorg/ace/issues/655 and the
ACE editor which is loaded from
https://toolserver.org/~brion/extensions/CodeEditor/ which comes from the
"Code
editor" gadget.

I ran into this issue with the JSON background linter, which the Ace editor kept trying to load in the background when I enabled it on the Schema namespace on metawiki. CodeEditor uses a CommonJS-like require() that has been superficially hacked to work with ResourceLoader.

I thought I fixed it in Gerrit change Ia60ef2122, so I'm not sure why you're running into it. I'll poke around a bit.

(In reply to comment #3 by Ori)

I'll poke around a bit.

Ori: Did you have time to do that?

(In reply to comment #4)

Ori: Did you have time to do that?

Sorry for the delay in updating this bug. I did poke around and could not reproduce the bug. I'm not an admin on mediawikiwiki and so was not able to test Mark's URL (from comment #2) directly, but an admin just checked and confirmed that there is no 404 request to worker-javascript.js.

This is easy to reproduce with the "Code editor" gadget enabled on mediawiki.org.

It's something to do with the experimental "Code editor" gadget that Brion made a while ago. I'd recommend simply disabling the gadget. :-)

https://toolserver.org/~brion/extensions/CodeEditor/modules/ace/ <-- "worker-javascript.js" is here, it looks like.

https://www.mediawiki.org/wiki/MediaWiki:Gadget-CodeEditor.js is where to start to debug this properly. But really, let's just disable the gadget and enable the CodeEditor extension on JS/CSS pages (the subject of bug 39653).

Ah. Brion simply needs to update his clone of the extension on the ToolServer so that it includes the patch that disables background linting for JS pages (8ee19004b3).