cocos-engine
cocos-engine copied to clipboard
编译好后的项目在微信小游戏开发者工具编译失败,场景运行报错无法进入
Cocos Creator version
3.8.6
System information
window11
Issue description
- 编译失败:报错project.config.json: libVersion 字段需为 string, string
- 运行失败:报错web-adapter.js:formatted:4614 Read file failed: path: subpackages/main/import/fe/fee82034-ad09-4844-b213-53bf1aebc58a.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:formatted:4614
Relevant error log output
Steps to reproduce
环境:微信开发者工具版本:1.06.2503300 Windows 64
- 使用小游戏分包条件下编译后,在微信开发者工具编译失败,展示白屏
- 目前通过修改 project.config.json的"libVersion":"game" 为 "libVersion":"",可以解决这个编译失败问题
- 通过2解决后,再次运行场景时报错导致无法进入新场景,报错web-adapter.js:formatted:4614 Read file failed: path: subpackages/main/import/fe/fee82034-ad09-4844-b213-53bf1aebc58a.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:formatted:4614
- 目前通过将web-adapter.js中o.readFile({filePath:t,encoding:e,success:function(e){n&&n(null,e.data)},fail:function(e){console.warn("Read file failed: path: ".concat(t," message: ").concat(e.errMsg)),n&&n(new Error(e.errMsg),null)}中的 ,encoding:e,改成 encoding:e?e:undefined 后可以解决这个问题后正常运行
Minimal reproduction project
No response