PC端实时数据推送报错?
发布于 4 年前 作者 jingpan 5303 次浏览 来自 问答

开发了一个小程序,需要兼容手机端和PC端使用,经测试,实时数据推送在开发者工具及手机端都正常,但PC端报错(收不到推送数据),如下,不知道什么原因,求指教。

报错如下:

thirdScriptError
[realtime] onMessage parse res.data error: SyntaxError: Unexpected token o in JSON at position 1;at socketTask.onmessage callback function
Error: [realtime] onMessage parse res.data error: SyntaxError: Unexpected token o in JSON at position 1
at n.Bi.onSocketMessage (file://5.js/:2:508995)
at n.e (file://5.js/:2:260063)
at i. (file://5.js/:2:128008)
at i.emit (file://5.js/:2:615034)
at file://5.js/:2:1311903
at file://5.js/:2:607765
at Object.m (file://5.js/:2:77725)
at file://176.js/:1:57
thirdScriptError
[realtime] onMessage parse res.data error: SyntaxError: Unexpected token o in JSON at position 1;at socketTask.onmessage callback function
Error: [realtime] onMessage parse res.data error: SyntaxError: Unexpected token o in JSON at position 1
at n.Bi.onSocketMessage (file://5.js/:2:508995)
at n.e (file://5.js/:2:260063)
at i. (file://5.js/:2:128008)
at i.emit (file://5.js/:2:615034)
at file://5.js/:2:1311903
at file://5.js/:2:607765
at Object.m (file://5.js/:2:77725)
at file://182.js/:1:57
thirdScriptError
[realtime] onMessage parse res.data error: SyntaxError: Unexpected token o in JSON at position 1;at socketTask.onmessage callback function
Error: [realtime] onMessage parse res.data error: SyntaxError: Unexpected token o in JSON at position 1
at n.Bi.onSocketMessage (file://5.js/:2:508995)
at n.e (file://5.js/:2:260063)
at i. (file://5.js/:2:128008)
at i.emit (file://5.js/:2:615034)
at file://5.js/:2:1311903
at file://5.js/:2:607765
at Object.m (file://5.js/:2:77725)
at file://188.js/:1:57
the watch closed because of error <Error: errCode: -402002 realtime listener init watch fail | errMsg: init watch fail Error: wsclient.send timedout
history states: UNINIT-(loginStart)->INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchFail)->INIT_WATCH_FAIL-(loginStart)->INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchFail)->INIT_WATCH_FAIL-(loginStart)->INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchFail)->INIT_WATCH_FAIL-(close)->CLOSED>

1 回复
回到顶部