Repository navigation
Don't crash opening the start-conversation sheet with no logged-in user - #2276
Draft
mpretty-cyro wants to merge 1 commit into
Draft
mpretty-cyro wants to merge 1 commit into
mpretty-cyro wants to merge 1 commit into
Conversation
Tapping the home screen's new-conversation button read the account ID with requireLocalNumber, which throws when there is no logged-in state. Play Console shows this on 1.33.9 for 6 users. Why Home is on screen without a login state isn't known, so this only logs and ignores the tap instead of crashing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor checklist
compilePlayQaKotlin); not run on a deviceFixes #1234syntaxDescription
Crash cluster in 1.33.9:
IllegalArgumentException: No logged in userfromLoginStateRepository.requireLoggedInState, reached fromHomeViewModel.onCommand(ShowStartConversationSheet) when the home screen's new-conversation button is tapped (6 users / 6 events). The code is unchanged since before 1.33.7.The sheet needs the account ID, and
requireLocalNumberthrows when there is no logged-in state. The stack doesn't show why the home screen is up with no login state, so this doesn't fix that. It reads the account ID withgetLocalNumber, and when it's null it logs a warning and ignores the tap. When a user is logged in nothing changes.Confidence: high that it stops this crash. It doesn't explain the cause, and something else on the same screen may throw for the same reason.
Testing: compiled only. The no-login state wasn't reproduced, and the logged-in path wasn't run on a device; it gets the same account ID as before.