-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Android Client change server functionality broken after v1.34.0 #6671
Comments
It appears to have happened in this commit. |
@maisem I think this is due to the fast user switching refactoring. When the app is in the initial state (with a new profile) we don't persist any data until there's a login. The I think the fix here would be to do something like that what we do for the Mac app with tailscale/corp#8137 where we do the tailscale/cmd/tailscale/cli/up.go Lines 657 to 659 in c084c7d
UpdatePrefs when starting.
|
I was wrong in the comment above, and I think this was actually broken with changes within ipnlocal. The functionality was introduced with this commit: Where the little hack involving When the app opens, it inserts data from *stateStore into ipnlocal in the localBackend structure which enabled the custom control URL to be injected into start() before it gets initialized. Where I think @maisem rolled through and wrecked this patchy work around by removing ServerURL from localBackend in this commit: Go didn't even exist the last time I wrote a line of code so I'm pretty rusty. But I'll figure out how to make go.mod do what I want later this evening, and build an apk to confirm this. |
Fwiw, this is also happening on windows. I've documented the process in a video below. This is the latest version of the windows client. I set the registry keys necessary like the headscale docs show. This indicates to me this is likely not an android specific issue 2022-12-12.15-57-05.mp4 |
I just finished setting up a headscale instance for the first time and was confused why I wasn't able to sign in with the Android app. This explains it. How fast do you think you can ship a bugfix? Unfortunately I'm not a good coder but I can help with testing the fix. |
We have not released 1.34.1 for Android yet, working on a fix. Unfortunately we may need a change in https://github.com/tailscale/tailscale to do so which means it would need a 1.34.2 release. |
Updates tailscale/tailscale#6671 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Current effort is in tailscale/tailscale-android@main...serverurl :
It still isn't working though. I can see Start() being called, and it looks like it stops the backend and never restarts it:
Clicking on "Sign in with other" just sits there, never launching a browser window. WantRunning is I also tried using EditPrefs in case there is some side-effect, but no difference. We do see: which is near the end of Start(): tailscale/ipn/ipnlocal/local.go Line 1345 in af31277
|
Updates tailscale/tailscale#6671 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Figured out the deadlock and got past that point, testing some more. |
With the Fast User Switching support in Tailscale 1.34, it is no longer necessary (nor sufficient) to exit and restart the app, as the settings are saved upon first connection. Therefore: - do not restart the app after changing the control URL, just go back to the authentication screen. - call `ipn/ipnlocal/local.go:Start()` to reinitialize the backend using the new auth URL. Fixes tailscale/tailscale#6671 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Appreciate the work on this @DentonGentry |
With the Fast User Switching support in Tailscale 1.34, it is no longer necessary (nor sufficient) to exit and restart the app, as the settings are saved upon first connection. Therefore: - do not restart the app after changing the control URL, just go back to the authentication screen. - call `ipn/ipnlocal/local.go:Start()` to reinitialize the backend using the new auth URL. Fixes tailscale/tailscale#6671 Signed-off-by: Denton Gentry <dgentry@tailscale.com> Signed-off-by: Denton Gentry <dgentry@tailscale.com>
I believe this is fixed in 1.34.1, which is in review for the Play Store release. |
With the Fast User Switching support in Tailscale 1.34, it is no longer necessary (nor sufficient) to exit and restart the app, as the settings are saved upon first connection. Therefore: - do not restart the app after changing the control URL, just go back to the authentication screen. - call `ipn/ipnlocal/local.go:Start()` to reinitialize the backend using the new auth URL. Fixes tailscale/tailscale#6671 Signed-off-by: Denton Gentry <dgentry@tailscale.com> Signed-off-by: Denton Gentry <dgentry@tailscale.com> (cherry picked from commit 0244fd1)
@DentonGentry I can confirm that it is fixed. I just built it with the latest commits and it worked as expected. 🥇 |
Android tailscale client 1.48.2 Although I was able to enable "custom server", and it worked with my headscale, but |
I can confirm what @axxonadmin is saying. |
This is still an issue. I've even reinstalled my headscale server to make sure it wasn't an issue there. Very frustrating since at one point I could have tasker connect me to my headscale server when I left the house since I'm behind cgnat. Hope to see a fix. |
What is the issue?
Verified issue with 2 others running headscale servers.
v1.33.97 is the last version that we have found this function to not be broken.
Starting with v1.34.0, we are able to tap the hamburger icon several times to add the change server option, select it, enter the new address, and press restart the app, at which point it closes and never reopens, all of which mirrors the previous version's behavior.
After reopening, the change server option is still available, and the address to the new server is still in the input box, but pressing the button loads the tailscale login, and no connection attempts show on the server.
Steps to reproduce
Upgrade to v1.34.0 or above.
Are there any recent changes that introduced the issue?
No response
OS
Android
OS version
Andriod 13
Tailscale version
1.34.0
Bug report
No response
The text was updated successfully, but these errors were encountered: