cocos3.8.4创建空项目打包微信小游戏报错

创建一个新的空项目后打包微信小游戏,在微信小游戏工具编译报错,我尝试切换到旧的渲染管线后依然报错
问题已解决:微信开发者工具切换到最新稳定版即可解决

  • Creator 版本: 3.8.4

  • 微信开发者工具版本: 1.06.2502272 win32-x64

  • 目标平台: 微信小游戏

  • 重现方式:

  • 首个报错:
    Read file failed: path: assets/main/native/12/1263d74c-8167-4928-91a6-4e2672411f47@2e76e.bin message: readFile:fail Parameter check error:
    parameter.encoding 字段需为 ‘ascii’ | ‘base64’ | ‘binary’ | ‘hex’ | ‘latin1’ | ‘ucs-2’ | ‘ucs2’ | ‘utf-16le’ | ‘utf-8’ | ‘utf16le’ | ‘utf8’
    fail @ web-adapter.js? [sm]:1
    _virtual_cc-0a228690.js:2 readFile:fail Parameter check error:
    parameter.encoding 字段需为 ‘ascii’ | ‘base64’ | ‘binary’ | ‘hex’ | ‘latin1’ | ‘ucs-2’ | ‘ucs2’ | ‘utf-16le’ | ‘utf-8’ | ‘utf16le’ | ‘utf8’ Error: readFile:fail Parameter check error:
    parameter.encoding 字段需为 ‘ascii’ | ‘base64’ | ‘binary’ | ‘hex’ | ‘latin1’ | ‘ucs-2’ | ‘ucs2’ | ‘utf-16le’ | ‘utf-8’ | ‘utf16le’ | ‘utf8’
    at Object.fail (http://127.0.0.1:45327/game/web-adapter.js:3361:105)
    at Object.t (http://127.0.0.1:45327/game/dev/WAGameSubContext.js:1:157035)
    at Function.C.forEach.v. (http://127.0.0.1:45327/game/dev/WAGame.js:1:1403000)
    at p (http://127.0.0.1:45327/game/dev/WAGame.js:1:196302)
    at Object.fail (http://127.0.0.1:45327/game/dev/WAGame.js:1:196745)
    at http://127.0.0.1:45327/game/dev/WAGame.js:1:526558
    at oe (http://127.0.0.1:45327/game/dev/WAGame.js:1:526710)
    at http://127.0.0.1:45327/game/dev/WAGame.js:1:526905
    at r (http://127.0.0.1:45327/game/dev/WAGame.js:1:520258)
    at s (http://127.0.0.1:45327/game/dev/WAGame.js:1:111607)(env: Windows,mg,1.06.2502272; lib: 3.7.9)
    z @ _virtual_cc-0a228690.js:2
    onComplete @ _virtual_cc-0a228690.js:2
    e.dispatch @ _virtual_cc-0a228690.js:2
    (anonymous) @ _virtual_cc-0a228690.js:2
    (anonymous) @ _virtual_cc-0a228690.js:2
    (anonymous) @ _virtual_cc-0a228690.js:2
    fail @ web-adapter.js? [sm]:1

  • 重现概率: 百分百复现

解决了吗?

换回上一个稳定版就行,千万别升级到这个 1.06.2503281 Stable:

2赞

这个到底是 cocos的问题 还是微信的问题呢?

应该是微信的问题,之前的每夜版就这样

微信的问题,那个根本就不是Stable包,微信团队就是个草台班子

你好,我试了下相同微信开发者工具开发两个不同的cocos项目,一个出错另一个正常,感觉不像是微信版本问题,请问是引擎哪里会使用到这个函数传参呢?谢谢

就是微信的问题,读取某些.bin文件的时候就会报这个错误, 下降版本就行了

求问调试器里的log是怎么复制或导出的噢,非常感谢。