Repository navigation
Conversation
The server can accept the credentials, and the app can still refuse to save the account. This happens in two cases: - An account with the same user and server already exists on the device (ACCOUNT_NOT_NEW). - An existing account signs in again, and the server returns another user ID than the one of the account (ACCOUNT_NOT_THE_SAME). In both cases, onCredentialsAccepted() shows the server address form again, and puts the message under the address field. In the standard build, the person never saw that message. updateAuthStatus() treats both results as fatal when showWebViewLoginUrl is false. This flag is false in every build that has no branded web login URL. For a fatal result, updateAuthStatus() shows the message in a snackbar and closes the activity. The snackbar belongs to the closing activity, so it disappears at once. The person saw the address form again, or saw the sign-in screen close, without any explanation. The activity is meant to close only in a build that has no address field for the message. Pull request 5061 of the upstream repository introduced this behavior. It read the flag from show_server_url_input in every build, and it showed the message in a Toast. - The server address login now sets showWebViewLoginUrl, because this login always shows the address field. The activity stays open and shows the message. - The builds that still close the activity show the message in a Toast. A Toast stays visible after the activity closes. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
The server can accept the credentials, and the app can still refuse to save the account:
ACCOUNT_NOT_NEW).ACCOUNT_NOT_THE_SAME).In the standard build, the person sees no message in either case.
updateAuthStatus()treats both results as fatal whenshowWebViewLoginUrlis false. This flag is false in every build that has no branded web login URL. For a fatal result,updateAuthStatus()shows the message in a snackbar and callsfinish(). The snackbar belongs to the closing activity, so it disappears at once.Change
initServerUrlLogin()setsshowWebViewLoginUrl, because the server address login always shows the address field. The activity stays open, andonCredentialsAccepted()shows the message under the address field.This restores the behavior of pull request 5061 of the upstream repository.
How to verify
In a branded build with
webview_login_urlset andshow_server_url_inputfalse, the same steps show a Toast with the message, and then the screen closes.🖼️ Screenshots
No screenshots. The change was not run on a device.
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)
🤖 Generated with Claude Code