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

Calling .setup with a different configuration causes "Duplicate Analytics client" error #104

Closed
jhiesey opened this issue Sep 11, 2019 · 3 comments

Comments

@jhiesey
Copy link

jhiesey commented Sep 11, 2019

We are using CodePush to update our app, and if we change the Segment config we get Error: Duplicate Analytics client.

I think this is because there is currently no way to recreate the singleton sharedAnalytics object. I see that the fix for #16 avoids this problem when the config is the same, but that doesn't help if the config changes.

Is there a way to reset the singleton? Or if not, is there a way to detect this other than catching the error?

@jhiesey
Copy link
Author

jhiesey commented Sep 11, 2019

We are seeing this error on v1.0.1 on iOS

@rlopezapplaudo
Copy link
Contributor

Hi can yo verify with pr should be fixed
28a981d

@bsneed
Copy link
Contributor

bsneed commented Feb 8, 2021

Closing due to age. Also, we don't have a way to re-init the singleton. Future changes will include moving away from the singleton model.

@bsneed bsneed closed this as completed Feb 8, 2021
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

No branches or pull requests

3 participants