问题解决了,是基础库版本切换后推送的问题,可能是某次切换没有推送导致基础库乱掉了
为何真机环境TCPSocket.write无法使用ArrayBuffer作为参数?TCPSocket.write在模拟器中可以正常工作,在真机调试和预览中会报错。 以下代码在真机运行的时候会报错,原因是socket.write的时候会触发一个内部错误: var buff = new ArrayBuffer(10) const uint8View = new Uint8Array(buff); uint8View.set([83,83,4,0,0,0,0,49,117,49]); socket.write(buff) //触发错误 console.log("send fnish") 错误详情: MiniProgramError The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of ArrayBuffer TypeError: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of ArrayBuffer undefined socket已经创建并连接到了远端,如果调用改为传入字符串则可以正常发送,比如socket.write("123"),请问是什么原因? PS: 当前基础库版本是3.5.0
08-12