Source map exceptions in the logs when opening the debugger on irccloud.mozilla.com

RESOLVED WORKSFORME

Status

()

Firefox
Developer Tools: Debugger
P3
normal
RESOLVED WORKSFORME
2 years ago
3 months ago

People

(Reporter: pbro, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
STR:

- Login to irccloud.mozilla.com (hopefully a lot of people at mozilla use irccloud, so you'll be able to reproduce this, I haven't tried when not logged in).
- Open the debugger panel.

The following stack trace is logged to the browser console

"TabSources.prototype._fetchSourceMap threw an exception: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Stack: SourceMapConsumer@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/sourcemap/source-map.js:1281:20
TabSources.prototype._fetchSourceMap/fetching<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/utils/TabSources.js:447:19
Handler.prototype.process@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/Promise-backend.js:933:23
this.PromiseWalker.walkerLoop@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/Promise-backend.js:812:7
Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/Promise-backend.js:743:11
this.PromiseWalker.schedulePromise@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/Promise-backend.js:775:7
this.PromiseWalker.completePromise@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/Promise-backend.js:710:7
mainThreadFetch/onResponse@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/DevToolsUtils.js:442:7
NetUtil_asyncFetch/<.onStopRequest@resource://gre/modules/NetUtil.jsm:128:17
Line: 1281, column: 20"

This seems mostly harmless, the debugger seems to work fine anyway.

I have fixed a similar problem in the style-editor recently. This most probably comes from doing

let map = new SourceMapConsumer(content);

inside TabSources.prototype._fetchSourceMap
And this happens when content isn't something that JSON.parse can parse (so it could be, for instance, a 404 HTML page returned by the server).
I've seen this bug multiple times, but like Patrick says, it doesn't actually seem to break anything. Assigning P3 mainly due to that fact.
Priority: -- → P3

Updated

7 months ago
Blocks: 1339970

Comment 2

3 months ago
I think this shouldn't be an issue with the new debugger.
I don't have irccloud set up, though - would you mind giving it a try?
If there's an error I would expect to see something in the console explaining what went wrong.
Flags: needinfo?(pbrosset)
(Reporter)

Updated

3 months ago
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Flags: needinfo?(pbrosset)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.