Own server on a Cloudflare quick tunnel: no working way to pair a phone, and the typed code says "That code expired"
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- ios, typescript
调研方向
Start by tracing the pairing flow from apps/link-service/install.sh and the server's POST /api/auth/pairing endpoint, then inspect how the desktop Connect from elsewhere screen and iPhone code entry handle missing public addresses. The report also flags PUT /api/mobile/presence returning 403 after pairing, so check whether that is related. Done means quick-tunnel users get a clear supported pairing path and unresolved codes no longer appear expired; confirm behavior across the desktop, server, and iPhone flows.
由索引模型根据 Issue 内容生成。
描述
What happened
Own server installed with the --cloudflare install line from the desktop app. To pair the iPhone app, Settings > Computer > Connect from elsewhere shows only a 12-character code ("Type it on the other device. Expires in 4 min."). There is no QR code and no link.
Typing that code in the iPhone app ("Enter the code" screen) fails right away with "That code expired. Codes last five minutes. Make a new one on your computer and scan again." It happened with every fresh code. The server shows no attempt to redeem it.
As far as I can tell, the cause is that the installer gives a quick-tunnel server no public address (apps/link-service/install.sh, server_unit: "a quick tunnel's name changes on every restart, so the server names no public address for it"). Asking that server for a code directly:
POST /api/auth/pairing
-> { "url": null, "inviteUrl": null, "serverName": "...",
"hint": "this server has no public address to put in a link: set DUSK_PUBLIC_URL, or open /pair on the address you use and type the code" }
The desktop screen doesn't show that hint, so it looks like pairing should work. On the phone side, a typed code has no way to find the server, and the app reports that as an expired code, which sends you looking in the wrong place.
What worked: set DUSK_PUBLIC_URL on duskbot.service to a stable address (a tailscale serve HTTPS address here), mint a code with POST /api/auth/pairing, turn the returned inviteUrl (duskbot://pair?address=...&token=...) into a QR code and scan it with the iPhone. That paired.
Possibly related: after pairing that way, the phone's PUT /api/mobile/presence gets 403 {"error":"only a paired phone reports where it is"}, so the server doesn't treat the session as a phone device. Push registration (deviceOf(auth)) presumably fails the same way. I can't tell whether that's because of the pairing path I used.
Suggestions:
- On Connect from elsewhere, say when the server has no public address, and what to do about it.
- In the phone app, show "couldn't find this server" or similar instead of "That code expired" when the code can't be resolved.
- Give own servers on a quick tunnel a supported way to pair a phone (through the relay, or by prompting for
DUSK_PUBLIC_URL).
Steps to reproduce
- Install on a fresh server with the desktop app's install line (
... | sh, Cloudflare quick tunnel). - In the desktop app with that server selected: Settings > Computer > Connect from elsewhere.
- Type the code shown into the iPhone app.
- The phone says "That code expired".
Version
desktop 0.2.18, server package 0.2.12, iOS app build 2611142024
Platform
Own server (VPS), Debian 13 amd64, paired from iPhone
- 主要语言
- TypeScript
- 星标
- 277
- 派生
- 27
- 平均合并
- 2 小时 47 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DuskBotAI/duskbot 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 63/100
维护者通常 1 天内回复
-
After uninstalling an own server, the desktop app stays on it and shows Cloudflare's Error 1033 page未关闭
难度 3/5 1-2 天 新手友好度 65/100
维护者通常 1 天内回复
-
install.sh --tailscale replaces whatever the host already serves on tailnet port 443可能已有人在做 @viniciusbregoli 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 43/100
维护者通常 1 天内回复
查看 DuskBotAI/duskbot 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
inabagumi/shinju-date#7406 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
umami-software/umami#4787 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复