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

createClient calling multiple times when app being killed status to foreground #890

Open
ravi-tally opened this issue Oct 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ravi-tally
Copy link

  • analytics-react-native version:^2.16.1
  • React Native version:0.66.4
  • iOS or Android or both? both

Steps to reproduce

  • Initialise the segment as per provided document
const segmentClient = createClient({
      writeKey,
      trackAppLifecycleEvents: true,
      collectDeviceId: true,
      debug: true,
      trackDeepLinks: true,
    });
  • And I have checked the anonymousId something like : xyzpqr

segmentClient.userInfo.get()?.anonymousId

  • Now I have killed the app and open again at that time new anonymousId was created like : abcdefg

it means every lunch time this method call again and create a new anonymousId

While I have integrated older version 1.5.2 with SegmentAnalytics.useNativeConfiguration(); method, everytime I can get same anonymousId

Expected behavior

  • After upgrade to new version of segment ^2.16.1, it should be provide same anonymousId.

Is there any solution for this please share

@ravi-tally ravi-tally added the bug Something isn't working label Oct 18, 2023
@ravi-tally ravi-tally changed the title Create client calling multiple times when app being killed status to foreground createClient calling multiple times when app being killed status to foreground Oct 18, 2023
@alanjcharles
Copy link
Contributor

hi @ravi-tally apologies for the delay here. Is this is still an issue you are experiencing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants