1***@qq.com
1***@qq.com
  • 发布:2024-11-19 22:07
  • 更新:2024-11-20 00:05
  • 阅读:13

uni.createTCPSocket的bug

分类:uni-app

我通过uni.createTCPSocket()创建socket,成功连接后,调用socket的write方法,但是报错
MiniProgramError
Cannot read properties of undefined (reading 'send')
TypeError: Cannot read properties of undefined (reading 'send')
at Proxy.write (WAServiceMainContext.js:1:1761044)
at Function.<anonymous> (app-service.js:1768:1799)
at <setTimeout callback function>
at (WASubContext.js:1:147853)
at Function.<anonymous> (WASubContext.js:1:110205)
at Function.<anonymous> (WASubContext.js:1:142742)
at p (WAServiceMainContext.js:1:151651)
at (WAServiceMainContext.js:1:152094)
at (WAServiceMainContext.js:1:139600)
at Timeout._onTimeout (<anonymous>:407:55767)

我直接使用wx.createTCPSocket()就不会有此问题

2024-11-19 22:07 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com (作者)

从vue3切换成vue2就没问题了。

要回复问题请先登录注册