{“isTrusted”:true} exception in core.umd.js

前端 未结 1 1016
野的像风
野的像风 2021-01-12 20:45

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

EXCEPTION: 0 - {\"isTrusted\":t

相关标签:
1条回答
  • 2021-01-12 21:17

    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.

    0 讨论(0)
提交回复
热议问题