Mobile relay page uses room id as WebSocket token instead of key
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- frontend, mobile-dev, networking
Research direction
Start at the mobile relay page or the generated frontend code containing new WebSocket and search for the /client?room= connection. Reproduce with a copied /mobile?room=...&key=...&auto=1 URL and inspect the WebSocket request. Done means the request uses the URL's key value as the token rather than the room id.
Written by the indexing model from the issue text.
Description
What issue are you seeing?
The Codex++ mobile relay page ignores the key query parameter when opening the WebSocket client connection.
The copied mobile URL contains separate room and key values:
/mobile?room=<room-id>&key=<long-key>&auto=1
### What steps can reproduce the bug?
The Codex++ mobile relay page ignores the `key` query parameter when opening the WebSocket client connection.
The copied mobile URL contains separate `room` and `key` values:
```text
/mobile?room=<room-id>&key=<long-key>&auto=1
However, the generated frontend code opens the WebSocket like this:
socket = new WebSocket(`${scheme}://${location.host}/client?room=${room}&token=${room}`);
This means the client connects with token equal to the room id instead of using the key value from the mobile URL.
Observed behavior:
The WebSocket handshake succeeds with 101 Switching Protocols.
The mobile page then shows app-server connection timeout.
In DevTools Network, the WebSocket request is:
/client?room=<room-id>&token=<same-room-id>
Expected behavior:
The mobile page should use the key query parameter as the WebSocket token, for example:
const token = encodeURIComponent($("key").value.trim());
socket = new WebSocket(`${scheme}://${location.host}/client?room=${room}&token=${token}`);
If the relay expects the parameter name key, then it should use:
socket = new WebSocket(`${scheme}://${location.host}/client?room=${room}&key=${token}`);
### What is the expected behavior?
```markdown
1. Open Codex++ management console.
2. Go to Mobile Control.
3. Select the public relay server.
4. Click "Start and copy mobile link".
5. Open the copied `/mobile?room=...&key=...&auto=1` URL in Microsoft Edge on Android.
6. Open DevTools / remote debugging and inspect the Network tab.
7. Check the WebSocket request to `/client`.
The page opens:
```text
/mobile?room=<room-id>&key=<long-key>&auto=1
But the WebSocket request becomes:
/client?room=<room-id>&token=<room-id>
The key value is not used.
Environment:
```markdown
- Codex++ mobile control relay
- Public relay server: `154.201.90.76:57323`
- Browser: Microsoft Edge on Android
- Device: OnePlus 13
- Result confirmed via browser DevTools Network panel
### Additional information
_No response_
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·