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

Was there an issue with AMP_unset, or was there an issue with Identify.set being over-called? #703

Closed
leeyun1533 opened this issue Apr 3, 2024 · 3 comments
Labels
question Further information is requested

Comments

@leeyun1533
Copy link

leeyun1533 commented Apr 3, 2024

Summary

In the following version, the error Amplitude Logger [Error]: Failed to save events bease the queue length exceeded 1000' appears
I experienced an error that shut down the web. When I looked up a little more, it seemed like an error that Amplitude was unable to handle too many events after accumulating a lot of events in the AMP_unset-something part of the localStorage, was there an issue with the specific version?

It doesn't happen when you downgrade to @amplitude/analytics-client-common@npm:^2.1.0, and it's good for the latest version.

The code I used is simple. I think there is an error in identify.
This error caused a fatal error on our web, so it would be good if you could quickly inform us of the related issue

The only PR I've found is the modifications below, but I don't know if this is what caused it
#689

  const indentifyObj = new Identify();
  const sampledTarget = user.sample; 

  indentifyObj.set('sampledTarget', sampledTarget);
  indentifyObj.set('sampleRate', AMPLITUDE_SAMPLE_RATE.toString());

ref version

@amplitude/analytics-client-common@npm:^2.1.1":
  version: 2.1.1

"@amplitude/analytics-core@npm:^2.1.0, @amplitude/analytics-core@npm:^2.2.2":
  version: 2.2.2
  resolution: "@amplitude/analytics-core@npm:2.2.2"

@leeyun1533 leeyun1533 added the question Further information is requested label Apr 3, 2024
@izaaz
Copy link
Contributor

izaaz commented Apr 3, 2024

@leeyun1533 - there was a bug in version 2.5.3 which was introduced by the PR you referenced. It was reverted and 2.6.0 was published. Can you please check if you're running into the issue with 2.6.0 as well?

@leeyun1533
Copy link
Author

leeyun1533 commented Apr 4, 2024

Thank you. It seems to have been fixed in the latest version. Could you give me a link to Revert PR?

More than 4 million users use it in our service, and the issue of excessive memory has had a bad effect on the user experience.

I think it's a critical issue and I'm trying to get a closer look at it.

@izaaz

@izaaz
Copy link
Contributor

izaaz commented Apr 9, 2024

@leeyun1533

Here's the PR that reverts the issue: #687

And here's the PR for fix forward: #689

The issue specifically happens when the server returns a bad request (for example the user id length was less than 5 characters or for other reasons). There was a bug in how we handled 4xx result codes. The fix forward is currently in a beta version of the SDK and is currently deployed in Amplitude's website to test it out. We will soon be releasing v2.6.3 with the fix.

@izaaz izaaz closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants