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

https://dc.services.visualstudio.com/v2/track returning 400 bad request in case of log out #2215

Closed
kulabanta opened this issue Dec 8, 2023 · 3 comments
Milestone

Comments

@kulabanta
Copy link

kulabanta commented Dec 8, 2023

When we try to log out from our web application or refresh the page ,lots of ping calls are getting called for url https://dc.services.visualstudio.com/v2/track and all calls are returning 400(not incase of refresh).
It is slowing down the logout process and browser is undergoing to a state of freeze.

It is only happening in the latest version 3.0.5 .

issue

@kulabanta kulabanta changed the title [BUG] https://dc.services.visualstudio.com/v2/track returning 400 bad request in case of log out Dec 8, 2023
@MSNev MSNev added this to the 3.0.6 milestone Dec 8, 2023
@MSNev
Copy link
Collaborator

MSNev commented Dec 8, 2023

We released v3.0.6 to npm yesterday to address an issue introduce in v3.0.4 which causes this issue to occur.
And we promoting v3.0.6 as the primary version (available via the CDN with ai.3.min.js and ai.3.gbl.min.js) on Monday

v3.0.6 is a targeted fix for this specific issue https://github.com/microsoft/ApplicationInsights-JS/milestone/90

@MSNev
Copy link
Collaborator

MSNev commented Dec 8, 2023

For reference, this issue is triggered only when the browser is unable to send all events that are "batched" (in-memory) when the page is "unloading" (Navigating to another page, closing the browser or switching to another tab).

This generally, means that the "amount" of batched events exceeds the sendBeacon() limit of 64Kb. The ping means that the request is being attempted via the sendBeacon API.

@MSNev
Copy link
Collaborator

MSNev commented Dec 8, 2023

Not sure exactly "why" it's returning a 400 though, perhaps because too many events have being "sent".

Can you try using v3.0.6?

  • If you using npm then just consume the latest package.
  • If your using the CDN (snippet) then you can change the src to be ai.3.0.6.gbl.min.js or ai.3.0.6.min.js (at least until Monday (PST) when we promote this version to be the primary version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants