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

未关闭
#58 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Simonjay85 已经在做这个了。

开始于 2026年11月18日。

  • #60 来自 @Simonjay85 —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
android, typescript
领域
mobile

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
TypeScript
星标
277
派生
27
平均合并
2 小时 47 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DuskBotAI/duskbot 的其他 Issue

查看 DuskBotAI/duskbot 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。