Skip to content

android: ping view fails for peers without an IPv4 address (IPv6-only tailnets) #22125

Open

Description

@PaarthShah

What is the issue?

In an IPv6-only tailnet (via using disableIPv4), the Android app's ping view (peer details → Ping) fails with "An unknown error occurred. Please try again.". Screenshot attached.

Image

Steps to reproduce

  1. Use a tailnet whose nodes have only IPv6 Tailscale addresses (via using disableIPv4).
  2. In the Android app, open any peer and tap Ping.
  3. Every ping fails; no request is made.

Are there any recent changes that introduced the issue?

No, this has been around since I've turned on disableIPv4

OS

Android

OS version

Android 17

Tailscale version

1.104.4

Other software

No response

Bug report

BUG-f5833bab0a2552d5df56f5b8dd23b7cfb6a3c3aed509ea4ea52d6bbf163633b1-20261102021041Z-20e42e64a9738e33

Activity

  1. added a commit that references this issue on Nov 2, 2026
    5ea74f3
  2. added
    OS-androidIssues involving Tailscale for Android
    and removed on Nov 2, 2026
  3. added theissue type on Nov 2, 2026
  4. added a commit that references this issue on Nov 3, 2026
    796a2d0
  5. aayushbaluni commented on Nov 3, 2026

    @aayushbaluni

    The bug is in the Android client rather than the daemon: Client.ping asks the peer for an IPv4 address only, so on a disableIPv4 tailnet it fails the request before anything is sent.

    // android/src/main/java/com/tailscale/ipn/ui/localapi/Client.kt
    val ip = peer.primaryIPv4Address.orEmpty()
    if (ip.isEmpty()) {
      responseHandler(Result.failure(Exception("No IP address for peer $peer")))
      return
    }

    PingViewModel.sendPing maps a failure whose message does not contain timeout to R.string.an_unknown_error_occurred_please_try_again — "An unknown error occurred. Please try again.", the string in your screenshot. That also explains "no request is made".

    Nothing below the UI assumes IPv4: servePing parses with netip.ParseAddr and hands the address to LocalBackend.Ping unchanged, and an unbracketed IPv6 literal survives the LocalAPI query string intact (checked on Go 1.27.3 — ?ip=fd7a:115c:a1e0:ab12:4843:cd96:626b:1&type=disco parses back byte-for-byte). So falling back to primaryIPv6Address is sufficient, which is what PeerView already does for the peer subtitle.

    Fix in tailscale/tailscale-android#913.

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

Metadata

Metadata

Assignees

Labels

OS-androidIssues involving Tailscale for AndroidbugBug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions