最近项目上使用了云数据库的watch功能,上线后大量报错 -402002:
realtime listener rebuild watch fail | errMsg: Error: Watch Error {"code":"QUERYID_INVALID_ERROR","message":"queryID not exist, need retry initWatch"}
realtime listener init watch fail | errMsg: init watch fail Error: invalid state: ws connection not exists, can not send message
另外,小程序运维中心的错误查询种监控到大量的错误:
current state (CLOSED) does not accept "initWatchFail"
current state (REBUILD_WATCH_SUCCESS) does not accept "rebuildWatchFail"
current state (CONNECTED) does not accept "connectionSuccess"
current state (DISCONNECTED) does not accept "connectionSuccess"
[realtime] onMessage parse res.data error: SyntaxError: Unexpected token u in JSON at position 0;at socketTask.onmessage callback function
我选取几个示例报错:
我使用到的代码如图:(代码中涉及到websocket的仅仅只有云数据的watch,并没有用到其他websocket功能和代码)
在我本人手机上和IDE上面都没有报过这样的错误,不知道是为什么?
请教一下,是什么原因导致的这种错误?有什么办法能解决?
似乎不是移动端的报错~是PC端的,PC端的watch目前应该是不支持