launchdarkly / react-client-sdk

LaunchDarkly Client-side SDK for React.js
Other
86 stars 68 forks source link

LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. #320

Open ImLunaHey opened 4 hours ago

ImLunaHey commented 4 hours ago

Is this a support request? no

Describe the bug LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. warnings are logged when passing in manual flags.

To reproduce

const flags = {
    aFlag: true
};
export const FeatureFlagProvider = ({ children }: { children: React.ReactNode }) => (
  <LDProvider
    clientSideID={launchDarklyClientId}
    deferInitialization={!launchDarklyClientId}
    options={{
      bootstrap: flags,
    }}
  >
    <OrgIDIdentifier>{children}</OrgIDIdentifier>
  </LDProvider>
);

Expected behavior No warning/error logged.

Logs

LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly. Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.

SDK version

3.4.0

Language version, developer tools N/A

OS/platform N/A

Additional context N/A

ImLunaHey commented 4 hours ago

the node.js instructions suggest that the above is valid. 🤔

https://docs.launchdarkly.com/sdk/features/bootstrapping#nodejs-client-side