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

If appVersion is added as a custom attribute, when app upgrades but is relaunched while offline, unknown feature flag error happens #170

Closed
anawu2006 opened this issue Jun 22, 2022 · 2 comments

Comments

@anawu2006
Copy link

Is this a support request?
No.

Describe the bug
In our Android app, we add appVersion as a custom attribute of LDUser, and apparently this data is being used as part of the flag store id. Because of this, each time when app upgrades, a new flag store is created. If app upgrades but is relaunched while offline, since a new flag store is being used and there is no flags in it yet, unknown feature flag error will happen when getting flag values.

To reproduce

  1. add appVersion as a custom attribute of LDUser;
  2. launch the app and have all feature flags synced from cloud;
  3. upgrade app to a new version;
  4. put device to offline;
  5. relaunch app.

Expected behavior
Same flag store is being used after app version changed.

SDK version
Android SDK 3.1.1

Language version, developer tools
Android Kotlin

OS/platform
Android API 31

Additional context
I am not sure if this is a bug or a feature. But is there any way I can have appVersion without affecting the flag store identifier?

@maxkohne
Copy link

We ran into the same thing and reported it here in this issue. #150

@anawu2006
Copy link
Author

We ran into the same thing and reported it here in this issue. #150

ah, thank you so much for pointing this out! I will just close this one and follow the status in #150. Seems the fix won't be ready any time soon though.

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