我的也是开发过程中,时好时坏,上传正式,到现在没有出现问题,本地先保证程序无错误就行,后面持续关注一下。
小程序云开发,用watch监听数据,报-402002状态错误?[图片]
2023-05-23怎么反馈到官方,我这也有这个问题,频繁报错: watch closed Error: errCode: -402002 realtime listener init watch fail | errMsg: login fail Error: wsclient.send timedout history states: UNINIT-(loginStart)->INIT_LOGGING_IN-(loginFail)->INIT_LOGIN_FAIL-(loginStart)->INIT_LOGGING_IN-(loginFail)->INIT_LOGIN_FAIL-(loginStart)->INIT_LOGGING_IN-(loginFail)->INIT_LOGIN_FAIL-(close)->CLOSED at _FSMListener (WACloud.js:1) at WACloud.js:1 at Set.forEach (<anonymous>) at ma.transition (WACloud.js:1) at hs.<anonymous> (WACloud.js:1) at Iterator.throw (<anonymous>) at t (WACloud.js:1) at u (WACloud.js:1)
watch一直报402002Error: errCode: -402002 realtime listener init watch fail | errMsg: login fail Error: invalid state: ws connection not exists, can not send message history states: UNINIT-(loginStart)->INIT_LOGGING_IN-(loginFail)->INIT_LOGIN_FAIL-(loginStart)->INIT_LOGGING_IN-(loginFail)->INIT_LOGIN_FAIL-(loginStart)->INIT_LOGGING_IN-(loginFail)->INIT_LOGIN_FAIL-(close)->CLOSED at _FSMListener (WASubContext.js?t=wechat&s=1683950966850&v=2.25.3:1) at WASubContext.js?t=wechat&s=1683950966850&v=2.25.3:1 at Set.forEach (<anonymous>) at xo.transition (WASubContext.js?t=wechat&s=1683950966850&v=2.25.3:1) at Ia.<anonymous> (WASubContext.js?t=wechat&s=1683950966850&v=2.25.3:1) at Generator.throw (<anonymous>) at t (WASubContext.js?t=wechat&s=1683950966850&v=2.25.3:1) at l (WASubContext.js?t=wechat&s=1683950966850&v=2.25.3:1)
2023-05-14彭兄,请问解决了吗?我也出现这个问题。不知道如何解决。
云开发使用watch监听,经常报402002异常,如何解决?我的小程序使用了watch监听函数,目前经常报错,报错概率非常高,影响了小程序用户的使用体验,麻烦给查一下一下吧 报异常时就是等待十多秒后报出异常。。。 我的APPID为:wxdaf4eb13f330c75b 异常截图: [图片] 代码片: this.messageListener = await roomModel.model.doc(roomId).watch({ onChange: handleWatch.bind(this), onError: e => { log.error(e) this.selectComponent('#errorMessage').show('服务器连接异常...', 2000, () => { router.reLaunch() }) } })
2023-05-14