Unhelpful error message "not well-formed 1:1"



3 years ago
3 months ago


(Reporter: jujjyl, Unassigned)


(Blocks: 1 bug)

43 Branch

Firefox Tracking Flags

(firefox43 affected)


(Whiteboard: [polish-backlog][gaming-tools])


(2 attachments)

167.05 KB, application/x-gzip
126.10 KB, application/x-zip-compressed


3 years ago
Created attachment 8663302 [details]

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.

Comment 1

3 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 )
Blocks: 1212468
Whiteboard: [polish-backlog]
I didn't investigate any deeper but the message comes from


(Tested by modifying the message.)
So maybe a bug in the XML parser.
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:

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.
Whiteboard: [polish-backlog] → [polish-backlog][gaming-tools]
Priority: -- → P3

Comment 4

3 years ago
Created attachment 8734001 [details]

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.
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.


6 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.