Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix edgecase crash when login fails causes crash #1278

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Nov 15, 2023

Fixes this crash

Atm caused by v0.19 login attempts

tried to keep error msg short, probably doesn't get fully shown atm already

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:316)
 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:942)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loopOnce(Looper.java:226)
 at android.os.Looper.loop(Looper.java:313)
 at android.app.ActivityThread.main(ActivityThread.java:8762)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thx.

BTW I've been working on the v0.19 upgrade, as we're getting ready for a backend release. ATM I've just been supporting v0.19 only, and right now I'm just thinking of upping the minimum_supported_version field. I'm not against backward compatibility, but its something I don't have time to work on, esp given the large number of API and auth-type changes to nearly every struct.

@dessalines dessalines merged commit af67557 into LemmyNet:main Nov 15, 2023
1 check passed
@MV-GH MV-GH deleted the fix_crash_on_show_toast branch November 15, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants