Closed Bug 1595452 Opened 6 years ago Closed 6 years ago

When debugging angular I'm getting ERROR Error: "[object Object]"

Categories

(DevTools :: General, defect)

71 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1595046

People

(Reporter: piotrpalek, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

I encountered an error in an Angular.js app

Actual results:

It printed an unclear error message, in this format:

ERROR Error: “[object Object]” (...weird stack trace follows)

Expected results:

It shoud print the error message in full detail (it works in Chrome):

ERROR Error: Uncaught (in promise): Error: Template parse errors: (...full error message follows)

See also: http://codedam.com/angular-error-error-object-object/
for more details

Nicolas, could this be related to bug 1595046 ?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(nchevobbe)

(In reply to :Harald Kirschner :digitarald from comment #1)

Nicolas, could this be related to bug 1595046 ?

This bug references multiple issues, and this bug is the same as one of them.

The issue here is that when we use throw with a non-primitive, we stringify it (using something like toString). I think this may be handled here: js/src/jsexn.cpp#612

Ideally we should do like in Chrome and have the actual object displayed, but at least we could have a first version that uses toSource.

This is something happening at the engine level, so I think it should be moved there.
What do you think yulia?

Flags: needinfo?(nchevobbe) → needinfo?(ystartsev)

I haven't had very much experience in that part of the codebase yet, so I might not be able to answer properly. Jan, would you have more context here?

Flags: needinfo?(ystartsev) → needinfo?(jdemooij)

Dupe with bug 1595046 as Jan started commenting there. Please re-open if this should be treated separately.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(jdemooij)
You need to log in before you can comment on or make changes to this bug.