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

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.

Details

Related Gerrit Patches:

Event Timeline

matmarex created this task.May 14 2018, 5:21 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 14 2018, 5:21 PM
matmarex claimed this task.May 14 2018, 5:22 PM

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

Jdforrester-WMF moved this task from Backlog to OOUI-0.27.1 on the OOUI board.May 23 2018, 9:09 PM
Jdforrester-WMF edited projects, added OOUI (OOUI-0.27.1); removed OOUI.
Jdforrester-WMF closed this task as Resolved.Jun 1 2018, 9:34 PM
Jdforrester-WMF removed a project: Patch-For-Review.
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