cli: pair QR encodes custom JSON payload instead of plain connect URL
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 72/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- cli, networking
Rechercherichtung
Beginne beim Befehl opencode pair und verfolge, wie die URL für den QR-Code ausgewählt wird, wenn sowohl Loopback- als auch LAN-Links ausgegeben werden. Das Issue enthält eine reproduzierbare Konfiguration und eine Umgehungslösung mit --url; vergleiche diese Ausgaben, um die Stelle der Auswahl zu finden. Fertig ist die Arbeit, wenn der standardmäßige QR-Code einen Link codiert, der von einem anderen Gerät im LAN erreichbar ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
When the background service listens on all interfaces (hostname 0.0.0.0), opencode pair prints two one-time links (loopback and LAN IP) but the QR code encodes the 127.0.0.1 link, which can never be reached from another device — so scanning it with a phone on the same network always fails.
Environment
- opencode version: v2.0.27 (latest channel)
- OS: Darwin 25.6.0 (darwin arm64), macOS MacBook Pro
- Terminal: Ghostty (TERM_PROGRAM=ghostty, TERM=xterm-ghostty, COLORTERM=truecolor)
- Shell: /bin/zsh
- Install/channel: latest release
- Active plugins: none found in config
Reproduction
opencode service set hostname 0.0.0.0thenopencode service start.- Run
opencode pair. - Observe the output: two links are printed — one to
http://127.0.0.1:<port>/auth/connect/...and one tohttp://<lan-ip>:<port>/auth/connect/.... - Scan the QR code with a phone on the same LAN (or decode it).
Expected Behavior
The QR code should encode the link reachable from other devices — i.e., the LAN IP link when bound to 0.0.0.0. At minimum, it should not encode the loopback address, which is unreachable by definition from any remote device.
Actual Behavior
The QR encodes http://127.0.0.1:<port>/auth/connect/.... Scanning it with a phone opens a page on the phone itself and fails; the user must manually retype the second printed URL to pair.
Sample output (token redacted):
Open a link to connect. Links work once and expire in 5 minutes.
http://127.0.0.1:49374/auth/connect/MG_...
http://192.168.x.x:49374/auth/connect/MG_...
Additional Context
- Consistently reproducible whenever the service is bound to a non-loopback hostname.
- Workaround that confirms intent:
opencode pair --url http://<lan-ip>:<port>prints only the LAN link, and the QR then encodes it correctly — so the fix likely just needs the default QR payload to prefer the non-loopback link when multiple are printed.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 213k
- Forks
- 28.4k
- Ø Merge
- 8 Std. 29 Min.
- Gemergte PRs (30 T.)
- 252
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus anomalyco/opencode
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
anomalyco/opencode#56380 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
anomalyco/opencode#56352 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
web / desktop client: model tooltip shows "No reasoning" for models that expose reasoning variantsOffenpending close triaging
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
anomalyco/opencode#56317 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
anomalyco/opencode#56277 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
anomalyco/opencode#56251 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in anomalyco/opencode
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Chocobozzz/PeerTube#7832 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Pay to use?Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 66/100
darkreader/darkreader#16108 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Add: Dak Nong TV SDOffencheck:passed streams:add
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug engine
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
frostney/GocciaScript#1746 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
agilepathway/label-checker#739 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag