Own server on a Cloudflare quick tunnel: no working way to pair a phone, and the typed code says "That code expired"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信