This topic was originally posted by danil.makarenko on 7/30/2024.
This content has been migrated from our previous community forum to preserve valuable discussions.
SDK Version: 8.0.1
Platform: Android
Some of our users are facing app crashes when logging in.
I am not sure whether it’s related to the device or not, but most of the users have no problems
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String j7.a.getString(java.lang.String, java.lang.String)' on a null object reference
at com.web3auth.session_manager_android.keystore.KeyStoreManager.getPreferencesData(KeyStoreManager.java:134)
at com.web3auth.session_manager_android.SessionManager.authorizeSession(SessionManager.kt:138)
at com.web3auth.core.Web3Auth.authorizeSession(Web3Auth.kt:335)
at com.web3auth.core.Web3Auth.initialize(Web3Auth.kt:170)
at com.app.renegade.ui.home.HomeBaseActivity.login(HomeBaseActivity.kt:258)
at com.app.renegade.ui.vault.custom_web3auth.CustomWalletRouteKt$CustomWalletScreen$2.invokeSuspend(CustomWalletRoute.kt:114)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Looks like the storage has been deleted, and we can’t find any active session. Please tell them to logout if they can and re-login if they can. The other option would be to deleted the app, and install again but please make sure user has enabled the MFA option, otherwise they will lose access to their account.
I don’t see any issue in the code that could trigger that, can you relay the above steps to user and ask if it works? If it doesn’t work, please get the user’s device details to debug the issue.