Skip to content

fix(async-storage-persistor): Correctly import AsyncStorage #820

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

Merged
merged 2 commits into from
May 4, 2023

Conversation

krizzu
Copy link

@krizzu krizzu commented Apr 28, 2023

We recently discovered that our Application Install events are rising exponentially. Turns out the store context was not correctly persisted, due to the wrong import on the CommonJS module of AsyncStorage.

Also, I think it'd be great to also mention in docs that users need to use store persistor so that some context events are not repeated on every App start. It's easy to miss in docs and Segment does not provide a default implementation out of the box already set up.

@ltazmin
Copy link

ltazmin commented Apr 28, 2023

+1, we also started seeing this problem. Nice catch @krizzu.

Copy link
Contributor

@oscb oscb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this.
I agree, that was a big oversight of the side effect of not having a persistor, we will add a note in there.

@oscb oscb merged commit 4ef5883 into segmentio:master May 4, 2023
oscb pushed a commit that referenced this pull request May 4, 2023
## [@segment/sovran-react-native-v1.0.3](https://github.com/segmentio/analytics-react-native/compare/@segment/sovran-react-native-v1.0.2...@segment/sovran-react-native-v1.0.3) (2023-05-04)

### Bug Fixes

* **async-storage-persistor:** Correctly import AsyncStorage ([#820](#820)) ([4ef5883](4ef5883))
@krizzu krizzu deleted the fix/async-storage-persistor branch May 8, 2023 08:29
@servercimen
Copy link

@oscb Is the sovran version 1.0.3 supposed to be available from npm? The latest version I see on the registry is 1.0.2 https://www.npmjs.com/package/@segment/sovran-react-native?activeTab=readme

@efstathiosntonas
Copy link

Our events have sky rocketed:
Screenshot 2023-05-23 at 10 52 43
Screenshot 2023-05-23 at 10 52 22

@niallzato
Copy link
Contributor

@efstathiosntonas can you please write into [email protected], so our support team can investigate the issue with your MTUs? Thank you!

@efstathiosntonas
Copy link

@niallzato thanks, we’re already in an ongoing investigation with segment

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.

6 participants