bug: 安卓发送任务后无响应并持续转圈,device-link Relay WebSocket 异常断开(偶现)
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
### 问题描述 / What happened
手机端提交任务后界面持续转圈,没有收到任务响应,也没有明确失败提示。
### 环境 / Environment
日期:2026-09-16
设备:Xiaomi Mi 10
App:Cindy 中国大陆版 0.1.15 (27)
包名:com.xd.cindycn
网络:Wi-Fi 已连接并通过系统校验,信号约 -54 ~ -58 dBm
### 复现步骤 / Steps to reproduce
初步结论
任务进入了手机端待发送/待确认队列,但没有证据证明已被远端桌面成功接收。
device-link Relay WebSocket 多次以 1006 非正常断开。重连时存在大量未确认可靠帧,并且会话投影恢复失败。最后一次断开后未观察到重新上线,导致任务状态一直等待,UI 没有及时结束加载状态。
ADB 关键日志
09-16 10:10:39.560 W ReactNativeJS:
'[device-link]', 'relay connection error', 'WebSocket error'
09-16 10:10:39.561 I ReactNativeJS:
'[device-link]', 'device-link disconnected
(code=1006, reason=n/a, onlineForMs=294276)'
断线约 87 秒后恢复,但已有可靠帧超时:
09-16 10:12:06.398 I ReactNativeJS:
'[device-link]', 'device-link online
(protocol=v1, elapsedMs=151)'
09-16 10:12:06.487 W ReactNativeJS:
'[device-link]', 'abandoning 13 stalled reliable frame(s)
for peer 6b25f3f3 (link down > 60000ms)'
随后再次断线、快速重连,并丢弃更多未确认帧:
09-16 10:16:09.595 W ReactNativeJS:
'[device-link]', 'relay connection error', 'WebSocket error'
09-16 10:16:09.596 I ReactNativeJS:
'[device-link]', 'device-link disconnected
(code=1006, reason=n/a, onlineForMs=243199)'
09-16 10:16:09.705 I ReactNativeJS:
'[device-link]', 'device-link online
(protocol=v1, elapsedMs=107)'
09-16 10:16:09.773 W ReactNativeJS:
'[device-link]', 'abandoning 25 stalled reliable frame(s)
for peer 6b25f3f3 (link down > 60000ms)'
第三次断线后约 14 秒恢复:
09-16 10:17:49.034 W ReactNativeJS:
'[device-link]', 'relay connection error', 'WebSocket error'
09-16 10:17:49.036 I ReactNativeJS:
'[device-link]', 'device-link disconnected
(code=1006, reason=n/a, onlineForMs=99331)'
09-16 10:18:03.607 I ReactNativeJS:
'[device-link]', 'device-link online
(protocol=v1, elapsedMs=138)'
重连恢复时,会话投影阶段失败:
09-16 10:18:04.334 I ReactNativeJS:
phase: 'pending'
outcome: 'applied'
09-16 10:18:04.368 I ReactNativeJS:
phase: 'projection'
outcome: 'failed'
09-16 10:18:04.368 I ReactNativeJS:
phase: 'goal'
outcome: 'applied'
09-16 10:18:04.514 I ReactNativeJS:
phase: 'history'
outcome: 'applied'
最后一次断开,日志中未看到后续上线:
09-16 10:19:09.533 W ReactNativeJS:
'[device-link]', 'relay connection error', 'WebSocket error'
09-16 10:19:09.533 I ReactNativeJS:
'[device-link]', 'device-link disconnected
(code=1006, reason=n/a, onlineForMs=65926)'
### 日志与截图 / Logs & screenshots
视屏是其他类似的,退到外面 连不上电脑
https://github.com/user-attachments/assets/303520c3-6dcc-48af-9782-644a3617a59f
Contributor guide
Research direction
Start by tracing the device-link Relay WebSocket reconnect path and the task pending/loading state using the provided ADB logs, especially the 1006 disconnects, stalled reliable frames, and failed projection. Done means a submitted task does not remain loading indefinitely when the relay disconnects, and the UI reaches a clear success or failure state after recovery or timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100