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

Feature-Flag not loaded #109

Closed
nrobi144 opened this issue May 31, 2024 · 1 comment
Closed

Feature-Flag not loaded #109

nrobi144 opened this issue May 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nrobi144
Copy link

Version

4.4.1

Steps to Reproduce

  1. Call await getFeatureFlagPayload(key) right after Posthog() initialization/creation

Similar issue to https://posthog.com/questions/feature-flag-not-working

Expected Result

  • Future waits until flags are loaded
  • Or a similar api to JS onFeatureFlags()

Actual Result

Sometimes getFeatureFlagPayload() returns the payload, sometimes it returns null.
Also there's no way to ensure Feature Flags are loaded, other than adding an artificial delay?

@nrobi144 nrobi144 added the bug Something isn't working label May 31, 2024
@marandaneto
Copy link
Member

Hi @nrobi144

That is a dupe of #81

The await is only about the bridge call but not the whole flags to be loaded, this still has to be implemented.

The flags are cached in the disk, so technically if you want to use flags right after init, you just need the artificial delay once, the very first time the app opens and has internet, all the following times will be read from the disk if the flags request isn't finished in time.

@marandaneto marandaneto closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants