Description
Describe the bug
[LaunchDarkly] identify error: LaunchDarklyTimeoutError: identify timed out after 5 seconds
To reproduce
Use this component as a Provider
import {
LDProvider,
ReactNativeLDClient,
AutoEnvAttributes,
} from "@launchdarkly/react-native-client-sdk";
import { useEffect } from "react";
const LaunchDarklyProvider = ({ children }: PropsWithChildren): ReactNode => {
const client = new ReactNativeLDClient(MOBILE_KEY, AutoEnvAttributes.Disabled);
useEffect(() => {
const setup = async (): Promise<void> => {
if (rowKey && token) {
await client
.identify({
kind: 'multi',
practice: {
kind: 'practice',
key: rowKey,
},
})
.then(() => console.log('identify finished'))
.catch((e: unknown) => console.log('client error', e));
}
};
setup();
}, [rowKey, token]);
return <LDProvider client={client}>{children}</LDProvider>;
};
export default LaunchDarklyProvider;
Expected behavior
The error should not show and should be able to get the correct variation value.
Logs
LOG error: [LaunchDarkly] identify error: LaunchDarklyTimeoutError: identify timed out after 5 seconds
Also enabled debug mode and get these logs
debug: [LaunchDarkly] [EventSource] Will open new connection in 0 ms.
LOG info: [LaunchDarkly] Closed LaunchDarkly stream connection
SDK version
"@launchdarkly/react-native-client-sdk": "^10.2.1"
Language version, developer tools
"react-native": "0.74.3"
"expo": "51.0.18"
"expo-router": "3.5.17"
OS/platform
IOS simulator 17.5
Real device 17.5.1
Additional context
Can see the context from the website context section