Skip to content

Network requests to fetch flags are not retried unless the client successfully retrieves flags from localStorage #80

@AumyF

Description

@AumyF

Describe the bug
Using js-client-sdk, network requests to fetch flags are not retried unless the client successfully retrieves flags from localStorage.

To reproduce
The client retries to fetch flags when it succeeds to bootstrap from localStorage:

  1. Set bootstrap: "localStorage"
  2. Load the application to let the client to store flags in localStorage
  3. Configure to block requests to https://*.launchdarkly.com/* using request blocking of Chrome's request blocking
  4. Reload the application
  5. See that the requests to https://clientstream.launchdarkly.com/eval/* is repeated

Otherwise it does not retries the requests:

  1. Clear localStorage or unset bootstrap option
  2. Configure to block requests to https://*.launchdarkly.com/* using request blocking of Chrome's request blocking
  3. Reload the application
  4. See that the requests is not retried

Expected behavior
A client retries network requests even if bootstrap is not set or there is no flags in localStorage.

SDK version
js-sdk-common: 3.8.2
js-client-sdk: 2.24.2

Language version, developer tools
Chrome 106

OS/platform
macOS 12.4

Additional context
These lines of code seems to be related.

Metadata

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