Open
Bug 1206403
Opened 9 years ago
Updated 2 years ago
Unhelpful error message "not well-formed 1:1"
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(firefox43 affected)
NEW
Tracking | Status | |
---|---|---|
firefox43 | --- | affected |
People
(Reporter: jujjyl, Unassigned)
References
Details
(Whiteboard: [polish-backlog][gaming-tools])
Attachments
(2 files)
STR: Open attached not_well_formed.html. Observed: Web console says error "not well-formed not_well_formed.js:1:1". The file:line points to the first line of the .js file, which is a comment as follows: "// The Module object: Our interface to the outside world. We import" What is not well-formed? What does being well-formed mean? The line:column info regarding the first character on the first line does not have anything that looks not-well-formed. Expected: Browser should be able to point to the cause of the error more clearly, so that the developer is able to debug (and learn!) what causes the error.
Reporter | ||
Comment 1•9 years ago
|
||
(Fixing the not well-formed message on the page in question is being discussed elsewhere in bug https://github.com/kripken/emscripten/issues/3792 )
Updated•9 years ago
|
Blocks: dbg-gaming
Whiteboard: [polish-backlog]
Comment 2•9 years ago
|
||
I didn't investigate any deeper but the message comes from https://dxr.mozilla.org/mozilla-central/source/dom/locales/en-US/chrome/layout/xmlparser.properties#9 (Tested by modifying the message.) So maybe a bug in the XML parser.
Comment 3•9 years ago
|
||
The test in question is doing this: var codeXHR = new XMLHttpRequest(); codeXHR.open('GET', 'not_well_formed.js', true); The error is being logged when it turns out that this .js file can't be parsed as XML, starting around here: https://dxr.mozilla.org/mozilla-central/source/parser/htmlparser/nsExpatDriver.cpp#893 So this seems to be a parser bug in the end. One idea for fixing it is bug 906239. We already arrange to attach stacks on the XHR *callbacks*, but if we captured the stack on the nsXMLHttpRequest itself, we could report it here somehow. Ideally we'd audit all the uses of the console service in platform and see what else needs to be fixed.
Updated•9 years ago
|
Whiteboard: [polish-backlog] → [polish-backlog][gaming-tools]
Updated•9 years ago
|
Priority: -- → P3
Reporter | ||
Comment 4•8 years ago
|
||
Another test case. Opening this by drag-n-drop (via file:// URL) causes a "syntax error" message, and behaves very similar to the above test case.
Comment 5•7 years ago
|
||
One idea would be to attach the async stack by making a synthetic frame for the error. The same idea came up in bug 1316067.
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 6•5 years ago
|
||
I believe this is a captured stack bug. CC brian
Flags: needinfo?(bhackett1024)
Comment 7•5 years ago
|
||
Hmm, per comment 0 this bug is about the error message not being helpful, rather than the lack of an associated stack. If we want to investigate saving a stack for parse errors like this, I think it would be better to do in a different bug. Currently, these testcases give different errors:
XML Parsing Error: not well-formed
Location: not_well_formed.js
Line Number 1, Column 1:
XML Parsing Error: syntax error
Location: threadprofiler.asm.js
Line Number 1, Column 1:
These messages clearly indicate that the errors happened when parsing the files as XML, which seems much clearer than the message in comment 0, so I think this bug is fixed.
Flags: needinfo?(bhackett1024)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•