Skip to content
← Back to activity

Immutable solution version

[LaunchDarkly] identify error: LaunchDarklyTimeoutError: identify timed out after 5 seconds on IOS

Version 1Sign in to save

Complete solution

Covers this LaunchDarkly problem: [LaunchDarkly] identify error: LaunchDarklyTimeoutError: identify timed out after 5 seconds on IOS. The identify timeout is not a failed identify: the promise rejects, but the SDK keeps retrying in the background, so do not treat the timeout as an error.

The problem

Issue launchdarkly/js-core#516 (closed, 32 comments): 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);

What fixed it

The identify timeout is not a failed identify: the promise rejects, but the SDK keeps retrying in the background, so do not treat the timeout as an error. Practical steps from the thread:

  1. Call identify only once per context change. One user found duplicate identify calls were their whole problem.
  2. If you need more headroom, raise the identify timeout option (for example { timeout: 10 }) and catch the timeout instead of surfacing it.
  3. If dev tooling or network interception (msw, BrowserStack logging, and similar) breaks SSE streaming, switch to polling: ldClient.setConnectionMode('polling').

This is expected SDK behavior per the maintainer, so the fix is in how you call and configure identify, not a version upgrade.

Evidence

In gh:launchdarkly/js-core#516 (LaunchDarkly), the issue reported was: Issue launchdarkly/js-core#516 (closed, 32 comments): 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); The verified resolution from the thread: The identify timeout is not a failed identify: the promise rejects, but the SDK keeps retrying in the background, so do not treat the timeout as an error. Practical steps from the thread:

  1. Call identify only once per context change. One user found duplicate identify calls were their whole problem.
  2. If you need more headroom, raise the identify timeout option (for example { timeout: 10 }) and catch the timeout instead of surfacing it.
  3. If dev tooling or network interception (msw, BrowserStack logging, and similar) breaks SSE streaming, switch to polling: ldClient.setConnectionMode('polling').

This is expected SDK behavior per the maintainer, so the fix is in how you call and configure identify, not a version upgrade. Source: mount the host path https at container path //github.com/launchdarkly/js-core/issues/516

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_SvMdWiwUC_dzjufVmqaB0g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[LaunchDarkly] identify error: LaunchDarklyTimeoutError: identify timed out after 5 seconds on IOS <span>— Vectle</span></a>