[React-Native Package] Android Package producing "Application Not Responding" Error Events #441
Labels
bug
Something isn't working
package: sdk/react-native
Issues that affect the react native SDK.
waiting for feedback
Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness.
Is this a support request?
Describe the bug
On Android the SDK seems to be a source of a jump in Application Not Responding Errors
[currently on
@launchdarkly/react-native-client-sdk@10.0.3
]To reproduce
We call
client.identify
in a useEffect, that runs when the user is anonymous opening the app, then again when the user logs in or logs outOn android it seems that calling identify is causing lockup when our next rendered viewed includes a
useBoolVariation
hookExpected behavior
Expect no frozen frames or Application Not responding events when both calling identify, and mounting a
useBoolVariation
hook in a short timetableLogs
We use socket.io as our main means of communicating with our backend and within our datadog sessions logs we see the clientStream XHR request almost blocking our socket.io events or atleast causing the UI to slow to a degraded state.
we suspect this could be triggering more frequently for users with bad network connections on android.
we also have one usage of the featureClient that doesn't utilize a hook and updates a state like so:
where isLaunchDarklyEnabled is a shared React.Context
SDK version
The version of this SDK that you are using.
Language version, developer tools
React-Native: 0.72.7
Expo: 49.X
socket.io: 5.0.22
@launchdarkly/react-native-client-sdk@10.0.3
OS/platform
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.
Additional context
Tried several other means of debugging and triaging this issue before ending up at the point of believing that LaunchDarkly is impacting the performance, the change in between versions that caused this drop was adding
useBoolVariation
to a hook that mounts.Updating to latest seems to alleviate the issue by triggering the new
timeout
to the identify function however, it also causes our homepage to be missing components hidden behind LD flagsThe text was updated successfully, but these errors were encountered: