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

Android Always-On-VPN turns off after a Restart (tailscale changes from Active to Stopped) #9428

Closed
tom-hampton opened this issue Sep 16, 2023 · 20 comments
Labels
bug Bug OS-android Issues involving Tailscale for Android

Comments

@tom-hampton
Copy link

tom-hampton commented Sep 16, 2023

What is the issue?

this is not a duplicate of #2481. That issue noted that tailscale was stopped before reboot. This issue specifically notes that tailscale was active prior to the reboot.

  1. Tailscale is set as always on VPN in settings
  2. Tailscale is active and connected
  3. Restart android
  4. Tailscale is stopped after reboot.

I get an error in notifications pull down from the VPN system stating "tailscale is setup to stay connected all the time, but it can't connect right now. Your phone will use the public internet until tailscale can connect."

From that dialog I can "change VPN settings" or open the app. If I open the app I can the set tailstale from stopped to active, and everything works fine, until I reboot again....which repeats the experience.

Steps to reproduce

  1. Tailscale is set as always on VPN in settings
  2. Tailscale is active and connected
  3. Restart android
  4. Tailscale is stopped after reboot.

Are there any recent changes that introduced the issue?

No. I only recently noticed that it wasn't working anymore. It was working back in January when I first enabled always-on VPN.

OS

Android

OS version

Samsung Android 12 (S21 Ultra)

Tailscale version

1.48.2

Other software

No response

Bug report

BUG-674e2f81e675fd5c8ce3d95ccfbb6a003a068c68404263d937d5e0c4f62b5a8b-20230916215324Z-7b370335137689fa

@Craeckie
Copy link

I have the same problem on Lineage OS 20 (Android 13).
It occurres since the update 1.44.1 -> 1.48.0.

Additionally, the exit node is disabled every time, so I need to open the menu -> Use Exit Node and select one.

It also happens on my second tailscale in a work profile, where I have to re-enable it and the exit node every time I activate the work profile.

@senses3
Copy link

senses3 commented Sep 20, 2023

Same issue as previous posts. Tailscale is connected -> reboot phone -> tailscale is NOT connected -> enter tailscale app -> existing login is not listed, I have to click on 'choose server' and then click 'login' (i'm connecting to my own headscale server) and it will reconnect, but it forgets the previous exit node configuration.

I'm on tailscale 1.48.2 on grapheneOS (Android 13)

@Quintasan
Copy link

Quintasan commented Sep 25, 2023

I just ran into the same issue on Pixel 6 Pro with the latest Android

BUG-e3182861ba51ed076d489d8d04caf74323d6ced0fcbab0fc49053575986a361c-20230925161828Z-33594889d94f5949

@SamLMB
Copy link

SamLMB commented Oct 11, 2023

Exact same issues on Android 11, phone and tablet. Same steps to reproduce and same tailscale verison 1.48.2.

Bug report on phone while android reports issue with always-on VPN and tailscale is STOPPED: BUG-f2a24b72b6378f254a1bc182407d9af6fab16fc29e169330bf19008afd6145d2-20230921150018Z-ceeeeb5cda22e51d

Bug report on phone when tailscale is subsequently set to active: BUG-f2a24b72b6378f254a1bc182407d9af6fab16fc29e169330bf19008afd6145d2-20230921150030Z-089dd2e08459622b

@andrius
Copy link

andrius commented Oct 25, 2023

Same with Samsung Note20

@mtabin89
Copy link

mtabin89 commented Nov 29, 2023

Same with Samsung galaxy s10e (android 12) and Motorola moto g31w (android 11), both with tailscale 1.54.0

@r01k
Copy link

r01k commented Dec 30, 2023

Same here.

@Johnny-Larue
Copy link

Happening on all Android phones, independent of manufacturer OS and Android version. Version 1.44.0 seems to have been the first version with the bug, as 1.42.0 is the last version that did not exhibit this behaviour.

@catzkorn catzkorn added OS-android Issues involving Tailscale for Android and removed needs-triage labels Feb 7, 2024
@catzkorn
Copy link
Contributor

catzkorn commented Feb 7, 2024

Hi,

We recently begun work on Android again, we will update related issues when we have further information.

@SurfingSpider
Copy link

The tempory solution for tailscale not autostarting on android boot that I have found to work is to use Tasker android app. To open tailscale and activate it when I leave the home WiFi. There is a profile on Taskernet that will do it for you. You just have to input your WiFi network name. I have it working on my families phones and seams to work

https://taskernet.com/shares/?user=AS35m8mw6l1fRiYiFT08BoSg2mZkLHMIM%2FLqDO6Cu6wtD0G6d6P0V2ScVHtXYxjUT0DfjK5lPQd9Fm4%3D&id=Profile%3ATailscale+When+Not+Home

Obviously I would prefer not to have to use this and them to actually fix the app.

@tsmoneta
Copy link

tsmoneta commented Mar 5, 2024

That doesn't address the exit node issue though, does it? The exit node times out on open (I suspect an order of operations error), so Tailscale won't reselect it.

@Immanuel31
Copy link

# connect
adb shell am broadcast -n com.tailscale.ipn/.IPNReceiver -a com.tailscale.ipn.CONNECT_VPN
​
# disconnect
adb shell am broadcast -n com.tailscale.ipn/.IPNReceiver -a com.tailscale.ipn.DISCONNECT_VPN

The above should do the trick if you can connect to the device via adb (Android Debug Bridge).

@scientiac
Copy link

If you're rooted.

Using @Immanuel31 's method, just put the following line in a file in the `.termux/boot/' directory after setting up termux and termux:boot.

su -c "am broadcast -n com.tailscale.ipn/.IPNReceiver -a com.tailscale.ipn.CONNECT_VPN"

(Make sure to update the packages and install su inside termux.)

@sersorrel
Copy link

root is not required for this. just run am normally.

@Casols
Copy link

Casols commented Mar 18, 2024

Hi,

We recently begun work on Android again, we will update related issues when we have further information.

@catzkorn any news on this subject or is it possible to install the 1.42.0 version somehow untill a fix is released?

@mtabin89
Copy link

Hi,
We recently begun work on Android again, we will update related issues when we have further information.

@catzkorn any news on this subject or is it possible to install the 1.42.0 version somehow untill a fix is released?

I wasn't target of your question but yes, downgrade will work (I've done it on all of my devices today). Just download apk 1.42.0 from whatever site you use (I used apkmirror), check for viruses (you can use virustotal), install, enable pernament VPN on your phone and turn off autoupdate in google play.

That's it, you are done.

@ENTPRESTIGIOUS
Copy link

ENTPRESTIGIOUS commented Mar 26, 2024

Same issue and it's very annoying. And I thought this was the expected behaviour when rebooting. Also thought I was the only one who wasn't happy with this.

@mdoh66
Copy link

mdoh66 commented Apr 6, 2024

Same issue on a Pixel 6 and Pixel 6 Pro

@316filip
Copy link

I received an update two days ago and I haven't noticed this problem since. Also the UI overhaul looks great!

@kari-ts
Copy link
Contributor

kari-ts commented Apr 15, 2024

This issue has been fixed and is working in our release that is out in beta. If you're interested in becoming a beta tester, please use this link for Android or click here to sign up via web and help us test out our app. Thank you for helping us improve our app!

@kari-ts kari-ts closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug OS-android Issues involving Tailscale for Android
Projects
None yet
Development

No branches or pull requests