Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ImLunaHey opened this issue Oct 24, 2024 · 2 comments

Comments

@ImLunaHey
Copy link

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
Copy link
Author

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

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

@kinyoklion
Copy link
Member

Hello @ImLunaHey,

That format will allow the SDK to evaluate flags, but it will also produce warnings. A flat map of flag values is an old format supported in the bootstrap data, but it lacks sufficient information to drive many product features, and will produce this warning. We will not consider removing the warning.

I'll make sure that the documentation is updated to not show the old format.

You can generate bootstrap data using a server-side SDK will will produce a format without such warnings. While manually creating bootstrap data can work, it isn't the intended use of the functionality. The primary use case is generating the bootstrap data using a server SDK, and this warning lets people know if their server SDK is too old to produce the correct data.

If you want to manually create bootstrap, and you don't care about any associated product features that will not work, then you can suppress this in your logs. Typically I would suggest a filter in your logging system, but if you are not using one you can customize the SDK logging.

Thank you,
Ryan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants