Application insights is reporting exceptions with following message
problemId: not_specified at e.sendExceptionInternal
details:
[{"outerId":"0","message":"not_specified","type":"Error","id":"0","parsedStack":[{"assembly":"at e.sendExceptionInternal
(https://domain.com/static/js/main.78bf8648.js:1:124888)","method":"e.sendExceptionInternal","level":0,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at e.trackException
(https://domain.com/static/js/main.78bf8648.js:1:125105)","method":"e.trackException","level":1,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at e.trackException
(https://domain.com/static/js/main.78bf8648.js:1:185603)","method":"e.trackException","level":2,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at
Function.e.trackException (https://domain.com/static/js/main.78bf8648.js:1:188348)","method":"Function.e.trackException","level":3,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at https://domain.com/static/js/main.78bf8648.js:1:66103","method":"<no_method>","level":4,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"}],"rawStack":"Error: not_specified\n at e.sendExceptionInternal (https://domain.com/static/js/main.78bf8648.js:1:124888)\n at e.trackException (https://domain.com/static/js/main.78bf8648.js:1:125105)\n at e.trackException (https://domain.com/static/js/main.78bf8648.js:1:185603)\n at Function.e.trackException (https://domain.com/static/js/main.78bf8648.js:1:188348)\n at https://domain.com/static/js/main.78bf8648.js:1:66103"}]
AppInsights Js version "@microsoft/applicationinsights-web": "^2.1.1",
Please help me in understanding what's this issue
Is this error occurring passively or when you make a manual call to trackException? If so, could you post this call? Else could you post how you are initializing the SDK?
@markwolff it seems like happening on trackException
I'm initializing appinsights like this
const appInsights = new ApplicationInsights({
config: {
instrumentationKey: config.instrumentationKey,
enableCorsCorrelation: true,
disableCorrelationHeaders: false,
correlationHeaderExcludedDomains: config.THIRD_PARTY_DOMAINS
}
});
appInsights.loadAppInsights();
appInsights.addTelemetryInitializer(telemetryItem => {
telemetryItem.tags['ai.cloud.role'] = 'UI';
})
We've our own console implementation, where console.error argument is send to appinsights.trackException, some of those arguments are just strings, that could be the problem
We've fixed that problem, we're sending errors as
if (error instanceof Error) {
appInsights.trackException({
exception: error
});
} else {
appInsights.trackException({
exception: new Error(error)
});
}
But still receiving the same error
not_specified at e.sendExceptionInternal
client_Browser Chrome 76.0
client_OS Mac OS X 10.13
operation_Id k9frJ
details [{"outerId":"0","message":"not_specified","type":"Error","parsedStack":[{"assembly":"at e.sendExceptionInternal (https://domain.com/static/js/main.78bf8648.js:1:124888)","method":"e.sendExceptionInternal","level":0,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at e.trackException (https://domain.com/static/js/main.78bf8648.js:1:125105)","method":"e.trackException","level":1,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at e.trackException (https://domain.com/static/js/main.78bf8648.js:1:185603)","method":"e.trackException","level":2,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at Function.e.trackException (https://domain.com/static/js/main.78bf8648.js:1:188348)","method":"Function.e.trackException","level":3,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"},{"assembly":"at https://domain.com/static/js/main.78bf8648.js:1:66103","method":"<no_method>","level":4,"line":1,"fileName":"https://domain.com/static/js/main.78bf8648.js"}],"id":"0","rawStack":"Error: not_specified\n at e.sendExceptionInternal (https://domain.com/static/js/main.78bf8648.js:1:124888)\n at e.trackException (https://domain.com/static/js/main.78bf8648.js:1:125105)\n at e.trackException (https://domain.com/static/js/main.78bf8648.js:1:185603)\n at Function.e.trackException (https://domain.com/static/js/main.78bf8648.js:1:188348)\n at https://domain.com/static/js/main.78bf8648.js:1:66103"}]
Any help would be much appreciated
I'm unable to repro this on my end. Do you have an example which reproduces it on your end? Is this an error being shown in console or is it a problem with the telemetry?
It's probably because the type of the Error parameter is wrong. When you do new Error(error), is the type of error string?

If not, it may give you the message of not specified like this:
let error = [];
ai.trackException({
exception: new Error(error)
})
then I receive:

@xiao-lix that makes sense, but at the else part we're only sending strings, will double check on that and update you
getting the same error logged in app-insight
componentDidCatch(error, info) {
let correlationId = window.appInsights.context.telemetryTrace.traceID;
console.log(error,info);
window.appInsights.trackException(error, null, {"info":info.componentStack,"itemType":"JavaScript"}, {}, "Error");
}
This error is not permanent but occurs at random time.
@AbhaysinghBhosale please see API documentation here
window.appInsights.trackException({
exception: error,
properties: {"info":info.componentStack,"itemType":"JavaScript"}
});
Most helpful comment
@AbhaysinghBhosale please see API documentation here