core icon indicating copy to clipboard operation
core copied to clipboard

tailscale integration : asks for API key every other day, sometime even multiple times per day

Open ledshark24 opened this issue 4 months ago • 74 comments

The problem

The tailscale integration asks for a new API key every other day, sometime even multiple times per day.

The API access token given to the integration is supposed to be valid for 90 days. Yet I have a notification to renew it in HA every other day. Twice today.

How to reproduce :

  1. set up tailscale integration
  2. provide a 90 days token
  3. wait a few days / hours
  4. tailscale integration uses HA notification to ask for a new token. Provide a 90 days one, it will last a few days / hours.

What version of Home Assistant Core has the issue?

core-2025.8.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tailscale

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tailscale/

Diagnostics information

config_entry-tailscale-01JH0NF44T78EM5BF4XSNV89FP.json

Example YAML snippet


Anything in the logs that might be useful for us?


Additional information

No response

ledshark24 avatar Aug 21 '25 13:08 ledshark24

Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (tailscale) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tailscale can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tailscale Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tailscale documentation tailscale source (message by IssueLinks)

home-assistant[bot] avatar Aug 21 '25 13:08 home-assistant[bot]

Same issue here

madtraxx18 avatar Aug 21 '25 14:08 madtraxx18

Same here:

Authentication failed while fetching tailscale data: Authentication to the Tailscale API failed

TomDijk avatar Aug 21 '25 16:08 TomDijk

Got another one about half an hour ago. Logs may not be helpfull :( same logs than @TomDijk

Enregistreur: homeassistant.components.tailscale
Source: helpers/update_coordinator.py:445
intégration: Tailscale (documentation, problèmes)
S'est produit pour la première fois: 18:45:45 (1 occurrence)
Dernier enregistrement: 18:45:45

Authentication failed while fetching tailscale data: Authentication to the Tailscale API failed

ledshark24 avatar Aug 21 '25 17:08 ledshark24

Same issue for me as well.

Tomanic-glitch avatar Aug 21 '25 23:08 Tomanic-glitch

I’m also experiencing this, fresh api tokens are being claimed invalid by the integration in about a day or so.

This issue is a duplicate of #150938, but there is slightly more information on this ticket.

Happy to provide more information but I’d need some guidance on what to gather from where and how.

Thank you!

danivovich avatar Aug 22 '25 01:08 danivovich

also having this issue, normally dont really need to think much of tailscale. this week i swapped the keys twice, and is currently asking which would be a 3rd time.

mcmtaged4 avatar Aug 22 '25 02:08 mcmtaged4

Same here, found out that either restaring HA, or via Spook disable, enable an integration action temporarily resolves that

AlexKusnezov avatar Aug 22 '25 16:08 AlexKusnezov

Same here.

2025-08-22 17:43:00.419 ERROR (MainThread) [homeassistant.components.tailscale] Authentication failed while fetching tailscale data: Authentication to the Tailscale API failed

I checked Tailscale logs on the console and there is no corresponding alert or log for that timeframe on tailscale.

Feighery avatar Aug 22 '25 18:08 Feighery

I made the upgrade to 2025.8.3 this morning (around 10am local time) Tailscale was in the failed status when I did it and the restart cleared the failed status for a time. It was incident free for most of the day. Then...

2025-08-22 18:42:39.639 ERROR (MainThread) [homeassistant.components.tailscale] Authentication failed while fetching tailscale data: Authentication to the Tailscale API failed

ledshark24 avatar Aug 22 '25 19:08 ledshark24

Restarting HA cleared the error. Wondering if it's an API timeout issue or similar. Will attempt restart of just integration next time.

mikegull avatar Aug 22 '25 21:08 mikegull

I can also confirm that rebooting HA cleared the error so I will monitor to see if it comes back.

Feighery avatar Aug 22 '25 21:08 Feighery

Same here, a full reboot clears the issue for a time, yet a "simple" restart of HA did not.

ledshark24 avatar Aug 23 '25 11:08 ledshark24

Seems like the issue has been resolved. It coincided with upgrading to Core 8.3 yestereday. I left the integration down and did not update the API key. The integration came up on its own and has been stable for 24hrs after the upgrade.

josephjaskolski avatar Aug 23 '25 14:08 josephjaskolski

Seems like the issue has been resolved. It coincided with upgrading to Core 8.3 yestereday. I left the integration down and did not update the API key. The integration came up on its own and has been stable for 24hrs after the upgrade.

Good to know, I'm still on 8.2 and won't be able to uodate til next week, but for me disable the enable integration action (Spook) did the trick (running for 48h without complaints)

AlexKusnezov avatar Aug 23 '25 15:08 AlexKusnezov

Sorry to disappoint, @josephjaskolski but I've upgraded to 8.3 and still had the issue at least one.

ledshark24 avatar Aug 24 '25 07:08 ledshark24

Seems like the issue has been resolved. It coincided with upgrading to Core 8.3 yestereday. I left the integration down and did not update the API key. The integration came up on its own and has been stable for 24hrs after the upgrade.

Good to know, I'm still on 8.2 and won't be able to uodate til next week, but for me disable the enable integration action (Spook) did the trick (running for 48h without complaints)

Sorry @AlexKusnezov, stupid question but what does this mean? i cannot for the life of me find a way to disable the enable integration action anywhere in spook.

jwijesuria avatar Aug 24 '25 16:08 jwijesuria

Seems like the issue has been resolved. It coincided with upgrading to Core 8.3 yestereday. I left the integration down and did not update the API key. The integration came up on its own and has been stable for 24hrs after the upgrade.

Good to know, I'm still on 8.2 and won't be able to uodate til next week, but for me disable the enable integration action (Spook) did the trick (running for 48h without complaints)

Sorry @AlexKusnezov, stupid question but what does this mean? i cannot for the life of me find a way to disable the enable integration action anywhere in spook.

Sure, meant the actions that come with the spook integration: Screenshot_20250824_190449_Home Assistant.jpg

AlexKusnezov avatar Aug 24 '25 17:08 AlexKusnezov

Seems like the issue has been resolved. It coincided with upgrading to Core 8.3 yestereday. I left the integration down and did not update the API key. The integration came up on its own and has been stable for 24hrs after the upgrade.

Good to know, I'm still on 8.2 and won't be able to uodate til next week, but for me disable the enable integration action (Spook) did the trick (running for 48h without complaints)

Sorry @AlexKusnezov, stupid question but what does this mean? i cannot for the life of me find a way to disable the enable integration action anywhere in spook.

Sure, meant the actions that come with the spook integration: Screenshot_20250824_190449_Home Assistant.jpg

Thank you! That seems to have worked for me, that or the upgrade to 8.3 I suppose.

jwijesuria avatar Aug 26 '25 21:08 jwijesuria

Just freshly installed Tailscale integration yesterday, restarted HA after, HAOS up to date. Logged in this morning to a failed API message. Soft reboot (not restart) and the notification has disappeared.

Alby247 avatar Aug 28 '25 22:08 Alby247

Same issue here. Last key updates: 14.8.2025 24.8.2025 28.8.2025 29.8.2025 30.8.2025 Tailscale and HA works otherwise quite fine.

jkosatko avatar Aug 30 '25 10:08 jkosatko

Same issue here on 8.3. Reloading the integration clears the error for a time and then it reoccurs within 24-48 hours.

rlowellfl avatar Aug 31 '25 15:08 rlowellfl

Same for me as well. It doesn't accept the API key at all.

Fayyaadh avatar Aug 31 '25 15:08 Fayyaadh

Same for me.

Image

Screenshot_20250901_214055_Home Assistant.png

Bygood91 avatar Sep 01 '25 03:09 Bygood91

2025.8.3 with os 16.0 seems to be running fine, did a full restart after the update.

madtraxx18 avatar Sep 01 '25 19:09 madtraxx18

I'm pretty sure this is a race condition or poor network error recovery. Regenerated the token and saved it in a secure note in 1password. When HA fails I give it the same token from before and it works for a few days before failing again. In other words it's not actually an expired api token - even if HA thinks it is.

Tailscale add on 0.26.0 
Installation method: Home Assistant OS
Core 2025.9.0
Supervisor 2025.08.3
Operating System 16.1

jpettitt avatar Sep 05 '25 19:09 jpettitt

I find just restarting the integration resolves it. So as @jpettitt said it seems like a race condition.

nsleigh avatar Sep 05 '25 23:09 nsleigh

I did a couple of upgrades yesterday, Got the error this morning.


  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2025.9.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.13.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Paris",
    "os_name": "Linux",
    "os_version": "6.12.41-haos",
    "container_arch": "amd64",
    "supervisor": "2025.08.3",
    "host_os": "Home Assistant OS 16.1",
    "docker_version": "28.3.3",
    "chassis": "vm",
    "run_as_root": true
  },

 Tailscale : 0.26.0

ledshark24 avatar Sep 06 '25 13:09 ledshark24

Everybody is commenting, but which one of you has tried a full system reboot? So not just home assistant a full reboot

madtraxx18 avatar Sep 06 '25 13:09 madtraxx18

Everybody is commenting, but which one of you has tried a full system reboot? So not just home assistant a full reboot

I did and got this error right away, for me it's, like mentioned before, using disable/enable an integration action via spook the current workaround. Nor reboot needed and this keeps it quiet for a couple of days

AlexKusnezov avatar Sep 06 '25 13:09 AlexKusnezov