Skip to content
Source
Sign inSign up
pingdotgg/t3code

Tailscale HTTPS shows off and cannot be disabled in Settings when local DNS fails #14746

Openrabesss(GitHub profile, opens in a new tab) opened this issue 5 comments

What happened

Settings → Connections shows Tailscale HTTPS as off, although it is enabled and Tailscale Serve is exposing the backend on port 443. Turning the switch on and confirming Setup does nothing, and Settings offers no way to turn it off. This happens when the machine can't resolve its own MagicDNS name (tailscale set --accept-dns=false).

Diagnosis

The switch shows the result of a reachability probe instead of the saved setting, and the probe resolves the MagicDNS name through the OS resolver. Line numbers are from main @ 54084ae1; these files haven't changed since 99e08526.

  • apps/desktop/src/backend/tailscaleEndpointProvider.ts:82,93: the endpoint is available only if Serve is enabled and the probe passes.
  • packages/tailscale/src/tailscale.ts:365-381: the probe GETs https://<MagicDNS>/.well-known/t3/environment with the desktop Undici client (apps/desktop/src/main.ts:216), so it goes through the OS resolver. A failure or timeout returns false, and the endpoint becomes unavailable.
  • apps/web/src/components/settings/ConnectionsSettings.tsx:3181-3183: checked={tailscaleHttpsEndpoint.status === "available"}.
  • apps/desktop/src/settings/DesktopAppSettings.ts:326-341: re-enabling with the same port is a no-op, so requiresRelaunch: false (apps/desktop/src/backend/DesktopServerExposure.ts:525-528).
  • Disable is offered only on the switch's checked → unchecked path. The endpoint-row Disable button also requires available (ConnectionsSettings.tsx:1311-1313), and the rendered endpoint list leaves Tailscale HTTPS out anyway (:2568, :2838).
  • Unavailable endpoints are left out of pairing options (ConnectionsSettings.tsx:641), and Authorized clients is shown only for network-accessible || HTTPS available (:3388). Existing client authorizations are not revoked.
  • Graceful backend shutdown tries to remove the mapping (apps/server/src/server.ts:683, release at :717), but the saved setting stays true, so the next launch configures it again.

Suggested fix:

  1. Bind the switch to tailscaleServeEnabled. Keep Disable reachable when discovery or the probe fails, and show probe health as a separate note. Keep Authorized clients visible when Network access or the saved Serve setting is on. Keep endpoint health checks for pairing: a saved true means configured intent, so it should not mark the endpoint available by itself.
  2. Optional: probe a parsed Tailscale IP (tailnetIpv4Addresses is parsed but unused) while keeping the MagicDNS name for SNI, Host and certificate checks, and validate the returned descriptor.
  3. Regression test: saved enabled + failed or missing endpoint → Disable and client management stay reachable.

Steps to reproduce

  1. On Linux, join a tailnet with MagicDNS and HTTPS certificates enabled. Run tailscale set --accept-dns=false and check that the system resolver can't resolve this machine's <host>.<tailnet>.ts.net name.
  2. In the desktop app, with Network access on, enable Tailscale HTTPS on port 443. After the relaunch, check that tailscale serve status proxies HTTPS to http://127.0.0.1:3773.
  3. Reopen Settings → Connections. Tailscale HTTPS shows off.
  4. Turn it on and confirm Setup. The dialog closes without a relaunch and the switch stays off.
  5. Optional: turn Network access off while Tailscale HTTPS stays configured. Authorized clients disappears.

Expected: the switch is on with the MagicDNS URL, and turning it off removes the route (docs/user/remote-access.md: "Turn it off there to remove that route.").

Version

0.0.45-nightly.20261002.2561

Environment

Arch Linux (kernel 7.1), desktop app, Tailscale 1.98.8 with MagicDNS on tailnet-wide and accept-dns=false, Node v24.16.0 for the probe check

Evidence

# tailscale serve status --json (host redacted)
{"TCP":{"443":{"HTTPS":true}},"Web":{"<host>.<tailnet>.ts.net:443":{"Handlers":{"/":{"Proxy":"http://127.0.0.1:3773"}}}}}

# desktop-settings.json (window bounds omitted)
"tailscaleServeEnabled": true

# tailscale dns status
Tailscale DNS: disabled.
MagicDNS: enabled tailnet-wide

# resolvectl query <host>.<tailnet>.ts.net
resolve call failed: '<host>.<tailnet>.ts.net' does not have any RR of the requested type

# dig +short @100.100.100.100 <host>.<tailnet>.ts.net
100.x.y.z

# curl https://<host>.<tailnet>.ts.net/.well-known/t3/environment
curl: (6) Could not resolve host: <host>.<tailnet>.ts.net

# same request with --resolve <host>.<tailnet>.ts.net:443:100.x.y.z
http_code=200

# Node 24: undici fetch (same client stack as the desktop probe) and dns.lookup
TypeError ENOTFOUND
dns.lookup: ENOTFOUND

# desktop.trace.ndjson: the probe span reports Success because the failure is recovered to false
{"name":"resolveTailscaleMagicDnsAdvertisedEndpoint","durationMs":432.4,"exit":{"_tag":"Success"}}

No open duplicate. #4919 and #4698 proposed binding the switch to the saved setting (both closed unmerged); this adds a DNS-failure repro. Related: #4028, #2830.

Fix applied or workaround

On this machine, setting "tailscaleServeEnabled": false in desktop-settings.json and running tailscale serve --https=443 off removed the route, and the setting held after restart. Quit T3 Code completely before editing the file, because the running app keeps settings in memory and rewrites the whole file. tailscale serve --https=443 off removes every web handler on port 443, not only T3's.

Untested alternative: temporarily enable Tailscale DNS. If the name resolves and the probe passes, turn HTTPS off in Settings, then restore the DNS setting.

Filed by

Claude Code (claude-opus-5-5), following .github/triage/PLAYBOOK.md but not launched through t3 triage. Findings cross-checked with Codex CLI (gpt-6.1-sol).

  1. Note

    Grok responding on behalf of Julius.

    Triage

    Thanks for the detailed report, @rabesss. I confirmed this on main at 54084ae1, and it's still present in nightly 0.0.45-nightly.20261002.2561. The Tailscale HTTPS switch in Settings → Connections shows whether the endpoint passed its health probe, not your saved setting. So when this machine can't resolve its own MagicDNS name, the route shows as off and you can't turn it off.

    What's happening

    • The switch is checked only when tailscaleHttpsEndpoint.status === "available" (ConnectionsSettings.tsx). That status is set only when Serve is enabled and the self-probe of https://<MagicDNS>/.well-known/t3/environment returns 2xx. Timeouts and lookup failures quietly count as "not available."
    • The desktop app probes through Undici, which uses the OS resolver. With tailscale set --accept-dns=false, the name doesn't resolve locally, even while tailscale serve status shows the proxy and desktop-settings.json still has tailscaleServeEnabled: true.
    • Confirming setup again changes nothing, because the flag and port already match, so no relaunch happens. The switch never reads DesktopServerExposureState.tailscaleServeEnabled, even though the client already has it.
    • Disable can't be reached in this state. The switch only disables on a checked-to-unchecked change, and the endpoint row with its Disable button is filtered out for Tailscale HTTPS. The URL is also left out of the pairing options while the probe fails.
    • On shutdown, disableTailscaleServe runs but the saved flag stays true, so the next launch sets the route up again. That contradicts docs/user/remote-access.md ("Turn it off there to remove that route").

    Workaround

    Quit the app first so it doesn't rewrite the file. Then set tailscaleServeEnabled to false in desktop-settings.json and remove the mapping with tailscale serve --https=443 off. That's the same command the app uses, and note that it removes every handler on 443.

    Likely fix

    Bind the switch and Disable to the saved tailscaleServeEnabled flag, keep client management available while that flag is on, and show a failed self-probe as endpoint health rather than as the setting being off. Pairing can still require a successful probe before it offers the URL. Probing the Tailscale IP while keeping MagicDNS for SNI would be a separate improvement and isn't needed to fix the control.

    Not a duplicate

    #4028 is WSL-only enablement. #2830 and open PR #10958 cover the missing "Serve is not enabled on your tailnet" error. PRs #4919 and #4698 were closed without merging. None of them cover this DNS-failure case.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsvia-triage

  4. Existing fix: #15027, already taken over by a maintainer. It covers the saved-state switch, failed self-probe, and missing-endpoint disable flow. GitCafe reports 27 successful checks at head 69bd52e8f0. Real Electron/Tailscale Serve verification is still listed as outstanding. Leaving this issue open for that PR; no duplicate PR created. No new runtime reproduction was completed in this triage.

  5. Another real-world trigger for this, with logs. Tailscale Serve was working and the name resolved fine; the endpoint just didn't respond for about the first 30 s after Serve was set up.

    macOS 27.0.1, T3 Code Nightly 0.1.4-nightly.20261027.3783, Tailscale 1.104.2. Network access on, Tailscale HTTPS enabled from Settings → Connections:

    TimeEventdurationMs
    16:48:51.375click 1: setTailscaleServeEnabled({enabled:true, port:443}) → relaunch tailscale-serve-enabled3.0
    16:48:53.627server: tailscale.runTailscaleCommand (presumably serve --bg), Success49.8
    16:48:57.189desktop: probeTailscaleHttpsEndpoint timed out → switch OFF2503.6
    16:49:03 / :16 / :20clicks 2–4: no relaunch (same settings), each check timed out → OFF~2501 each
    16:49:38.199click 5: check returned 200 → switch stays ON15.6

    Each timeout was an interrupted GET (InterruptError: All fibers interrupted), not a DNS, connection or HTTP error. After that window, checks and curl return 200 in about 12–16 ms. The settings saved on the first click. So users have to click the switch repeatedly until the endpoint finally answers.

    With #15027 the first click would stay on, which fixes this. One gap: during that ~30 s window the row would show "This machine can't reach that URL, so pairing links won't offer it." It doesn't re-check on its own, so the warning stays until something refreshes it. Consider a gentler message right after enabling, or re-checking a few times.

  6. Still happening on Linux in today's nightly. #15027 was closed without being merged, so nothing has fixed this yet.

    Fedora 45 (KDE Plasma, Wayland), T3 Code Nightly 0.1.8-nightly.20261108.4367 (AppImage), Tailscale 1.104.5 with --accept-dns=false (CorpDNS: false). The same DNS case as the original report.

    • In Settings → Sharing & access I turned on Network access, then Tailscale HTTPS (port 443). The app relaunched (desktop relaunch requested, reason: tailscale-serve-enabled).
    • Afterwards desktop-settings.json has "tailscaleServeEnabled": true, and tailscale serve status shows https://<host>.<tailnet>.ts.net (tailnet only) |-- / proxy http://127.0.0.1:3773.
    • The route works. curl --resolve <host>.<tailnet>.ts.net:443:<tailnet IP> https://<host>.<tailnet>.ts.net/ returns 200.
    • The Tailscale HTTPS switch still shows off. Turning it on again opens the "Set up Tailscale HTTPS?" dialog, and Enable does nothing: no relaunch, the backend PID stays the same, and the switch stays off.

    The settings page also moved from "Connections" to "Sharing & access" since this issue was filed. The switch behaves the same as described above.

  7. Another reproduction on macOS, plus a working workaround

    Same root cause as the original report, on a current nightly. Here the switch never turns on (rather than not being able to turn it off).

    Environment

    • macOS 27.2.1 (26B131), Apple Silicon
    • T3 Code Nightly 0.1.13-nightly.20261125.5258
    • Tailscale 1.104.1 (standalone CLI)
    • MagicDNS and HTTPS certificates enabled tailnet-wide; Network access on; Tailscale HTTPS set to port 443

    State while the switch shows off

    • desktop-settings.json: "tailscaleServeEnabled": true
    • tailscale serve status --json: <host>.<tailnet>.ts.net:443 -> / -> http://127.0.0.1:3773
    • curl --resolve <host>.<tailnet>.ts.net:443:<tailnet-ip> https://<host>.<tailnet>.ts.net/.well-known/t3/environment returns 200 with the expected environmentId
    • tailscale dns status reports Tailscale DNS: disabled (CorpDNS: false), so the OS resolver cannot resolve the MagicDNS name

    Evidence from the desktop trace

    GET https://<host>.<tailnet>.ts.net/.well-known/t3/environment
      getaddrinfo ENOTFOUND <host>.<tailnet>.ts.net
      at tailscale.probeTailscaleHttpsEndpoint

    node -e "require('dns').lookup('<host>.<tailnet>.ts.net', ...)" fails the same way, while dig @100.100.100.100 <host>.<tailnet>.ts.net returns the tailnet IP.

    Workaround

    Run tailscale set --accept-dns=true so MagicDNS takes over the OS resolver (/etc/resolver/<tailnet>.ts.net is installed). After that the probe returns 200 and the row shows as on with the HTTPS URL. No T3 restart is needed; re-opening Settings is enough once the endpoint query is refetched.

    Suggestion

    The optional probe from the original report (dial the parsed tailnet IP while keeping the MagicDNS name for SNI, Host and certificate validation) would make the switch work with accept-dns=false too. Binding checked to the saved tailscaleServeEnabled would at least keep it usable in this state.

    Happy to test a build on this setup if that helps.

Sign in to join this conversation.