收藏
回答

GameGlobal.Module.lengthBytesUTF8 is not a functio

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小游戏 Bug WXTCPSocket.OnMessage 工具 8.0.49 WXTCPSocket.OnMessage

描述Bug

当使用 WXTCPSocket.OnMessage时报错

"MiniProgramError

GameGlobal.Module.lengthBytesUTF8 is not a function

TypeError: GameGlobal.Module.lengthBytesUTF8 is not a function

at convertStringToPointer (http://127.0.0.1:26410/game/unity-sdk/utils.js:352:37)

at convertDataToPointer (http://127.0.0.1:26410/game/unity-sdk/utils.js:366:12)

at Function.callback (http://127.0.0.1:26410/game/unity-sdk/TCPSocket/index.js:195:49)

at Function.t (http://127.0.0.1:26410/game/__dev__/WAGameSubContext.js:1:177744)

at

at c. (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:205802)

at c.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:431785)

at Object.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:428892)

at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:1373954

at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:450241

at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:466041

at Object.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:122650)

at c (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:46720)

at l (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:46851)

at http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3691

at Set.forEach ()

at g (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3675)

at e.exports.f (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3721)

at http://127.0.0.1:26410/game/__dev__/asdebug.js:1:2717

at Set.forEach ()

at WebSocket._ws.onmessage (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:2699)"

运行环境

mac 1.1.2 202405171605


回答关注问题邀请回答
收藏
登录 后发表内容