currently, a project is under development. The following code is used to send data on Wechat developer"s tool. The server can receive the data and parse it successfully, but the debug QR code of scanning developer"s tool cannot send data on the real phone, and an error is reported in the fail interface
.Code:
wx.sendSocketMessage({
data: new Uint8Array([1,0,2,0,1]),
success:function(e){
console.log(e)
},
fail:function(e){
console.log(e)
},
complete:function(e){
console.log(e)
}
});
error message:
sendSocketMessage:fail invaild data type
official documents:
trouble thinking no to come to help, is the code wrong or other reasons.