Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script error: Browser exception message not providing information type and method #363

Closed
beckylino opened this issue Dec 5, 2016 · 9 comments

Comments

@beckylino
Copy link

No description provided.

@SergeyKanzhelev
Copy link

Do you have pictures/examples of what and when should be collected?

@KamilSzostak
Copy link
Contributor

Most common undefined JS errors:

  • Exception type: "Script error.", Failed method: "unknown" (Safari, Chrome, Firefox)
  • Exception type: "Script error", Failed method: "window.onerror" (IE11, IE10, Edge)
  • Exception type: "Script error.", Failed method: "window.onerror" (Safari, Edge, Chrome)
  • Exception type: "Expected ';'", Failed method: "window.onerror" (IE 11)
  • Exception type: "[object Event]", Failed method: "Unknown" (Android, Chrome)

@KamilSzostak
Copy link
Contributor

KamilSzostak commented Jan 4, 2017

Script error with an "unknown" error message is reported by CORS scripts, this can be mitigated by adding crossorigin="anonymous" to the script tag.

Edit: I fixed a bug to unify all "Script error" messages. The SDK also will provide more info on how to fix this #424.

@KamilSzostak
Copy link
Contributor

[object Event] is logged when an Event is thrown and the SDK cannot serialize it.

See our Wiki page for more info: I'm seeing a lot of Uncaught [object Object] errors in Application Insights in Azure Portal

@spelltwister
Copy link

Is there a way to override this behavior? Maybe specify an unknownErrorFormatter = function(error) { return formattedErrorToLog; } or something? Or is there another work around that is available? Currently, every single error logged is useless for us as it just says [object Something] and has no details what-so-ever about the error.

@MSNev MSNev self-assigned this Feb 3, 2020
@MSNev MSNev added the waiting for backend fix Waiting for a fix on the backend ingestion endpoint label May 1, 2020
@MSNev MSNev removed the waiting for backend fix Waiting for a fix on the backend ingestion endpoint label May 13, 2020
@MSNev
Copy link
Collaborator

MSNev commented May 13, 2020

The label "waiting for backend fix" as added to the wrong issue -- doh!

@MSNev
Copy link
Collaborator

MSNev commented May 7, 2021

As part of adding additional support to handle more error types, including the throwing strings and some older browsers. I'm also adding the ExceptionType to the beginning of the message (if it is not already present).

As ErrorType: <existing message>

The exceptions to this will be if the ErrorType is

  • It's ready present (anywhere - not just the beginning) within the message
  • The Error type is either "String"; "Object" or "Error"

@MSNev MSNev added the fixed - waiting release PR Committed and waiting deployment label May 24, 2021
@MSNev MSNev added this to the 2.x.x (Next) milestone May 27, 2021
@MSNev
Copy link
Collaborator

MSNev commented Jun 10, 2021

v2.6.3 is now fully deployed

@MSNev MSNev closed this as completed Jun 10, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants