我现在的做法是onShow的时候重新进行watch 😂
-402004 数据监听在长时间息屏后连接报错是什么原因?手机: 华为Mate 20 Pro (UD) 手机系统: HarmonyOs 3.0.0 微信版本: 8.0.45 看到一个类似的问题, 当时是解决了的, 但不知道是否是同一个问题 https://developers.weixin.qq.com/community/develop/doc/000cc02f8284b0aee14995a5951800?highLine=402004 请教各位大佬, 这种错误应该在哪里能catch? 不行我就业务自己手动重连, 就怕重连又失败然后陷入了死循环😂 the watch closed because of error INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchSuccess)->INIT_WATCH_SUCCESS-(wsDisconnected)->PAUSED-(loginStart)->REBUILD_LOGGING_IN-(loginSuccess)->REBUILD_LOGGED_IN-(rebuildWatchStart)->REBUILD_WATCH_PENDING-(rebuildWatchSuccess)->REBUILD_WATCH_SUCCESS-(wsDisconnected)->PAUSED-(loginStart)->REBUILD_LOGGING_IN-(loginSuccess)->REBUILD_LOGGED_IN-(rebuildWatchStart)->REBUILD_WATCH_PENDING-(rebuildWatchSuccess)->REBUILD_WATCH_SUCCESS-(wsDisconnected)->PAUSED-(loginStart)->REBUILD_LOGGING_IN-(loginSuccess)->REBUILD_LOGGED_IN-(rebuildWatchStart)->REBUILD_WATCH_PENDING-(close)->CLOSED> Error: errCode: -402004 realtime listener rebuild watch fail | errMsg: Error: query event cache timeout, ws has been disconnected for too long, PLEASE RECONNECT manually (rebuildWatch requestId 1706284410602_0.8137706001463652) history states: UNINIT-(loginStart)->INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchSuccess)->INIT_WATCH_SUCCESS-(wsDisconnected)->PAUSED-(loginStart)->REBUILD_LOGGING_IN-(loginSuccess)->REBUILD_LOGGED_IN-(rebuildWatchStart)->REBUILD_WATCH_PENDING-(rebuildWatchSuccess)->REBUILD_WATCH_SUCCESS-(wsDisconnected)->PAUSED-(loginStart)->REBUILD_LOGGING_IN-(loginSuccess)->REBUILD_LOGGED_IN-(rebuildWatchStart)->REBUILD_WATCH_PENDING-(rebuildWatchSuccess)->REBUILD_WATCH_SUCCESS-(wsDisconnected)->PAUSED-(loginStart)->REBUILD_LOGGING_IN-(loginSuccess)->REBUILD_LOGGED_IN-(rebuildWatchStart)->REBUILD_WATCH_PENDING-(close)->CLOSED at i (https://lib/WACloud.js:1:369624) at Object.onTimeoutError (https://lib/WACloud.js:1:370374) at Za.handleCommonError (https://lib/WACloud.js:1:372944) at Za. (https://lib/WACloud.js:1:370187) at Generator.next () at t (https://lib/WACloud.js:1:375) at s (https://lib/WACloud.js:1:586) at https://lib/WACloud.js:1:645 at new Promise () at Za. (https://lib/WACloud.js:1:526)
01-30