构建fb-instant-games失败

  • Creator 版本:2.3.3

  • 目标平台:

fb-instant-games

  • 详细报错信息,包含调用堆栈:
    Generating main.js from /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/static/build-templates/shares/main.js
    [51320] Generating html from /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/static/build-templates/fb-instant-games/index.html
    [51320] Generating main.js from /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/static/build-templates/fb-instant-games/main.js
    [ copy-build-templates [======================================= ] 98% 0.6s ]Builder: do custom process [before-change-files]
    [ custom-build-process [========================================] 99% 0.3s ]Builder: do custom process [build-finished]
    [51320] Error: Build Failed: RangeError: Maximum call stack size exceeded
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:588
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:325:20
    at check (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4463:32)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:421
    at next (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4457:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:571
    at check (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4464:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:421
    at next (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4457:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:571
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:3834
    at wrapper (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:272:20)
    at next (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4584:24)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:325:20
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:790
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
    [ error [========================================] 100% 0.0s ]
    [51320] Error: RangeError: Maximum call stack size exceeded
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:588
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:325:20
    at check (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4463:32)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:421
    at next (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4457:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:571
    at check (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4464:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:421
    at next (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4457:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:571
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/index.js:1:4649
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:5192
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:2959:19
    at wrapper (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:272:20)
    at iterateeCallback (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:417:21)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:325:20
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:2957:17
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:4239
    at wrapper (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:272:20)
    RangeError: Maximum call stack size exceeded
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:588
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:325:20
    at check (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4463:32)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:421
    at next (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4457:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:571
    at check (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4464:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:421
    at next (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4457:13)
    at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:571

  • 重现方式:
    一个复杂的prefabs就会发生这样的问题

  • 之前哪个版本是正常的 :

  • 手机型号 :

  • 手机浏览器 :

  • 编辑器操作系统 :

  • 编辑器之前是否有其它报错 :

  • 出现概率:
    只要有复杂的预制体就会发生

  • 额外线索:
    怀疑是压缩文件的时候触发的
    如果官方有尝试方案,可以配合测试

补充一下,打包其他平台没有问题

查了一下,反馈这个问题应该很多年了,英文论坛上有一个帖子问题描述的很清楚;发生这个事情有两个case:1、resouces下的文件太多;超过600个;2、预制体包含图片节点太多;

有可能是文件过多导致压缩为 zip 格式有问题,不过这个还是需要给一下 demo 进行测试(能否发一下 demo 到 qq 邮箱给我,让我排查看看?)

主要是工程太大,我尝试拆一个出来

邮件已发,请查收,我用官方的21点的例子重现了,只要复制一些预制体就能重现

好的,我测试看看,感谢反馈,一会给答复

我这边是正常的 :sweat_smile:,不过我是 mac,我让同事测试看看

我试了一下,好像也行了,我再搞一个demo

第一种打包失败可以用这个demo重现,你先看看原因,或许第二种也能找到

附件太大了,我发邮件给你了,加我QQ或微信吧

是否有结论?

研发兄弟,我demo的都发了,为啥没消息了?

该问题修复会进到 2.4.0 版本,谢谢反馈

好的,期待!

请问2.3可以出一个修复么?
临上线,没办法一下直接升2.4

你先看看构建构建出来的资源是否正常,如果正常可以暂时自己压缩成 zip 格式就行了,这一个步骤是帮用户压缩成 zip 格式(由于资源过大导致有问题)

ok,收到

可以看看修改的方案不 2.0.10版本 看到构建失败很不爽 :grinning:

嗨 我们这边资源比较大 将近两百兆 升级引擎可能需要年后 目前打包fb只有最后自己手动压缩吗 有没有修改方案可以操作一下呢 目前2.0.10