Skip to content

android: fix silent login failure and double browser#746

Merged
kari-ts merged 1 commit intomainfrom
kari/loginlog
Mar 2, 2026
Merged

android: fix silent login failure and double browser#746
kari-ts merged 1 commit intomainfrom
kari/loginlog

Conversation

@kari-ts
Copy link
Collaborator

@kari-ts kari-ts commented Feb 26, 2026

login() has a race where, when WantRunning transitions from false to true, cc.Login is called on the current control client; this races with start() tearing down the old control client and creating a new one. In a slow network, start() resets the old client before the auth URL is received, and no new browse URL is created for the new client. -We fix this by not setting WantRunning=true until starting

Also clear the Notifier.browseToURL before relaunching MainActivity after auth to resolve issue where there is a second browser that reopens with the already consuemd URL

login() has a race where, when WantRunning transitions from false to true, cc.Login is called on the current control client; this races with start() tearing down the old control client and creating a new one. In a slow network, start() resets the old client before the auth URL is received, and no new browse URL is created for the new client.
-We fix this by not setting WantRunning=true until starting

Also clear the Notifier.browseToURL before relaunching MainActivity after auth to resolve issue where there is a second browser that reopens with the already consuemd URL

Updates tailscale/tailscale#18304
Signed-off-by: kari-ts <kari@tailscale.com>
@kari-ts kari-ts merged commit 7c16d1d into main Mar 2, 2026
4 checks passed
@kari-ts kari-ts deleted the kari/loginlog branch March 2, 2026 22:41
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