We are using Chrome Version 61.0.3163.79 (Official Build) (64-bit) and have noticed that some of our telemetry traces are failing. We turned on both debugging and verbose logging for application insights and notice the following error:
_InternalLogMessage
message:"AI (Internal): TrackTraceFailed message:"trackTrace failed, trace will not be collected: " props:"{exception:[object Object]{\messageId\:12,\message\:\AI (Internal): FailedAddingTelemetryToBuffer message:\\\Failed adding telemetry to the sender's buffer, some telemetry will be lost: \\\ props:\\\{exception:[object Object]{\\\\messageId\\\\:39,\\\\message\\\\:\\\\AI (Internal): TransmissionFailed message:\\\\\\\\\\\\Telemetry transmission failed, some telemetry will be lost: \\\\\\\\\\\\ props:\\\\\\\\\\\\{exception:[object Object]{\\\\\\\\\\\\\\\\messageId\\\\\\\\\\\\\\\\:39,\\\\\\\\\\\\\\\\message\\\\\\\\\\\\\\\\:\\\\\\\\\\\\\\\\AI (Internal): TransmissionFailed message:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\. Failed to send telemetry with Beacon API.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}}\\\\\\\\\\\\\\\\}}\\\\}}""
messageId:38
__proto__:Object
I tracked down the calling method which is causing the error.
It is on line 2587 in ai.js
var queued = navigator.sendBeacon(url, batch);
sendBeacon is returning false for some batches and hence fails.
I did a little research about the sendBeacon method and Chrome 60.
The site states that navigator.sendBeacon is “Temporarily disabled navigator.sendBeacon() for some blobs”
Is there a way around this?? I believe we are missing out on needed telemetry data due to this restriction.
Thanks
@KamilSzostak this issue can be solved by addressing issue https://github.com/Microsoft/ApplicationInsights-JS/issues/500
When will this enhancement be done?
Is there anything I can do in the meantime to not set the Content-Type header??
Thanks
What is the likelihood of getting this particular bug prioritized higher and released?
We are in a production situation where we need the additional telemetry offered by Chrome.
Is there a code change we can make locally through forking of this repo that can fix the bug?
Thanks
Moving to 1.0.15. Will prioritize during the next sprint planning.
Thank you!
Please let us know if we can help in any way.
Code changes, testing, etc.
We are using this package heavily and understand you guys have a million and one issues to review and fix.
@KamilSzostak
Hello,
Has your sprint planning occurred in relation to this issue??
Has this issue been prioritized?
Thanks
Hi @KamilSzostak, thanks for looking into this. This is causing problems in my organization as well! Would you happen to have any idea for a fix, please?
Thank you!
The fix will be released in v1.0.15.
Could you please validate if the fix is working for you? I published a fixed version here: http://az416426.vo.msecnd.net/scripts/a/ai.beta.js (
Thank you!
We will verify and let you know.
Thanks!
I merged the fix. Please reopen the issue if you experience any issues with the ai.beta.js
@KamilSzostak, awesome! Do you happen to have an ETA for a release? And, thank you!
Most helpful comment
Moving to 1.0.15. Will prioritize during the next sprint planning.