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

[bugfix] reset anonymousId properly #897

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jboteros
Copy link

.reset(true) function had a bad behavior because when is resetting the anonymousId comes form this.state.userInfo instead of this.userInfo, consulting a previous version of the field.

@oscb
Copy link
Contributor

oscb commented Dec 12, 2023

@jboteros can we get more details on how to repro the issue you are bumping into here?

this.userInfo just maps into this.store.userInfo so in theory it should be the same thing either way. I'm curious if this has fixed your issues and how to repro to understand better what's going on.

@jboteros
Copy link
Author

jboteros commented Dec 13, 2023

@jboteros can we get more details on how to repro the issue you are bumping into here?

this.userInfo just maps into this.store.userInfo so in theory it should be the same thing either way. I'm curious if this has fixed your issues and how to repro to understand better what's going on.

Yes, that implementation fix our bug and now we have a proper reset user flow.

Basically the issue was related of the instance of the userInfo because you reset the userInfo in this.state.userInfo but fetch it in this.userInfo (at this point that instance is not update)

For now I created a patch over you package waiting for your fix and update it

BTW if is not clear the bug is related on the reset() and the anonymousID is not reseted properly conserve the same previous one.

Thanks!

@alanjcharles
Copy link
Contributor

Hi @jboteros apologies but is this still an issue? Oscar is no longer with Segment and I'm just trying to catch up on things here. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

4 participants