-
Notifications
You must be signed in to change notification settings - Fork 383
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
PlatformException: Code: -25308. Help me! #727
Comments
Error -25308 is errSecInteractionNotAllowed. You might want to read this post on the Apple Developer Forums. Can you give us some more context, i.e. the OS, version etc.? |
@techouse Oke. Project using :
|
facing the same issue flutter version: 3.19.3 |
@gamestap99 Can you replicate this on a simulator or provide us with some sample code that replicates this error? Does it work with v9.0.0 using something like this? dependency_overrides:
flutter_secure_storage: 9.0.0
flutter_secure_storage_linux: 1.2.0
flutter_secure_storage_macos: 3.0.1
flutter_secure_storage_platform_interface: 1.0.2
flutter_secure_storage_windows: 3.0.0
flutter_secure_storage_web: 1.2.0 |
Facing the Same Issue
|
Same issue for one customer, bug not always |
Same issue for some customers, bug not always, after read data when device was unlocked iOS 17.5.1 - 43,75 % |
This issue is replicable by reading from a secure storage(keychain) when a device is locked and has a passcode. It can be fixed with:
Note: |
Issue disappeared when I downgraded the library:
|
What are the consequences of doing this? |
https://developer.apple.com/documentation/security/ksecattraccessibleafterfirstunlock |
@mogol, please, can you explain why this happens and can it be fixed by someone? |
Facing same issue on latest version. |
Facing same issue as well on latest version for some iOS devices with the options fix set.
|
Having the same issue with this initialization but only in
|
I changed my usage from
to
Seems the problem didn't happen but behaved values aren't stored anymore before! |
When changing the settings, you need to "migrate" values from the previous settings. I described this in a similar issue. |
I've just reviewed your metod, it simply uses secure storage first, then uses legacy (shared prefs imho) if secure storage fails. This means same values are stored (must be stored) in secure storage and legacy options both, otherwise this fallback does not work. In my scenario,
To make work your scenario i would be storing those credentials in "legacy" option too :/ |
No, it's using secure storage in both cases. "Legacy" refers to the secure storage being created/accessed with the old settings. Here's the associated code: |
Yes, my mistake. Both storages are indeed FlutterSecureStorage. Based on your latest post, it looks like I also tried To sum up, using |
In my case, if the app was restarted, the storage was accessible again...It was reading from the background that was messing things up. If in your case the "legacy" storage is fully borked and you can no longer read from it, migration may not be possible. |
On a beautiful day, I received this token, and it seems that it caused my app to crash. To be more precise, I tried to catch the error, so it didn't take the main key, causing the session to log out. I am using it to encrypt the Hive NoSQL database.
my code using it
The text was updated successfully, but these errors were encountered: