launchdarkly / react-native-client-sdk

LaunchDarkly Client-side SDK for React Native
Other
45 stars 32 forks source link

Fetches incorrect flag value during app init #266

Open NikhilVashistha opened 4 days ago

NikhilVashistha commented 4 days ago

Describe the bug Fetches incorrect flag value during app init

To reproduce

  1. Init the SDK on app launch
  2. identify the user
  3. Call variation API to access the flag immediately after identify.

Expected behavior It should return the correct value.

SDK version v10.00

Language version, developer tools

System:
  OS: macOS 14.5
  CPU: (10) arm64 Apple M1 Max
  Memory: 99.94 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.13.0
    path: ~/.nvm/versions/node/v18.13.0/bin/node
  Yarn:
    version: 1.18.0
    path: ~/.nvm/versions/node/v18.13.0/bin/yarn
  npm:
    version: 8.19.3
    path: ~/.nvm/versions/node/v18.13.0/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/jshah/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10811636
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 3.3.0
    path: /Users/jshah/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.7
    wanted: 0.72.7
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
louis-launchdarkly commented 3 days ago

Hello @NikhilVashistha,

Thank you for reaching out, to help narrow down the issue that you encountered, are you able to reproduce the issue using the example app? If you are using the Android platform with a development build, you could be encountering the React Native Flipper issue documented here: https://github.com/launchdarkly/js-core/issues/375 - If that is the case, that issue has a workaround documented. If you can reproduce the issue using the example app, I recommend you open a support ticket with LaunchDarkly https://support.launchdarkly.com/hc/en-us as you will get a quicker response that way.