Android: pairing with the Tailscale code succeeds, then shows "Not on the same network"

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Simonjay85 is already working on this.

Since Nov 18, 2026.

  • #60 by @Simonjay85 — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
android, typescript
Domain
mobile

Research direction

Read src/mobile/connection/connections.ts, especially connectToWorkspace, and check the pairing flow where onLinked runs after redeemLegacyPairing. The issue reports a local one-condition fix and offers a test; an open linked pull request (#60) shows the work is already underway.

Written by the indexing model from the issue text.

Description

bug
What happened

Settings → Phone → Tailscale → Pair, then scan on Android: the phone shows "Not on the same network", although the Mac is reachable over the tailnet (the …ts.net:8810 health check loads in the phone's browser).

With an on-screen trace: the Tailscale QR is a legacy payload (no via). POST /api/pair returns 201, and GET /api/auth/session returns 404 through the companion. redeemLegacyPairing accepts a 403/404 session answer for companion pairings (companionRefused), but connectToWorkspace (src/mobile/connection/connections.ts), which onLinked runs right after, treats any non-OK session answer as a failed route and ends with PairError("unreachable"). The onboarding screen shows that as "Not on the same network".

Fix that worked locally (one condition in connectToWorkspace):

const companionRefused = route.kind === "companion" && [403, 404].includes(response.status);
if (signal.aborted || (!response.ok && !companionRefused)) {

Happy to send this as a small PR with a test.

Setup: desktop 0.2.17 on macOS; phone app built from main at 7791c1f (apps/mobile, Android debug build, Samsung Galaxy S26), paired over the companion (port 8810).

Steps to reproduce
  1. Mac with Tailscale running (MagicDNS on); the Android phone on the same tailnet.
  2. Desktop: Settings → Phone → Tailscale → Pair.
  3. Scan with the Android app → "Not on the same network".
Version

0.2.17 (desktop, macOS); phone app from main @ 7791c1f

Platform

Android

Engine

No response

Logs or screenshots

Dominant language
TypeScript
Stars
277
Forks
27
Avg merge
2h 47m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DuskBotAI/duskbot

All issues in DuskBotAI/duskbot

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.