Skip to content

Warning logged about omitting identify when client is bootstrapped #282

Open
@jakepeyser

Description

Describe the bug
When I bootstrap the JS SDK client with flags hydrated from SSR and include my user context, I still see a warning log printed to the dev console that reads:

[LaunchDarkly] Be sure to call identify in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript

I don't expect to have to call identify here as I've already established my context for the session.

To reproduce

  1. Initialize the client with a context and { bootstrap: flags } option
  2. Call variation with that client

Expected behavior
I would expect no warning logs if the context was set during client initialization

Logs
image

[LaunchDarkly] Be sure to call identify in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript

SDK version
"launchdarkly-js-client-sdk": "^3.1.3"

OS/platform
MacOS Monterey 12.6.2, Google Chrome 112.0.5615.137

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions