Jwt expired, login again fails
When receiving, JWT expired snackbar with login again action, pressing it will redirect you to login. But on login it will fail with already logged in.
This case was expected and handled already be deleting it.
Backing out will show that is like current account is still that one that should be gone. Upon switching the account it seems to be fully gone and logging in again works.
This is very strange
I've noticed this too, but only on voyager.lemmy.ml , is that where you're getting this?
No, on another instance
Somehow allAccounts = repository.allAccounts in accountViewModel still has the oldAccount for a while, it must not actually exist anymore because a simple swaps shows that it isn't listed anymore
~Log:~ I was using an old version, ignore this.
type: crash
osVersion: google/oriole/oriole:14/UQ1A.240205.002/2024030300:user/release-keys
package: com.jerboa:50
process: com.jerboa
processUptime: 14097 + 200 ms
java.lang.IllegalStateException: You must either set a text or a view
at com.android.internal.util.Preconditions.checkState(Preconditions.java:215)
at android.widget.Toast.show(Toast.java:199)
at com.jerboa.model.LoginViewModel$login$1.invokeSuspend(Unknown Source:637)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:109)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8279)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@ab93c8c, Dispatchers.Main.immediate]
What action did you do to get this exception? And thx for providing this stacktrace @anibyl
Are you still using Jerboa version 0.0.50?
This was fixed on 0.0.51 https://github.com/dessalines/jerboa/pull/1278
@MV-GH yes, I'm using 0.0.50. Apparently F-Droid wasn't updating it because newer builds were signed by a different key?.. Will update today, thanks!
The key hasn't changed, either you must have installed it from a different source (playstore or manually)
I am getting closer to the cause, so the account actually gets deleted. But things observing the total accounts didn't get notified of this change. You can see that some parts did get notified (the account list, doesn't show anon option any more because we are anon, and thus also the action buttons will show 'require account') but account top header still shows the old title and the login viewmodel which uses repository.allAccounts still has the old account list info
https://github.com/dessalines/jerboa/assets/67873169/e23e0e2b-2d2b-47f2-b326-d5a3ec327d5b