[Bug]: Mobile clipboard paste silently fails over HTTP LAN sessions and pastes stale host clipboard
Maintainers usually reply within 2 days
@nishtha-agarwal-211 is already working on this.
Since Oct 25, 2026.
Assessment
This issue has not been assessed yet.
Description
Bug Description
When controlling the desktop host from a mobile browser connected over a local network (e.g., http://192.168.x.x:3000), tapping the Paste button on the trackpad control bar fails to paste the mobile device's clipboard text onto the desktop host. Instead, the desktop host pastes whatever text was already residing in the host OS clipboard.
Root Cause:
- Over LAN HTTP (
window.isSecureContext === false),navigator.clipboard.readText()insrc/routes/trackpad.tsxthrowsNotAllowedErroror is undefined. clientTextbecomesundefined, causing the client to send{ sessionId }without atextpayload.- In
src/server/signalling/server.ts, the server bypasses updating the host clipboard and executeshandler.handleMessage({ type: "paste" }), pasting stale host clipboard data via simulatedCtrl+V/Cmd+V.
Steps to Reproduce
- Start the Rein server on the host machine (
npm run devor production build). - On a mobile phone (iOS Safari or Android Chrome), connect to the server via local IP (e.g.,
http://192.168.1.15:3000/trackpad?token=...). - Copy any text on the mobile phone (e.g., from Notes, browser, or messaging app).
- Focus a text editor on the desktop host (e.g., Notepad, TextEdit, VS Code).
- On the phone's Rein trackpad interface, tap the Paste button on the control bar.
- Observe that the text copied on the phone is not pasted, and the desktop instead pastes previous host clipboard content with no UI feedback.
Expected Behavior
When navigator.clipboard.readText() is unavailable (insecure context or denied permission):
- Rein should provide an interactive fallback modal or text input prompt (e.g., a DaisyUI modal stating "Paste text here to send to desktop").
- The user can long-press and use native mobile paste into the input field.
- Submitting the modal sends the pasted string to
POST /api/clipboard/pasteas{ sessionId, text }, correctly injecting it onto the host clipboard and pasting it into the active window. - If cancelled or empty, show a toast notification explaining why direct clipboard reading was blocked over plain HTTP.
Desktop Operating System
macOS (Apple Silicon)
Client OS and browser
iOS 17+ Safari, Android 14+ Chrome
Rein Version
0.5.0
Console Logs / Error Messages (Optional)
Screenshots / Recordings (Optional)
No response
Checklist
- I have searched for existing issues to avoid duplicates
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 120
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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 AOSSIE-Org/Rein
-
[Bug]: JSON body null returns 500 on /api/clipboard/copy and /api/clipboard/pastePossibly taken A pull request linked to this issue is open or already merged. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AOSSIE-Org/Rein#522 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AOSSIE-Org/Rein#509 · 3 comments ·
Maintainers usually reply within 2 days
-
[Bug]: Session tokens expire 10 days after creation regardless of use (touchToken is never called)Possibly taken @Ankitavasudev claimed this 12 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
AOSSIE-Org/Rein#466 · 6 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug]: Uploaded files are saved with garbled non-ASCII names and overwrite existing files with the same namePossibly taken @Aryan-en claimed this 23 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AOSSIE-Org/Rein#458 · 5 comments ·
Maintainers usually reply within 2 days
-
[Bug]: Missing WebRTC playoutDelayHint introduces 50-100ms artificial latency and redundant MediaStream recreation triggers video pipeline reloadPossibly taken @MPoojaSiyag claimed this 1 day ago. Openbug enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
AOSSIE-Org/Rein#523 · 1 comment ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
review-followup
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
griffinwork40/agent-afk#5387 ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CodeManufactoryLLC/Code60#358 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
android:plan ios:plan main:plan packages:learn
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day