多端应用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"}
如下图设置即可
加使用websocket的网络sdk了吗?