Crash in FxaAccountManager - UnrecoverableKeyException
Categories
(Firefox for Android :: Accounts and Sync, defect, P3)
Tracking
()
People
(Reporter: rsainani, Unassigned)
References
Details
(Keywords: crash)
Starting 116, there have been crash reports throwing UnrecoverableKeyException - Failed to obtain information about key.
This might be caused by the underlying KeyStoreException-Key not found. Needs investigation.
| Reporter | ||
Comment 1•2 years ago
|
||
Tarik, would you happen to know if this change is related.
Comment 2•2 years ago
|
||
Hi Rahul - That change shouldn't relate as it doesn't interact with the FxA state that is usually stored in the key store. I'm not sure what changed to start causing this but we should be catching the exception if we encounter it.
From the stack trace, looks like the crash is when were attempting to read the key store and from the error message it seems like the key is not available. That either:
- Somehow the account state got lost from persisted storage.
- The app is querying FxA where a user is not signed in
The surprising part is that we have logic a couple of lines later that attempts to handle the case of key not being present, but I suspect some version of Android might throw an exception instead of triggering the callback with null, unless the underlying libraries we use for the key store have changed recently
Regardless we should catch the exception and handle it the same way we handle the missing key case
Comment 3•2 years ago
•
|
||
I think the fix here might be to catch the throws here and just return null since we will already handle the nullable in https://github.com/mozilla-mobile/firefox-android/blob/ce046588f005ae84d78cfb6e5b2c7c06618dfcc2/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/AccountStorage.kt#L239-L242
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•1 year ago
|
||
Hey Rahul, I'm not seeing this crash in Sentry any more. Have we already fixed this?
| Reporter | ||
Comment 5•1 year ago
|
||
Hey Jeff, I'm not seeing the crash or non fatal reports anymore.
Looks like [bug] added more error reporting for this and other FXA exceptions back in November (> 3 months ago), as a result the crash/non fatal reports are not present anymore.
Comment 6•9 months ago
|
||
Looks like this is all done. Closing this bug.
Description
•