Skip to content

iOS 1.104.1: MagicSock ReceiveDERP stops while VPN shows Connected; toggling VPN restores connectivity #21832

Closed

Description

@79thales

Description

On iPhone 15, Tailscale reports Connected and both the iPhone and Home Assistant peer appear online, but the Home Assistant iOS app loses connectivity through Tailscale. The issue occurs on both Wi-Fi and cellular (5G).

The Tailscale Warnings screen explicitly reports:

MagicSock Function Not Running
The MagicSock function ReceiveDERP is not running.
You might experience connectivity issues.
Code: magicsock-receive-func-error
Magicsock Function Name: ReceiveDERP

Environment

  • Device: iPhone 15
  • Tailscale for iOS: 1.104.1
  • iOS: 26.6.2 (reported device version; please verify if needed)
  • VPN On Demand: enabled; Wi-Fi = Always; Cellular = Always (was previously disabled)
  • Exit node: None
  • Peer: Home Assistant on Tailscale (no exit node)
  • Date observed: 2026-10-18

Steps / observed behavior

  1. Connect to Tailscale and access Home Assistant via the iOS Companion App.
  2. After some time, the HA app shows the disconnected screen, on either Wi-Fi or cellular.
  3. Tailscale can still show Connected, with both peers marked online.
  4. The Warnings screen shows ReceiveDERP not running with the exact error above.
  5. Turning Tailscale VPN off and back on via the in-app toggle restores HA connectivity, without restarting the iPhone. Restarting the entire iPhone also restores connectivity.

Expected behavior

The ReceiveDERP function remains running, or automatically recovers after a network transition; the VPN should not silently lose connectivity while reporting Connected.

Actual behavior

ReceiveDERP is reported stopped and HA becomes inaccessible until the VPN is toggled.

Additional information

This may be related to #19504, but that report concerns ReceiveIPv4, whereas this report explicitly concerns ReceiveDERP. Root cause is not yet established.

No Tailscale bug-report ID or device logs have been captured yet. Can provide them on recurrence.

Activity

  1. wizardmelon commented on Oct 18, 2026

    @wizardmelon

    Same symptoms here on iOS 1.104.1, on cellular (5G), with Home Assistant peers. Adding details in case they help.

    Environment

    • Tailscale for iOS 1.104.1 (iPhone 12 Pro Max, iOS 27.0)
    • Peers are two Home Assistant servers running the Tailscale add-on. A macOS client on 1.94.1 reaches both without problems at the same time.
    • Started around the time 1.104.1 shipped (Oct 7) and has since spread to every iPhone on the tailnet. All of them show the VPN as connected.

    What I see on the phone

    • The Tailscale app shows Connected, and the control plane works: control: successful lite map update in 1.189s, PollNetMap ok, netcheck: udp=true v6=false mapvarydest=true derp=4.
    • Warning screen: magicsock-receive-func-error (log line: Dropping health warnings with codes ["magicsock-receive-func-error"]). Earlier the same day the app also showed Network Map Response Timeout (mapresponse-timeout, 2m8s).
    • Two peers never complete the WireGuard handshake. This repeats every 5 s with no end:
      wg: [XXXXX] - Handshake did not complete after 5 seconds, retrying (try 17)
      wg: [XXXXX] - Sending handshake initiation
    • Also logged on every map request: control: failed to sign node key with hardware attestation key: failed to sign message: secure enclav… (the line is truncated in the log viewer).
    • tailscale ping from the macOS client to the phone times out (no reply).

    What I see on the server side (Tailscale add-on, Home Assistant OS)

    • magicsock: derp-4 does not know about peer [...], removing route, repeating. The server tries to answer the phone through DERP region 4 (fra), but the phone does not appear to be connected to that region.

    This matches the symptom in this issue (ReceiveDERP stops while the VPN says Connected). Once the receive path is dead, apps that keep retrying toward the peers (the Home Assistant companion app here) probably trigger the buffer-pool exhaustion described in #21773, so the whole tunnel stalls longer than it should.

    Turning the VPN off and on helps only briefly. I have not reinstalled the app yet. I can attach a Tailscale bug report ID if it would help.

  2. 79thales commented on Oct 18, 2026

    @79thales
    Author

    Thx for confirmation

  3. joshenders commented on Oct 19, 2026

    @joshenders

    This has happened to me twice today. Had to restart the phone to fix it both times. Tailscale never recovered after killing the app nor allowed me to log out. Would just stay forever in this state: image

    The only thing that may be non-standard in my usage is that I require FaceID to unlock the app.

    Tailscale 1.104.1 on iPhone 16 Pro 27.0.1

    image

  4. joshdferrer commented on Oct 19, 2026

    @joshdferrer

    Reporting similar issues on my end.

    Additional reproduction report

    Device: iPhone 17 Pro (iOS 27.0.1), Tailscale 1.104.1
    Reproduces: Every network transition (Wi-Fi to LTE), 100% of the time


    Symptoms

    • VPN shows as Connected in the app
    • All internet traffic fails
    • Tailscale Warnings screen shows:
      • The MagicSock function ReceiveDERP is not running. Code: magicsock-receive-func-error
      • DNS Unavailable - Code: dns-forward-failing
    • Fix: toggle VPN off and back on

    Reproduction steps

    1. Connect to Wi-Fi with Tailscale enabled
    2. Leave the house (or turn off Wi-Fi) — device switches to LTE
    3. Within ~30 seconds: internet stops working, warnings appear
    4. Return home (Wi-Fi reconnects) — still broken
    5. Toggle Tailscale off/on → connectivity restored

    This is deterministic on every network transition, not intermittent.

    Log evidence

    From the Tailscale log viewer immediately after a failure (chronological, oldest at bottom):

    12:09:18  Started streaming
    12:09:37  netcheck: report: udp=true v6=false v6os=true mapvarydest=false portmap=
              v4a=<redacted>:26208 derp=17 derpdist=16v4:71ms,17v4:7ms,22v4:176ms
    12:10:02  netcheck: report: udp=true v6=false v6os=true mapvarydest=false portmap=
              v4a=<redacted>:26208 derp=17 derpdist=16v4:77ms,17v4:10ms,22v4:181ms
    12:10:07  gui: [ipnBus] IPNBusMessageConsumer error:
              Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."
              UserInfo={_kCFStreamErrorCodeKey=-2102,
              NSUnderlyingError=0x140035ce0 {Error Domain=kCFErrorDomainCFNetwork
              Code=-1001 "(null)" UserInfo={_kC...}}
    12:10:07  gui: [ipnBus] Restarting ipn message bus
    12:10:07  gui: [ipnBus] Stopping IPN Watch Session EC71ED89-1B95-4D26-B20E-051BFA7E99C9
    12:10:07  gui: [ipnBus] Started IPN Watch Session A0792716-C825-41D6-A4A5-DFA618FCCDDD
    

    Timeline: ~49 seconds after "Started streaming" (network transition), the IPN bus crashes. The two netcheck reports in between show portmap= (empty — no UPnP/NAT-PMP port mapping) and derp=17 as the preferred relay, meaning the device was relying entirely on DERP for connectivity. The kCFStreamErrorCodeKey=-2102 is a TLS stream interruption — the underlying kCFErrorDomainCFNetwork Code=-1001 confirms the network connection was cut at the OS level during the interface change. The IPN bus restart loop then cascades into ReceiveDERP not recovering.

    Additional context

    • VPN On Demand is disabled — this is not a VPN-on-demand reconnect issue
    • Restarting the Tailscale app fixes it; the tunnel does not self-heal on its own
    • The Pi-side Tailscale peer shows the device as still connected (active; direct ...) even while the iPhone has no connectivity — so the issue is entirely client-side
    • No exit node in use; custom DNS (Pi-hole via Tailscale global nameserver with Override DNS)

    I have 50+ devices on my Tailscale network but this is the only device it happens to.

  5. added
    OS-ios
    and removed
    OS-ios
    on Oct 19, 2026
  6. added theissue type on Oct 19, 2026
  7. YeomansIII commented on Oct 20, 2026

    @YeomansIII

    I'm seeing what looks like the same problem on Tailscale iOS 1.105.59, iPhone 16 Pro, iOS 27.0.1. That's newer than the 1.104.1 build reported here, so it doesn't look fixed yet. I haven't checked the app's Warnings screen, so I can't confirm the ReceiveDERP error reported here, but the symptoms match.

    Whenever my phone moves from Wi-Fi to cellular, Tailscale keeps showing "Connected," but traffic stops working. This happens on every manual switch. It also happens without a manual switch when Wi-Fi Assist is on (Settings > Cellular > Wi-Fi Assist), because iOS falls back to cellular on its own when the Wi-Fi signal is weak. So anyone with Wi-Fi Assist on can run into this without touching their network settings.

    Workaround: toggling Tailscale off and back on in the app restores connectivity, but only until the next transition.

  8. iAmGhost commented on Oct 21, 2026

    @iAmGhost

    iPhone 17 Pro Max / iOS 27.0.1 / Tailscale 1.104.1

    I've been suffering the same problem, Neither disabling Connectivity Assist nor VPN On Demand solved it.

    Only working solution was disabling Tailscale DNS entirely. I tried many combinations(with/without custom DNS override) but disabling the entire DNS only helped.

    Of course you can't access machines via hostnames anymore but at least the connection is stable.

  9. 79thales commented on Oct 22, 2026

    @79thales
    Author

    Of

    Yes agree

  10. Pazanate commented on Oct 23, 2026

    @Pazanate

    iPhone 14 Pro / iOS 27.0.1 / Tailscale 1.104.2

    This was happening yesterday and today when I was out the house, the VPN would show as connected but would receive the above error messages, only temporary fix that I found was uninstalling and reinstalling the app, but even that stopped working today.

  11. Jerdle commented on Oct 23, 2026

    @Jerdle

    Also seeing this on multiple devices, especially those that connect to CarPlay. iOS 27.2 and 27.0.1 with Tailscale 1.104.2

  12. bcookatpcsd commented on Oct 23, 2026

    @bcookatpcsd

    apps.apple.com us app nettools-network-utilities id1609044208 (NetTools - Network Utilites)

    I use this on iOS, for icmp connectivity checks.. 'Ping' in the menu.

    I start a ping 76.76.2.11 in my case.. and see the activity.. and as TS VPN kicks in you can see the results.. red failing, green succeeding.

    Also Telegram does not use DNS for connections.. and when the icmp checks are failing so is Telegram..

    When it's green and passing traffic.. I know I've toggled Airplane, TS on/off, enough times..

    (YT sales guy vs web dude)
    Well... I rebooted my PC and it's still that way. How many times did you reboot? Three man, you always tell me to do three.

    I'm not going to be able to find anything. I got, got a meeting in 2 minutes and I need... I need the icons back the way they were. Well I can't go back. There's no way to go back.

    HTH

  13. 3 remaining items

  14. todoroki-raimei commented on Oct 28, 2026

    @todoroki-raimei

    Additional report with iPhone sysdiagnose evidence: iOS 27.2 (24B119), Tailscale 1.104.2. The logs show both an OS-enforced VPN extension memory termination and subsequent ReceiveIPv6 / ReceiveDERP health errors. I am reporting the sequence, not claiming that the memory termination caused the receive-function failures.

    Environment and observed behavior

    • iPhone OS version/build verified from the sysdiagnose's SystemVersion.plist: 27.2 / 24B119.
    • Tailscale backend version from IPNExtension startup: 1.104.2-tc3430f0d2-g598b63867.
    • VPN On Demand enabled, with connect rules for both Wi-Fi and cellular.
    • Destination: Home Assistant OS, Tailscale app 0.30.4, backend 1.104.2.
    • Home Assistant Companion could not connect; Safari to the peer's numeric Tailscale IPv4 address and port 8123 also failed. This was not limited to the Companion app or hostname resolution.
    • Symptoms were noticed approximately October 25–26. Exact onset is uncertain. The available iPhone operational logs cover October 28, 11:11–14:53, UTC+09:00, so they do not establish the original trigger several days earlier.
    • After VPN stop/start attempts, Companion connectivity recovered. This is a recovery observation, not a deterministic reproduction procedure.

    Sanitized log evidence

    All timestamps below are 2026-10-28, UTC+09:00. These excerpts come from the iPhone sysdiagnose's unified system log; IP addresses, device/session identifiers, account information, and unrelated logs are omitted.

    14:27:20.727973 kernel:
      memorystatus: IPNExtension [397] exceeded mem limit: ActiveHard 50 MB (fatal)
    
    14:27:20.746538 kernel:
      memorystatus: killing_specific_process pid 397 [IPNExtension]
      (per-process-limit 100 90097s rf:- type:daemon) 51201KB
    
    14:27:20.754836 launchd:
      exited with exit reason (namespace: 1 code: 0x7)
      - JETSAM_REASON_MEMORY_PERPROCESSLIMIT, ran for 90097932ms
      [launchd subsystem identifies io.tailscale.ipn.ios.network-extension, PID 397]
    
    14:27:25.735287 nesessionmanager:
      [Tailscale VPN session] disconnected with reason Plugin failed
    
    14:27:26.061628 IPNExtension:
      goSetupLogs initializing; version 1.104.2-tc3430f0d2-g598b63867, go1.27.3
    
    14:29:26.066138 IPNExtension:
      health(warnable=magicsock-receive-func-error): error:
      The MagicSock function ReceiveIPv6 is not running.
      You might experience connectivity issues.
    
    14:37:26.116761 IPNExtension:
      health(warnable=magicsock-receive-func-error): error:
      The MagicSock function ReceiveDERP is not running.
      You might experience connectivity issues.
    
    14:37:49.446332 IPNExtension:
      stopTunnel: "userInitiated"
    
    14:37:52.282016 IPNExtension:
      goSetupLogs initializing; version 1.104.2-tc3430f0d2-g598b63867, go1.27.3
    
    14:37:57.440698 IPNExtension:
      Dropping health warnings with codes ["magicsock-receive-func-error"]
    

    Further user-initiated stop/start cycles appear at 14:39–14:40. The last IPNExtension startup is at 14:40:10, followed by health(warnable=warming-up): ok at 14:40:15. No further magicsock-receive-func-error messages were found between that startup and the end of the captured logs at 14:53; this short observation does not prove lasting recovery.

    On-demand behavior

    During stop attempts the extension explicitly logged:

    ondemand: Won't disable VOD persistency due to pre-existing user configuration.
    

    It then re-enabled on-demand persistency and saved Wi-Fi/cellular connect rules. This accounts for the VPN switching back on; it does not establish that On Demand caused the receive-function failures.

    Limits / question

    The 50 MB event is a per-process extension limit, not evidence that the entire iPhone ran out of RAM. Memory growth's cause and its relationship to the later receive-function failures are not yet established.

    The raw sysdiagnose contains unrelated personal data and is not being posted publicly. No Tailscale BUG-* diagnostic identifier was generated. Does this sequence fit the investigation in this issue, and is there a specific additional, narrowly scoped diagnostic capture that would help distinguish extension memory pressure from receive-loop recovery failures?

  15. joshenders commented on Oct 28, 2026

    @joshenders

    fwiw, I've been able to seemingly work around this issue by disabling Use Tailscale DNS Settings (Settings > DNS Settings).

    I was having the issue multiple times a day and it has seemingly stopped after disabling this setting.

  16. 79thales commented on Oct 28, 2026

    @79thales
    Author

    fwiw, I've been able to seemingly work around this issue by disabling Use Tailscale DNS Settings (Settings > DNS Settings).

    I was having the issue multiple times a day and it has seemingly stopped after disabling this setting.

    Thx, I will try thatimage

  17. Pazanate commented on Oct 28, 2026

    @Pazanate

    fwiw, I've been able to seemingly work around this issue by disabling Use Tailscale DNS Settings (Settings > DNS Settings).
    I was having the issue multiple times a day and it has seemingly stopped after disabling this setting.

    Been using this temp workaround and can confirm that my issue recurrences have gone way down since I started using it

  18. bcookatpcsd commented on Oct 29, 2026

    @bcookatpcsd
    I wish there were not so many DNS related Tailscale issues when trying to use it with remote clients..

    Does anyone have headscale going?

    This morning on my drive to work, a few of us live in the same area and we use Verizon Wireless. This morning we noticed that we have CGnat external IPs, we are previously we did not.

    Of the four stops made in the last hour, and going in to buildings with Wi-Fi and thereby disconnecting from cellular

    Only one of those stops caused the no connection to network event.

    Using the previously posted NetTools iOS app

  19. palchrb commented on Oct 30, 2026

    @palchrb

    I can't turn off DNS, the DNS resolver is a big part of the value prop for me. I will be leaving tailscale if they don't fix the stability in the iOS app soon..

  20. JarrarDoga commented on Oct 30, 2026

    @JarrarDoga

    Also hitting this. Tailscale 1.104.4, iOS 27.0, iPhone 18 Pro Max.

    I can see the failures from another node on my tailnet (Linux, tailscaled 1.102.4, which did not change during this period). That node logs updating discoKey for <iphone> via mapSession each time the iOS extension restarts. The counts:

    • Sep 19 – Oct 17: 0 disco key changes
    • Starting Oct 18 ~19:46 UTC: ~500–700 per day, often minutes apart
    • Both networks are affected: about 3,000 restarts on home Wi-Fi and 1,750 on cellular

    The phone reports "MagicSock function not running". Toggling the VPN off and on restores connectivity. "Use Tailscale DNS" is on, and the DNS server is AdGuard Home on a tailnet node.

  21. bcookatpcsd commented on Oct 30, 2026

    @bcookatpcsd

    In my defined exit node, I have added multiple DNS servers and enabled the toggle that says use for exit node.

    And those DNS servers appear in my app under use Tailscale DNS.

    I have turned the toggle off

    And under advanced, selected custom

    And put those same to DNS servers in there

    I've only been able to get two other users to do the same

    Things seem to be working normal for the three of us.

    YMMV

    (obviously use your own)

    Image
  22. SLOPTIMUS-PRIME commented on Nov 1, 2026

    @SLOPTIMUS-PRIME

    Seeing the same warning on my iPhone (Tailscale device name: iPhone182):

    MagicSock Function Not Running — The MagicSock function ReceiveDERP is not running. Code: magicsock-receive-func-error.

    On 2026-11-02 around 10:27 NZDT, tailscale ping from a Linux peer to this iPhone timed out twice. The Linux peer’s tailscale netcheck reported UDP available and Sydney as its nearest DERP.

    The iPhone log viewer on 5G showed at 10:29:37 netcheck: report: udp=true v6=false v6os=true mapvarydest=true portmap= ... derp=5, and several magicsock: new contact messages for a peer via DERP. At 10:29:48 an IPN watch session stopped; at 10:30:55 the log showed NSURLErrorDomain Code=-1001 "The request timed out", with underlying kCFErrorDomainCFNetwork Code=-1001 and _kCFStreamErrorCodeKey=-2102. The full error identifies the failing URL as http://127.0.0.1:49426/localapi/v0/logtap (the local log viewer endpoint), not an external URL.

    Bug report ID: BUG-a14a71183a1afff91ab199738ef31b431a0130063f219779ca8cd977266c98ee-20261101212922Z-b084fb6e78645ce2

  23. MidweekMouse505 commented on Nov 2, 2026

    @MidweekMouse505

    In my defined exit node, I have added multiple DNS servers and enabled the toggle that says use for exit node.

    And those DNS servers appear in my app under use Tailscale DNS.

    I have turned the toggle off

    And under advanced, selected custom

    And put those same to DNS servers in there

    I've only been able to get two other users to do the same

    Things seem to be working normal for the three of us.

    YMMV

    (obviously use your own)

    Image

    This worked for me. Thank you!

  24. bcookatpcsd commented on Nov 3, 2026

    @bcookatpcsd
  25. Nelglor commented on Nov 3, 2026

    @Nelglor

    Note

    🤖 Claude Opus 5.5 responding on behalf of Nick

    Still happening on 1.104.5 (iOS 27.0). The update was installed on 2026-11-03, and the peer saw the iPhone's tunnel restart at 21:02 UTC. The next freeze came 1.5 hours later. The signature is the same as on 1.104.4. Peer-side logs are below, from a Linux node (bb-1, tailscaled 1.104.5) that runs a watcher and captures a bug report automatically when the iPhone goes quiet.

    2026-11-03, on 1.104.5 (UTC)

    Time Event (from the Linux peer's tailscaled log)
    22:37:45 magicsock: derp-16 does not know about peer [7ATOf], removing route, repeated every ~5 s. The iPhone's home DERP no longer has it connected.
    22:38:58 new contact: peer=[7ATOf] ... via=derp every 3-6 s from here on, never completing (122 in total)
    22:39:12 Watcher capture: tailscale ping times out 3/3. BUG-8d58705bcc0292da7fedf5537a88bc1c96f700e07fba3125cae0fc1f5fe132e8-20261103223912Z-d222c647e676de4f
    ~22:50 The iPhone joins home Wi-Fi (same LAN as the peer). It reaches the LAN and its DNS servers fine, but the tailnet stays dead.
    22:56:30 Home DERP is now sfo: derp-2 does not know about peer [7ATOf], removing route
    22:56:51 Second capture, ping 3/3 timeout, empty CurAddr: BUG-8d58705bcc0292da7fedf5537a88bc1c96f700e07fba3125cae0fc1f5fe132e8-20261103225651Z-7d83291a799cb87f
    23:02:08 tailscale ping still times out
    23:02:26 VPN toggled on the iPhone: disco key changes, direct on the LAN endpoint in under 1 s, 14 ms ping

    The iPhone looked "Connected" the whole time. Mail and other apps failed too, because Tailscale DNS is in use, so this wasn't specific to one peer.

    Earlier occurrences (1.104.4)

    Same signature each time, all fixed instantly by a VPN toggle:

    • 2026-11-02 15:40Z, at home with no network change. Paired reports from both ends: iPhone BUG-136e6c85ad63c658481bafb25b2f30b5a73d69fbd9f0960dff0062e1eebf77ff-20261102154419Z-8452d0ce8cd80683, peer BUG-8d58705bcc0292da7fedf5537a88bc1c96f700e07fba3125cae0fc1f5fe132e8-20261102154020Z-c63e9b422f009e2c
    • 2026-11-01 22:21Z, right after landing, on cellular: BUG-8d58705bcc0292da7fedf5537a88bc1c96f700e07fba3125cae0fc1f5fe132e8-20261101222201Z-8caf2d5e8440283c
    • 2026-11-03 20:40Z, moving from cellular to a business Wi-Fi: BUG-8d58705bcc0292da7fedf5537a88bc1c96f700e07fba3125cae0fc1f5fe132e8-20261103204042Z-ef1fa79795330edc. On the toggle the peer logged nodeBackend: [unexpected] using TSMP key for [7ATOf] (control stale).

    The watcher stays in place, so more paired captures are available on request.

  26. nickoneill commented on Nov 3, 2026

    @nickoneill
    Contributor

    The original issue here duplicates this issue and should be resolved in 1.104.5: https://github.com/tailscale/tailscale/issues/19504

    There are a variety of other issues in the comments regarding DNS which does not seem related to the original issue. please file a new issue if you're still seeing this behavior and be sure to include a bug report.

  27. joshenders commented on Nov 4, 2026

    @joshenders

    The original issue here duplicates this issue and should be resolved in 1.104.5: https://github.com/tailscale/tailscale/issues/19504

    There are a variety of other issues in the comments regarding DNS which does not seem related to the original issue. please file a new issue if you're still seeing this behavior and be sure to include a bug report.

    Oh hi Nick, good to virtually encounter you. Hope you're well!

    Are there any specific comments or reports in this issue that pop out as unrelated in particular?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-iosderp

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions