8

I'm using Angular 2 and everything is working great in Chrome, but I started getting the following error in Firefox:

EXCEPTION: 0 - {"isTrusted":true} in core.umd.js

I have no idea what is causing this or where it is coming from, so I don't even know where to begin with debugging it. I did some Googling, but couldn't find anything useful. Here is an image of what I'm seeing in the console:

enter image description here

Does anyone have any idea what this means?

Bryan
  • 2,951
  • 11
  • 59
  • 101
  • Does this happen in an environment with cross origin requests? – Jan B. Jan 31 '17 at 22:50
  • Yes it does. I used to have CORs issues, but got them resolved (or at least I thought I did). Chrome works great and I'm 99.9% sure Firefox was working before even with cross origin requests. Not sure what changed. – Bryan Feb 01 '17 at 00:01

1 Answers1

6

I remember I had that issue once, too, and I believe I tracked it down to the following.

{"isTrusted":true} was the body of a request that was printed by my ErrorHandler that caught failed requests. The cause for the failed request was a CORS issue. I had a wildcard set for allowed origins in my Tomcat's web.xml for testing purposes:

<init-param>
  <param-name>cors.allowed.origins</param-name>
  <param-value>*</param-value>
</init-param>

It turned out that Firefox, at least in that particular version I used, didn't like wildcards and, thus, resulted in a failed request although the preflight had succeeded. After setting the origin to a qualified name, everything worked fine. And just like you, I never had those issues in Chrome.

See this SO question, too

Hope that helps to track down your issue.

Community
  • 1
  • 1
Jan B.
  • 6,030
  • 5
  • 32
  • 53
  • That makes sense, I'll accept this once I have time to look into that (assuming it fixes the problem). – Bryan Feb 01 '17 at 18:02