Own server on a Cloudflare quick tunnel: no working way to pair a phone, and the typed code says "That code expired"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- ios, typescript
- Ambito
- backend-api-design, mobile
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 277
- Fork
- 27
- Merge medio
- 2h 47m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DuskBotAI/duskbot
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
After uninstalling an own server, the desktop app stays on it and shows Cloudflare's Error 1033 pageAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
install.sh --tailscale replaces whatever the host already serves on tailnet port 443Forse già presa @viniciusbregoli l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DuskBotAI/duskbot
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vercel-labs/ui#865 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
outline/outline#14638 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
wayfinder:grilling
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
patricktree/cup#484 ·
-
bot:ai-assisted component:platform-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
midnightntwrk/platform-js#69 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno