Error In Login Flow
Steps to reproduce
- I'm on a Google Pixel 7 Pro with the Android 13 QPR2 Beta 3 Build. Start the latest instance of Element X Android (v8 architecture)
- Login using your login details.
- Tap on "Continue" An error message occurs, (shown in screenshot)
No logs are provided as Rageshake does not work in this scenario.
Outcome
What did you expect?
The app to login, and proceed to the Home Chat List Page.
What happened instead?
An Error Message occurred (see screenshot)

Your phone model
Google Pixel 7 Pro
Operating system version
Android 13 QPR2 Beta 3
Application version and app store
Element X Android V0.1.0, arm64 v8a architecture, version code 1001002
Homeserver
matrix.org
Will you send logs?
No
Are you willing to provide a PR?
No
Having the logs are pretty important to be able to debug this issue.

I'm able to trigger a rageshake at the login window. You may just need to shake your phone harder (The default shake detection threshold is also quite conservative). Or have you been able to login previously and disabled rageshakes? They should be on by default, so try clearing the storage of the app in that case.
Alternatively, you could (with some setup) enable developer mode on your phone, connect your phone to your computer and export logs via adb logcat.
I'll note that I don't see an attempted login from @idubno:matrix.org on matrix.org from either today or yesterday. So it seems the login request is not actually making it to the homeserver due to this error.
Ah yes, I thought of using LogCat before, but I wasn't sure if it did internal app logs. (turns out it does)
Anyhow, I have used LogCat to debug the app, and now have obtained logs.
Here they are:
2023-03-15 12:09:39.676 12360-12389 RustMatrix...vice$login io.element.android.x.debug E Fail login
org.matrix.rustcomponents.sdk.AuthenticationException$Generic: An error occurred: failed to read or write to the crypto store the account in the store doesn't match the account in the constructor: expected @idubno:matrix.org:LAJVCCSATX, got @idubno:matrix.org:SMAPTYFEDV
at org.matrix.rustcomponents.sdk.FfiConverterTypeAuthenticationError.read(matrix_sdk_ffi.kt:7035)
at org.matrix.rustcomponents.sdk.FfiConverterTypeAuthenticationError.read(matrix_sdk_ffi.kt:7027)
at org.matrix.rustcomponents.sdk.FfiConverter$DefaultImpls.liftFromRustBuffer(matrix_sdk_ffi.kt:153)
at org.matrix.rustcomponents.sdk.FfiConverterRustBuffer$DefaultImpls.liftFromRustBuffer(matrix_sdk_ffi.kt:165)
at org.matrix.rustcomponents.sdk.FfiConverterTypeAuthenticationError.liftFromRustBuffer(matrix_sdk_ffi.kt:7027)
at org.matrix.rustcomponents.sdk.FfiConverterTypeAuthenticationError.liftFromRustBuffer(matrix_sdk_ffi.kt:7027)
at org.matrix.rustcomponents.sdk.FfiConverterRustBuffer$DefaultImpls.lift(matrix_sdk_ffi.kt:166)
at org.matrix.rustcomponents.sdk.FfiConverterTypeAuthenticationError.lift(matrix_sdk_ffi.kt:7027)
at org.matrix.rustcomponents.sdk.FfiConverterTypeAuthenticationError.lift(matrix_sdk_ffi.kt:7027)
at org.matrix.rustcomponents.sdk.AuthenticationException$ErrorHandler.lift(matrix_sdk_ffi.kt:7023)
at org.matrix.rustcomponents.sdk.AuthenticationException$ErrorHandler.lift(matrix_sdk_ffi.kt:7022)
at org.matrix.rustcomponents.sdk.AuthenticationService.login(matrix_sdk_ffi.kt:9466)
at io.element.android.libraries.matrix.impl.auth.RustMatrixAuthenticationService$login$2.invokeSuspend(RustMatrixAuthenticationService.kt:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Hope this helps!
Interesting, it sounds like the application is not clearing out the storage of the rust-sdk correctly between login attempts.
@iDubno can you try clear the app's storage via Android's App Info screen (tap and hold on the app icon and touch Info -> Clear Storage) and see if you can then login successfully? Perhaps monitor logs while doing so just in case you receive a different error.
I also had this error message after logging out and trying to log back in. Clearing the Apps Storage solved the Problem.
Hello, after multiple tries (as this was my initial intuition of fixing the problem, except the first time I tried it didn't appear to fix the Problem), this seems to be a workaround for the Problem. (:
Thanks for all your help!
@jmartinesp is it not supposed to be fixed?
I think this can still happen if either a logout attempt or the restoreSession call somehow fail. We probably need a cleanup step there that removes any traces of the local session storage.
I think this can still happen if either a logout attempt or the
restoreSessioncall somehow fail.
I think this is what Happened in my case, i haven't gotten around to opening a Issue yet but i Logged out as a Troubleshooting step because the App would successfully log in on my matrix server but would then not talk to my own sliding-sync proxy (Works with other clients) and just show a Placeholder Roomlist Instead.
@iDubno are you still seeing this issue?
Hi, I'm going to close this issue for now as we haven't been able to reproduce it recently. Please tag me in your reply if you're still seeing it and I can reopen it for you
I just ran into this on release 0.4.6, latest APK here from GitHub. I've been logged out (no clue why), couldn't log back in with the not-very-helpful message "An error occured". Clearing the app cache and storage helped.
Sorry that I can't give you anything more useful than that, I didn't capture logs before clearing storage :( Still, you might want to know that this is still happening. @kittykat