Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Insights: Script error at unknown

Some of ours client-side exceptions don't contain any details :

Script error. at unknown

It seams that these errors aren't related to a specific OS or browser:

  • Max OS X 10.9 + Chrome 53.0
  • Windows 7 + Firefox 49.0
  • ...

Is there a way to get more info ?

like image 660
Toine Seiter Avatar asked Sep 27 '16 20:09

Toine Seiter


People also ask

How do I check my application Insights error?

Open the Application Insights Search telemetry window in Visual Studio. While debugging, select the Application Insights dropdown box. Select an exception report to show its stack trace. To open the relevant code file, select a line reference in the stack trace.

What is AddApplicationInsightsTelemetry?

AddApplicationInsightsTelemetry prioritizes configuration from appsettings. json , irrespective of the order in which providers are added. Use the services. AddApplicationInsightsTelemetry(IConfiguration) method to read configuration from IConfiguration without this preferential treatment for appsettings.

Where is ApplicationInsights config file?

By default, when you use the automated experience from the Visual Studio template projects that support Add > Application Insights Telemetry, the ApplicationInsights. config file is created in the project root folder. When it's compiled, it's copied to the bin folder.

Are application Insights deprecated?

According to a message in the Azure Portal “Classic Application Insights is deprecated and will be retired in February 2024”. That means it's time to think about how to configure Application Insights to store it's data in a Log Analytics Workspac e.


1 Answers

I think I have my answer. Our scripts are behind a CDN :

Browser exceptions Most browser exceptions are reported.

If your web page includes script files from content delivery networks or other domains, ensure your script tag has the attribute crossorigin="anonymous", and that the server sends CORS headers. This will allow you to get a stack trace and detail for unhandled JavaScript exceptions from these resources.

Source: https://azure.microsoft.com/en-us/documentation/articles/app-insights-asp-net-exceptions/#browser-exceptions

An other source dealing with the same issue:

http://blog.errorception.com/2012/12/catching-cross-domain-js-errors.html

like image 135
Toine Seiter Avatar answered Dec 16 '22 10:12

Toine Seiter