Closed
Bug 1345533
Opened 7 years ago
Closed 6 years ago
show source-map failures to user
Categories
(DevTools :: General, defect, P3)
DevTools
General
Tracking
(firefox57 fixed)
RESOLVED
FIXED
Firefox 57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: tromey, Assigned: tromey)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
A reasonably common scenario is that a user has code with source maps but the source maps don't work for some reason. The devtools should be able to explain what went wrong. You can find all kinds of examples of this on stack overflow, e.g. http://stackoverflow.com/questions/32703806/why-are-our-source-maps-broken-in-production
I agree this is very important for a good source map experience. There are many ways things can fail, and currently failures are silent, so you have no way to diagnose the issue.
status-firefox55:
affected → ---
Priority: -- → P2
Assignee | ||
Comment 2•7 years ago
|
||
See https://bugzilla.mozilla.org/show_bug.cgi?id=1359144#c12 for one spot to possibly fix.
Assignee | ||
Comment 3•7 years ago
|
||
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1167188 for an idea.
Comment 4•7 years ago
|
||
bug 1167188 looks like a good way to handle this. Showing (source map) network errors in the network panel seems like the best solution to me. We might also want something in the console as long as there are filter options for it people can hide the source map messages they don't want to see. This bug could be for handling that in the console, but if they appear as regular network errors in the console I think that's fine as well.
Assignee | ||
Comment 5•7 years ago
|
||
Another idea I had was, in the console, showing some kind of icon next to a location ("mumble.js:73") indicating that source map fetching was underway. Then the icon could change to some sort of error indicator if something went wrong. This would at least show some of the reasons source maps can fail. It wouldn't handle the case where the bundle was generated incorrectly and doesn't have the magic comment at all; which I can imagine wishing to be informed of.
Comment 6•7 years ago
|
||
I like it. Perhaps if there was an error you could click the icon and jump to the network panel?
Assignee | ||
Updated•7 years ago
|
Priority: P2 → P3
Assignee | ||
Comment 7•6 years ago
|
||
One additional to-do item here is to surface the error cases from devtools-source-map. There's at least one spot where console.error is used, but also some spots where invalid things are just dropped.
Assignee | ||
Comment 8•6 years ago
|
||
I talked with :bgrins about this a bit in SF. Our conclusion was to notify the user via console logs. Using the network monitor didn't seem that great; partly because it's difficult to implement (hard to get all the HAR data for a client-side request), and partly because it seems like it would obscure the messages. I don't recall offhand why we dismissed the idea of some kind of icon in the frame component.
Assignee: nobody → ttromey
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 12•6 years ago
|
||
mozreview-review |
Comment on attachment 8893546 [details] Bug 1345533 - report source map errors to the web console; https://reviewboard.mozilla.org/r/164618/#review170078 Nice, this just needs a rebase for toolbox.js ::: devtools/client/framework/toolbox.js:558 (Diff revision 1) > return (urlInfo) => { > - return target.getOriginalURLs(urlInfo).catch(console.error); > + return target.getOriginalURLs(urlInfo) > + .catch(text => { > + let message = L10N.getFormatStr("toolbox.sourceMapFailure", > + text, urlInfo.url, urlInfo.sourceMapURL); > + this._target.logErrorInPage(message, "source map"); Nit: there's a `target` getter so we don't need to use `._target`
Attachment #8893546 -
Flags: review?(bgrinstead) → review+
Comment hidden (mozreview-request) |
Comment 14•6 years ago
|
||
mozreview-review |
Comment on attachment 8893545 [details] Bug 1345533 - display newlines in some console messages; https://reviewboard.mozilla.org/r/164616/#review170288 Look good to me, thanks Tom
Attachment #8893545 -
Flags: review?(nchevobbe) → review+
Assignee | ||
Comment 15•6 years ago
|
||
Fixing the eslint trivia.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 18•6 years ago
|
||
Pushed by ttromey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0c405b138c2b display newlines in some console messages; r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/82c5a8086a64 report source map errors to the web console; r=bgrins
![]() |
||
Comment 19•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0c405b138c2b https://hg.mozilla.org/mozilla-central/rev/82c5a8086a64
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Updated•5 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•