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 not initializing if cookies are disabled #302

Open
rrawat-dev opened this issue Jul 24, 2024 · 2 comments
Open

LaunchDarkly not initializing if cookies are disabled #302

rrawat-dev opened this issue Jul 24, 2024 · 2 comments

Comments

@rrawat-dev
Copy link

rrawat-dev commented Jul 24, 2024

Hi Team,

Facing an issue in our web application where LaunchDarkly is not initializing if we reject "Accept Cookies" options in our application. No LaunchDarkly api calls or errors are shown in the console. Working fine if we choose "Accept Cookies" option.

let ldClient = LDClient.initialize(key, context);
ldClient.waitForInitialization(5).then(() => {
  featureFlags = ldClient.allFlags();
}).catch(err) {
  console.log(err);
};
@kinyoklion
Copy link
Member

Hello @rrawat-dev,

The SDK itself does not use any cookies. There are some cookies, associated with the domain that it connects to by default.

It is unclear why this would have any impact on the SDK.

That said, we have alternative endpoints available:

  const client = initialize('sdk-key', context, {
    baseUrl: 'https://clientsdk.launchdarkly.com',
    streamUrl: 'https://clientstream.launchdarkly.com',
  });

You can try these and let me know if it impacts your situation.

Thank you,
Ryan

@rrawat-dev
Copy link
Author

rrawat-dev commented Jul 25, 2024

Hi @kinyoklion,

For Incognito Mode/Cookie Accept scenario: Able to see https://clientsdk.launchdarkly.com calls in network panel

For Incognito Mode/Cookie Decline scenario: No https://clientsdk.launchdarkly.com calls in network panel, No error for launchdarkly in console

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