Creator 2.3.0-2.3.1 Facebook Instant Games build issues

After updating my project from version 2.1.3 to 2.3.0/2.3.1 attempt to build the project for Facebook Instant Games fails producing following error:

Build Failed: RangeError: Maximum call stack size exceeded
    at tryReadSync (fs.js:342:20)
    at Object.readFileSync (fs.js:371:19)
    at Object.fs.readFileSync (electron/js2c/asar.js:618:40)
    at C:\CocosCreator_2.3.1\resources\app.asar\editor\builtin\fb-instant-games\main.js:1:550
    at check (C:\CocosCreator_2.3.1\resources\app.asar\node_modules\async\dist\async.js:4464:13)
    at C:\CocosCreator_2.3.1\resources\app.asar\editor\builtin\fb-instant-games\main.js:1:421
    at next (C:\CocosCreator_2.3.1\resources\app.asar\node_modules\async\dist\async.js:4457:13)
    at C:\CocosCreator_2.3.1\resources\app.asar\editor\builtin\fb-instant-games\main.js:1:571
    at check (C:\CocosCreator_2.3.1\resources\app.asar\node_modules\async\dist\async.js:4464:13)
    at C:\CocosCreator_2.3.1\resources\app.asar\editor\builtin\fb-instant-games\main.js:1:421
    at C:\CocosCreator_2.3.1\resources\app.asar\editor\lib\builder\index.js:1:3834
    at wrapper (C:\CocosCreator_2.3.1\resources\app.asar\node_modules\async\dist\async.js:272:20)
    at next (C:\CocosCreator_2.3.1\resources\app.asar\node_modules\async\dist\async.js:4584:24)
    at C:\CocosCreator_2.3.1\resources\app.asar\node_modules\async\dist\async.js:325:20
    at C:\CocosCreator_2.3.1\resources\app.asar\editor\lib\builder\index.js:1:790
    at processTicksAndRejections (internal/process/task_queues.js:86:5)

We can ask @jare to have some one look into this.

@slackmoehrle or @jare or something, please check this!

I’ll ping the engineering team on this issue.

Can you show me the game build panel?

Generally, if you upgrade the engine, you need to delete the library and temp folders in the project.

@zzf520


After I deleted library and temp folder editor crashes without any message while building.

@TiniovyKit @zzf520 Did you figure it out? I have the same issue.

So, how is it going?

I suspect that the engine’s built-in file has gone wrong and you need to reinstall CocosCreator. app

I tried to build project on another windows machine, after build creator suddenly crashed. I checked build directory, creator did not create .zip archive, but created another files. I compressed that files and uploaded. I recieved this errors in console, when I was checking thats build on facebook, but game worked, prefab that hadn’t been found finally was loaded.

I will try to reinstall creator.

Reinstalling creator did not solve this problem.

hello_world.zip (519.9 KB)
This is my locally created fb project. You can try it on your side.

And what? There is issue whith building my project in creator 2.3.1. Creator crashes after build process is nearly completed. What can I do to fix that problem?

Can you provide me with your test project?

Try to delete the .CocosCreator folder in the user directory of the system disk, and then restart the editor.

Or delete all CocosCreator in the computer, and then reinstall CocosCreator 2.3.x version.

2.3.3:
[18427] Generating main.js from /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/static/build-templates/shares/main.js
[18427] Generating html from /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/static/build-templates/fb-instant-games/index.html
[18427] 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.8s ]Builder: do custom process [before-change-files]
[ custom-build-process [========================================] 99% 0.4s ]Builder: do custom process [build-finished]
/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/lib/jszip.min.js:13
return f.getBlob(b)}catch(d){throw new Error(“Bug : can’t construct the Blob.”)}}};var n={stringifyByChunk:function(a,b,c){var d=[],e=0,f=a.length;if(f<=c)return String.fromCharCode.apply(null,a);for(;e<f;)“array”===b||“nodebuffer”===b?d.push(String.fromCharCode.apply(null,a.slice(e,Math.min(e+c,f)))):d.push(String.fromCharCode.apply(null,a.subarray(e,Math.min(e+c,f)))),e+=c;return d.join("")},stringifyByChar:function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(a){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,k.newBuffer(1)).length}catch(a){return!1}}()}};c.applyFromCharCode=g;var o={};o.string={string:e,array:function(a){return f(a,new Array(a.length))},arraybuffer:

RangeError: Maximum call stack size exceeded
at Function.resolve ()
at Object.c.prepareContent (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/lib/jszip.min.js:13:3009)
at d.o (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/lib/jszip.min.js:12:14789)
at d.r (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/lib/jszip.min.js:12:15147)
at d.folder (/Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/lib/jszip.min.js:12:15939)
at /Applications/CocosCreator/Creator/2.3.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/fb-instant-games/main.js:1:513
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:532

Hi, can you give me your test demo?

After update cocos creator to 2.4.0 instant games build starts working. But we have another issue. Our web-mobile build is broken. Project works in preview, but no resources have been built in web-mobile