xpenatan/gdx-teavm

Game won't load on Itch.io - (JavaScript) TypeError: can't assign to property Symbol("javaException") on "longjmp": not an object

Its-Kenta opened this issue · 3 comments

Hello!

I've recently played around with this and managed to export to JS with your tool and it surprisingly works fine when running via a local server. I've made a simple pong to try this out.

However, when trying to add the game on itch.io I'm receiving the following error:
(JavaScript) TypeError: can't assign to property Symbol("javaException") on "longjmp": not an object

With more following errors here:

Loading script : https://html.itch.zone/html/6902325/webapp/assets/scripts/box2D.js app.js:469:13
Loading script : https://html.itch.zone/html/6902325/webapp/assets/scripts/freetype.js app.js:469:13
Script loaded: https://html.itch.zone/html/6902325/webapp/assets/scripts/freetype.js 3 app.js:469:13
com.badlogic.gdx.utils.GdxRuntimeException app.js:473:13
Caused by: java.lang.RuntimeException: (JavaScript) TypeError: can't assign to property Symbol("javaException") on "longjmp": not an object app.js:473:13
Uncaught Error: Java exception thrown
    $rt_exception https://html.itch.zone/html/6902325/webapp/teavm/app.js:251
    $rt_throw https://html.itch.zone/html/6902325/webapp/teavm/app.js:245
    cbga_AssetManager_handleTaskError https://html.itch.zone/html/6902325/webapp/teavm/app.js:45256
    cbga_AssetManager_update https://html.itch.zone/html/6902325/webapp/teavm/app.js:44970
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cbga_AssetManager_finishLoading https://html.itch.zone/html/6902325/webapp/teavm/app.js:45018
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cgkpsu_AssetManager_loadAssets https://html.itch.zone/html/6902325/webapp/teavm/app.js:76569
    cgkpss_GameScreen_show https://html.itch.zone/html/6902325/webapp/teavm/app.js:72746
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    ka_KtxGame_setScreen https://html.itch.zone/html/6902325/webapp/teavm/app.js:358786
    rt_wrapFunction1 https://html.itch.zone/html/6902325/webapp/teavm/app.js:559
    cgkp_Game_create https://html.itch.zone/html/6902325/webapp/teavm/app.js:358906
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cgxgbw_WebApplication_step https://html.itch.zone/html/6902325/webapp/teavm/app.js:81150
    cgxgbw_WebApplication_run https://html.itch.zone/html/6902325/webapp/teavm/app.js:81085
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cgxgbtdi_TeaWindow_onAnimationFrame https://html.itch.zone/html/6902325/webapp/teavm/app.js:332239
    rt_wrapFunction1 https://html.itch.zone/html/6902325/webapp/teavm/app.js:559
    cgxgbtdi_TeaWindow_onAnimationFrame$exported$0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:332271
    rt_wrapFunction1 https://html.itch.zone/html/6902325/webapp/teavm/app.js:559
    fn https://html.itch.zone/html/6902325/webapp/teavm/app.js:89061
app.js:251:15
    $rt_exception https://html.itch.zone/html/6902325/webapp/teavm/app.js:251
    $rt_throw https://html.itch.zone/html/6902325/webapp/teavm/app.js:245
    cbga_AssetManager_handleTaskError https://html.itch.zone/html/6902325/webapp/teavm/app.js:45256
    cbga_AssetManager_update https://html.itch.zone/html/6902325/webapp/teavm/app.js:44970
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cbga_AssetManager_finishLoading https://html.itch.zone/html/6902325/webapp/teavm/app.js:45018
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cgkpsu_AssetManager_loadAssets https://html.itch.zone/html/6902325/webapp/teavm/app.js:76569
    cgkpss_GameScreen_show https://html.itch.zone/html/6902325/webapp/teavm/app.js:72746
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    ka_KtxGame_setScreen https://html.itch.zone/html/6902325/webapp/teavm/app.js:358786
    rt_wrapFunction1 https://html.itch.zone/html/6902325/webapp/teavm/app.js:559
    cgkp_Game_create https://html.itch.zone/html/6902325/webapp/teavm/app.js:358906
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cgxgbw_WebApplication_step https://html.itch.zone/html/6902325/webapp/teavm/app.js:81150
    cgxgbw_WebApplication_run https://html.itch.zone/html/6902325/webapp/teavm/app.js:81085
    rt_wrapFunction0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:554
    cgxgbtdi_TeaWindow_onAnimationFrame https://html.itch.zone/html/6902325/webapp/teavm/app.js:332239
    rt_wrapFunction1 https://html.itch.zone/html/6902325/webapp/teavm/app.js:559
    cgxgbtdi_TeaWindow_onAnimationFrame$exported$0 https://html.itch.zone/html/6902325/webapp/teavm/app.js:332271
    rt_wrapFunction1 https://html.itch.zone/html/6902325/webapp/teavm/app.js:559
    fn https://html.itch.zone/html/6902325/webapp/teavm/app.js:89061

https://pastebin.com/aSJeXexh
Hoped to see if you would know if there is a work around this by any chance?

Hi, is your pong opensource?

I uploaded Bullet example in draft and no errors pop up.

image

Well.. This is a bit embarrassing.
On the next day (today) I booted up my PC and..

It just works now?

Screenshot_20221128_064933
I'm confused but happy at the same time.

Not sure what went wrong there, either some hiccup on itch.io side or my PC?

Could be a browser cache issue.

There is a teavm flag in CustomTeaVMTool.longjmpSupported which is true by default. I'll take a look later.