Crash when attempting to sign back in after session timeout
See original GitHub issueSteps to reproduce
- Set a low
session_lifetime
on the homeserver. - Let the app be logged out.
- Reopen Element and attempt to sign in.
Outcome
What did you expect?
Redirected to sign-in flow (password, SSO, etc.)
What happened instead?
Open app, presented with “You’re signed out” flow, attempting to sign back in crashes. Can’t rageshake, can’t access any other screen. Clearing app data allows to sign in again, either in-app with the second button or in settings.
(note that even though SSO is the only auth method enabled right now as shown in the picture, this also happened when passwords were enabled earlier in the homeserver’s lifetime, if I recall.)
FATAL EXCEPTION: main
Process: im.vector.app, PID: 24571
java.lang.IllegalStateException: Developer error
at im.vector.app.features.login.LoginActivity$onSignModeSelected$1.invoke(LoginActivity.kt:14)
at im.vector.app.features.login.LoginActivity$onSignModeSelected$1.invoke(LoginActivity.kt:1)
at com.airbnb.mvrx.StateContainerKt.withState(StateContainer.kt:1)
at im.vector.app.features.login.LoginActivity.onSignModeSelected(LoginActivity.kt:1)
at im.vector.app.features.login.LoginActivity.handleLoginViewEvents(LoginActivity.kt:23)
at im.vector.app.features.login.LoginActivity.access$handleLoginViewEvents(LoginActivity.kt:1)
at im.vector.app.features.login.LoginActivity$initUiAndData$2.invoke(LoginActivity.kt:2)
at im.vector.app.features.login.LoginActivity$initUiAndData$2.invoke(LoginActivity.kt:1)
at im.vector.app.core.platform.VectorBaseActivity$observeViewEvents$1.invokeSuspend(VectorBaseActivity.kt:3)
at im.vector.app.core.platform.VectorBaseActivity$observeViewEvents$1.invoke(Unknown Source:8)
at im.vector.app.core.platform.VectorBaseActivity$observeViewEvents$1.invoke(Unknown Source:4)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Collect.kt:6)
at kotlinx.coroutines.flow.SharedFlowImpl.collect(SharedFlow.kt:12)
at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(Unknown Source:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:10)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:14)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:6)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:4)
at kotlinx.coroutines.flow.SharedFlowImpl.tryEmit(SharedFlow.kt:6)
at im.vector.app.features.login.LoginViewModel.handle(LoginViewModel.kt:18)
at im.vector.app.features.signout.soft.SoftLogoutFragment$signinFallbackSubmit$1.invoke(SoftLogoutFragment.kt:2)
at im.vector.app.features.signout.soft.SoftLogoutFragment$signinFallbackSubmit$1.invoke(SoftLogoutFragment.kt:1)
at com.airbnb.mvrx.StateContainerKt.withState(StateContainer.kt:1)
at im.vector.app.features.signout.soft.SoftLogoutFragment.signinFallbackSubmit(SoftLogoutFragment.kt:1)
at im.vector.app.features.signout.soft.SoftLogoutController$buildForm$4$1.invoke(SoftLogoutController.kt:2)
at im.vector.app.features.signout.soft.SoftLogoutController$buildForm$4$1.invoke(SoftLogoutController.kt:1)
at im.vector.app.core.epoxy.ListenerKt$$ExternalSyntheticLambda0.onClick(R8$$SyntheticClass:1)
at im.vector.app.core.utils.DebouncedClickListener.onClick(DebouncedClickListener.kt:5)
at android.view.View.performClick(View.java:6597)
at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:2)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25906)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Restarting Synapse, the affected apps, and the devices; and clearing cache did not help. Web and desktop users do not have this issue to our knowledge and are able to sign in after being signed out.
Your phone model
Samsung Galaxy Z Flip, Sony Xperia XA1
Operating system version
Android 10, 8
Application version and app store
Element 1.4.4, olm 3.2.10, Google Play and F-Droid versions
Homeserver
Synapse 1.55.2
Will you send logs?
Can’t rageshake, so can’t send logs.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
This crash will be fixed in https://github.com/vector-im/element-android/pull/5398 which just needs a bit more testing before it can be merged
Is there some artifact from a pipeline i can use for the apk? or how would i acquire it? edit: ignore this question, already found it