maui
maui copied to clipboard
exception of type 'javax.crypto.aeadbadtag exception' was thrown when calling SecureStorage.Default.SetAsync on Android
Description
Upgraded MAUI to 8.0.20 and now when I call SecureStorage.Default.SetAsync, I get "exception of type 'javax.crypto.aeadbadtag exception' was thrown" on Android. Works find on Windows.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- [regression/8.0.0] [Maui][Android] Signature/MAC verification failed (#18230), similarity score: 0.84
- Migrating LegacySecureStorage on Android doesn't work (#21688), similarity score: 0.79
Closed similar issues:
- [.NET 8 Android] Javax.Crypto.AEADBadTagException occurs when opening the app (#18872), similarity score: 0.80
- [Essentials] Secure storage on Android GetAsync returns null even after Set (#20292), similarity score: 0.80
- Secure Storage GetAsync fails to return on Android (#18835), similarity score: 0.80
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Seeing that the exception is from javax
it makes sense it would work in Windows. @jonathanpeppers @jonpryor would you have any ideas? would this be a runtime or SDK issue?
@JimAIT can you past the full stacktrace of the exception? adb logcat
will have this information:
- https://docs.microsoft.com/xamarin/android/deploy-test/debugging/android-debug-log
If MAUI has a SecureStorage
API, this is probably the right place for the issue.
Sorry for the delay, I was able to get around this by deleting the App Data on my device.
@JimAIT was there a problem during an upgrade between MAUI versions? Or perhaps a migration from Xamarin.Forms -> MAUI?
Or was this a fluke and we can close this? Thanks!
@jonathanpeppers
SecureStorage runtime issues might have root in this problem/issue:
https://github.com/dotnet/maui/issues/18230#issuecomment-2021422788
https://github.com/dotnet/maui/pull/4211/files#diff-93ca7559b0a2eaf2bab3285f6d90c92ed92eee598bfbc814b368201753a0ef29
Seems like problem of documentation and overeagerly rebranding.
Hi @JimAIT. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.