Closed Bug 1228496 Opened 4 years ago Closed 3 years ago

Show hint when mapped sources can't be loaded

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox45 affected)

RESOLVED FIXED
Tracking Status
firefox45 --- affected

People

(Reporter: sebo, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

If a mapped source is not available on the server, i.e. the "sources" property in the source map refers to a file that doesn't exist, then the Debugger currently shows the 404 response from the server.

It would be much better if the user got a message displayed that the related source could not be loaded. Something like 'Original source could not be loaded.' at the to of the source view.

Sebastian
Blocks: 1179813
See Also: → 1228500
See Also: → 1228503
See Also: → 956088
Priority: -- → P3
The new debugger doesn't show the 404 - just a blank file.
See Also: → 1345533
I think this was fixed by bug 1387477.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1387477
Tried my test case right now with Nightly 57.0a1 (2017-08-17) and 1. there is no mapping error shown within the console and 2. selecting foo.js in the new Debugger UI just says "Loading…" and also doesn't show an error.

My idea was to add a hint to the Debugger panel, so you get a note right where you are when you try to access it and don't have to switch to the console to see that the source map couldn't be loaded. So, for point 2 I've now filed https://github.com/devtools-html/debugger.html/issues/3707.

Though Tom, can you explain why I don't get an error message in the console for my test case?

Sebastian
Flags: needinfo?(ttromey)
(In reply to Sebastian Zartner [:sebo] from comment #3)
> Tried my test case right now with Nightly 57.0a1 (2017-08-17) and 1. there
> is no mapping error shown within the console and 2. selecting foo.js in the
> new Debugger UI just says "Loading…" and also doesn't show an error.
> 
> My idea was to add a hint to the Debugger panel, so you get a note right
> where you are when you try to access it and don't have to switch to the
> console to see that the source map couldn't be loaded. So, for point 2 I've
> now filed https://github.com/devtools-html/debugger.html/issues/3707.
> 
> Though Tom, can you explain why I don't get an error message in the console
> for my test case?

It works for me, so I wonder what the difference is between our setups.
I'm using an artifact build from yesterday.

I open the page and then open the debugger.
When I open foo.js, the contents are:

Error while fetching an original source: request failed with status 404
Source URL: http://localhost:8000/foo.js


When I switch to the console I see the same text:

Error while fetching an original source: request failed with status 404
Source URL: http://localhost:8000/foo.js


Let's un-dup this in the meanwhile.
Status: RESOLVED → REOPENED
Flags: needinfo?(ttromey)
Resolution: DUPLICATE → ---
Can you try again with a newer nightly?

If that still fails, make sure the relevant prefs are enabled.
For the time being there are two that matter:

devtools.source-map.client-service.enabled
devtools.debugger.client-source-maps-enabled
Flags: needinfo?(sebastianzartner)
Yes, works now for me, too! Thanks for fixing this and for coming back to me!

Sebastian
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Flags: needinfo?(sebastianzartner)
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.