Closed k-zen closed 2 weeks ago
Unfortunately, this problem still occurs on MacOS version 7.0.1. I had to use the desktop_lifecycle plugin to detect when my app is not active to preemptively handle null
values from flutter_secure_storage.
is there any update on this?
I am closing all older issues. If this issue still exists in the latest version, please let me know.
I'm encountering the following behaviour when using version
5
onwards offlutter_secure_storage
.Problem: If I store a JWT token in secure storage and try to retrieve it returns
NULL
. I can verify that the key is set, since the routinecontainsKey
returnsTRUE
, and if I access it right after setting it, it returns the JWT correctly. But the problem arises when trying to access it after some undefined time frame, it starts to returnNULL
.Devices: This behaviour was observed on iOS devices, both a real device running iOS 12.4 and a iOS simulator running iOS 15.0. I didn't try this on an Android device or emulator.
Solution: After much debugging I can verify that this is not related to my own code, and the problem went away when I downgraded
flutter_secure_storage
to version4.2.1
.Addendum: I tried other solutions, like reading all keys when the App starts or even before accessing individual keys, none worked.
Output of the command
flutter doctor -v
: