-
Notifications
You must be signed in to change notification settings - Fork 237
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
[BUG] App Insights initialization setting 'enableAjaxErrorStatusText' is not working #1186
Comments
@xiao-lix what is the release date for this fix? |
@avilde hi it should be released this month. |
For reference, I'm planning on starting the release process this week, so it should be fully available before the end of next week. |
Updated to latest release: This issue is still not fixed. This line throws error when remote dependency status is 502 when trying to access ApplicationInsights-JS/extensions/applicationinsights-dependencies-js/src/ajax.ts Line 614 in 168c6e2
"AI (Internal): 16 message:"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect." props:"{ajaxDiagnosticsMessage:,exception:[object Object]{\messageId:14,\message:\AI (Internal): 14 message:\\Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.\\ props:\{ajaxDiagnosticsMessage:,exception:[object DOMException]{\\stack\\:\\Error: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'json').\\\\n at http://localhost:55867/static/js/0.chunk.js:21763:35\\\\\\\\n at ajaxRecord.self.CreateTrackItem (http://localhost:55867/static/js/0.chunk.js:22335:26)\\\\\\\\n at ajaxRecord.dynProtoProxy [as CreateTrackItem] (http://localhost:55867/static/js/0.chunk.js:26008:27)\\\\\\\\n at http://localhost:55867/static/js/0.chunk.js:21757:39\\\\\\\\n at locateResourceTiming (http://localhost:55867/static/js/0.chunk.js:21892:15)\\\\\\\\n at _findPerfResourceEntry (http://localhost:55867/static/js/0.chunk.js:21902:11)\\\\\\\\n at _onAjaxComplete (http://localhost:55867/static/js/0.chunk.js:21755:9)\\\\\\\\n at XMLHttpRequest. (http://localhost:55867/static/js/0.chunk.js:21724:15)\\\\}}\\\\}}"" |
Version 2.5.2 is now fully deployed to the CDN, closing as this should address this issue. |
The fix in version 2.5.2 is working now :). Thanks for quick changes! |
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. |
Description/Screenshot
I was excited that I could replace my own workaround version to log failed ajax issues by retrieving also response body from XHR. #1156
However I tested this new setting
enableAjaxErrorStatusText
and I could not get it to work. Instead I get an exception when remote dependency data is being logged.Exception I found:
Steps to Reproduce
OS/Browser:
Windows 10 Version 1909
Google Chrome Version 80.0.3987.87 (Official Build) (64-bit)
SDK Version (package.json):
"@microsoft/applicationinsights-react-js": "^2.4.4",
"@microsoft/applicationinsights-web": "^2.4.4"
How you initialized the SDK:
Here is my app insights telemetry class for logging client-side:
Expected behavior
responseText
with XHR response body informationAdditional context
This is the exception I get when I turn on setting
enableDebugExceptions
to true.Request body for
https://dc.services.visualstudio.com/v2/track
call:Removed any ID data.
The text was updated successfully, but these errors were encountered: