Page MenuHomePhabricator

Warnings in Firefox debugger when using debug=1 about broken source maps for OOUI modules
Closed, ResolvedPublic

Description

When viewing a page with debug=1 (e.g. https://en.wikipedia.org/wiki/The_Fighting_Temeraire?debug=1), Firefox prints errors to the browser console about broken source maps for OOUI modules:

Source map error: request failed with status 400
Resource URL: https://en.wikipedia.org/w/resources/lib/oojs-ui/oojs-ui-core.js?db4bf
Source Map URL: oojs-ui-core.js.map

image.png (1×1 px, 333 KB)

It's trying to load the source map from https://en.wikipedia.org/w/resources/lib/oojs-ui/oojs-ui-core.js.map, which responds with only the text Invalid file type. Presumably there is a whitelist of file types we serve in production, and .map is not on it.

The warnings are harmless, but unprofessional, and they make our users uneasy when we ask them to load a page with debug=true and copy the console output :)

The Popups extension also generates source maps and works around this by using .json extension for them, e.g. https://en.wikipedia.org/w/extensions/Popups/resources/dist/index.js.json.

Event Timeline

Change 433011 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] Use .json extension for source maps

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

Change 433013 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] Use .json extension for OOUI source maps

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

Change 433011 merged by jenkins-bot:
[oojs/ui@master] build: Use .map.json extension for source maps

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

Change 433013 merged by jenkins-bot:
[mediawiki/core@master] Use .json extension for OOUI source maps

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

Vvjjkkii renamed this task from Warnings in Firefox debugger when using debug=1 about broken source maps for OOUI modules to nzcaaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed matmarex as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
Esteban16 renamed this task from nzcaaaaaaa to Warnings in Firefox debugger when using debug=1 about broken source maps for OOUI modules.Jul 1 2018, 2:32 AM