收藏
回答

【已解决】多端应用websocket不支持SocketTask.onOpen 安卓端报错苹果端正常?

多端应用websocket不支持SocketTask.onOpen,安卓端报错苹果端正常,为啥?

运行到安卓真机 报了如下错误

MiniProgramError
Cannot read properties of undefined (reading 'onOpen')
TypeError: Cannot read properties of undefined (reading 'onOpen')
at onOpen (app.ts:97:14)
    at wt. (WASubContext.js:1:461834)
at connectWebsocket (app.ts:41:10)
    at wt. (WASubContext.js:1:461275)
    at new wt (WASubContext.js:1:462394)
    at r. (WASubContext.js:1:462520)
    at WASubContext.js:1:439223
at App (app.ts:12:1)
    at WASubContext.js:1:508233
    at p.runWith (WASubContext.js:1:497722)

以及 wx.connectSocket complete 报的

{"errMsg": "connectSocket:fail originCtor is not a constructor"}


最后一次编辑于  07-11
回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容