Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web projects crash on load with Google Chrome 117 on some Android phones (regression, worked fine in Chrome 116) #82015

Closed
wojr1963 opened this issue Sep 20, 2023 · 52 comments

Comments

@wojr1963
Copy link

Godot version

v3.5.2.stable.official [170ba33]

System information

OS Name Microsoft Windows 11 Home Version 10.0.22621 Build 22621

Issue description

I have an application running in HTML5 for over a year. Today I started to get an error on my Android device, in the Chrome browser.
This is only happening in Chrome on the Android phone and the impression starts with a Chrome update, as this did not happen yesterday.
The application is open to anyone who wants to enter and everyone has a different browser, it happens that it started giving this error since yesterday. never had any error beforeThe application is open to anyone who wants to enter and everyone has a different browser, it happens that it started giving this error since yesterday. never had any error before.
tela
I generated the application again and it still gives the same error. I reduced the size, made some modifications and it doesn't run.

Steps to reproduce

https://jobijogos.com/tv/
This is the link to my application. When running on Chrome android phone it gives the error. On the same cell phone running on Firefox, this error does not occur. in safari it doesn't give the error. In Chrome on the Windows desktop, the error does not appear.

Minimal reproduction project

https://jobijogos.com/tv/

@wojr1963 wojr1963 changed the title Error on Google Chrome Android Phone. It started working yesterday in the Godot 5.52 application exported to HTML5, which was already running without problems. Error on Google Chrome Android Phone. It started working yesterday in the Godot 3.52 application exported to HTML5, which was already running without problems. Sep 21, 2023
@lawnjelly
Copy link
Member

lawnjelly commented Sep 21, 2023

Under system information, it would be more useful to tell us the system on which the problem is occurring, i.e. what Android hardware, what android version, and what chrome version.

Caveat I'm not really a web guy, but having a look:

It runs fine on my tablet, but takes ages to load (seems quicker to load on desktop). Maybe you can get some debug logging / console to tell you what is going wrong (I don't know how this works on android in chrome, maybe you would need to use adb logcat).

Also changes to security settings can be a thing, if the latest chrome has tightened up security and the app is doing something without the correct permission.

In particular it seems to be doing some php access, that might be triggering security errors (I'm not really a web guy but I'm aware there are a lot of cross site things that are blocked). One method to help pin down is to turn off anything that might cause permission error, see if it runs, then gradually bring back in features to find the culprit.

index.js:354 Godot Engine v3.5.2.stable.official.170ba337a - https://godotengine.org
index.js:9 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
init @ index.js:9
index.js:9 [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)
create @ index.js:9
index.js:354 OpenGL ES 2.0 Renderer: WebKit WebGL
index.js:354  
index.js:354 https://jobijogos.com/
index.js:354 lk00:https://jobijogos.com/pxx1.php?tk=pea!peec&idchamada=59697.965215
index.js:354 POSTESTE
index.js:354 GANHOU  200,00
index.js:354 SORTEIO: 100026
index.js:354 100028 status:0 hora local:2023-09-21 02:50:39
index.js:354 falta minutos:8
index.js:354 falta horas..:0
index.js:354 falta dias...:0
index.js:354 =======>>>>>>lkcart:https://jobijogos.com/fc.php?st=100028&id=0&tp=0
index.js:354 idx --------------------
index.js:354 0
index.js:354 ==========>>>> JANELA:(2520, 1331)
index.js:354 ======>>>>carregaCartelasst:1
index.js:354 lk12:https://jobijogos.com/pxx1.php?tk=pea!peec&idchamada=72106.775721 st:0
index.js:354 BONUS
index.js:354 GANHOU  200,00
index.js:354 SORTEIO: 100027
index.js:354 100028 status:0 hora local:2023-09-21 02:50:44
index.js:354 falta minutos:8
index.js:354 falta horas..:0
index.js:354 falta dias...:0
index.js:354 =======>>>>>>lkcart:https://jobijogos.com/fc.php?st=100028&id=0&tp=0

Also to narrow things down, another useful test would be just trying a blank project and seeing if that runs on chrome on the device.

@lawnjelly lawnjelly added this to the 3.x milestone Sep 21, 2023
@De-Panther
Copy link

Noticed the same issue in other existing Godot based games.
Happens to me on Chrome Android 117.0.5938.60.

After testing a few times with the Chrome DevTools attached, I managed to get the error message "memory access out of bounds".
But couldn't trace when it happens.

When the DevTools attached, the games works as they should, only when I detach the DevTools I can get the page to crash.

@De-Panther
Copy link

I tested some games on itch, seems like games made with Godot 3.5 crash while games using Godot 3.2 worked fine.
Maybe something with the loading process?

@Zireael07
Copy link
Contributor

It runs fine on my tablet, but takes ages to load

Ages to load on mobile/tablet was already a preexisting issue in Godot 3 that I once reported.

@wojr1963
Copy link
Author

I tested some games on itch, seems like games made with Godot 3.5 crash while games using Godot 3.2 worked fine. Maybe something with the loading process?

Chrome Android 117.0.5938.60

The version of Chrome that gives the error is Chrome Android 117.0.5938.60

I exported the project in the Godot 3.34 version and now there is no more error when opening the page, so it is something in the 3.52 export template that after updating to Chrome Android 117.0.5938.60 started giving an error

@danilw
Copy link

danilw commented Sep 21, 2023

I tested some games on itch, seems like games made with Godot 3.5 crash while games using Godot 3.2 worked fine.

This why I do not update my Godot web-projects to Godot 3.5 export template,
Godot 3.5 web export template require some "most latest" WASM features, I forgot how ti called, basically work only in second half of 2022+ Chrome version browsers.

My Godot web export stay on 3.3 version.

@godotengine godotengine deleted a comment from 457205697 Sep 21, 2023
@idoadler
Copy link

I built my game once with Godot 3.5.3 and once with Godot 3.5.3 Mono.
The second build (mono) works correctly, no problem on my Android Chrome. The problem only occurs on the regular build.
this one works, this one crash after loading.

@akien-mga
Copy link
Member

akien-mga commented Sep 25, 2023

this one crash after loading.

Tested on my phone (Xiaomi Pocophone running MIUI 11 / Android 10), and it seems to work fine.
Tested Chrome 117.0.5938.60 and Firefox Beta 118.0b9.

jobijogos.com/tv

Also works fine for me on the above phone / Chrome.

So the phone model / OS version / RAM might be an important piece of the puzzle.

@De-Panther
Copy link

I built my game once with Godot 3.5.3 and once with Godot 3.5.3 Mono. The second build (mono) works correctly, no problem on my Android Chrome. The problem only occurs on the regular build. this one works, this one crash after loading.

Both crashed on my device

@lia12345kimo
Copy link

Some of the devices I've come across so far work, some don't. Some Android systems work, some have stuck sounds, and some have stuck screens.

@bakyeono
Copy link

same issue here

@Zireael07
Copy link
Contributor

#82356 has a better description of the issue. Looks like it's NOT related to the device itself but to version of Google Chrome for Android

@akien-mga akien-mga changed the title Error on Google Chrome Android Phone. It started working yesterday in the Godot 3.52 application exported to HTML5, which was already running without problems. Web projects crash on load with Google Chrome 117 on some Android phone (regression, worked fine in Chrome 116) Sep 26, 2023
@akien-mga
Copy link
Member

#82356 has a better description of the issue. Looks like it's NOT related to the device itself but to version of Google Chrome for Android

It's related to both, as discussed above (and in that issue).

Chrome 117 introduced a regression which only seems to affect some (underpowered?) devices.

@mununki
Copy link

mununki commented Sep 26, 2023

I encounter the same issue with Godot 3.5, then I downgraded to 3.3.4 then issue is resolved.

@mununki
Copy link

mununki commented Sep 26, 2023

One thing very weird is that the crash was not happened when I connected the chrome dev tools.

@akien-mga
Copy link
Member

akien-mga commented Sep 26, 2023

Can someone who can reproduce the issue retrieve Chrome logs for when it crashes? Can you confirm that it would crash on an empty Godot project too, or is it specific to projects using certain features?

This needs to be reported upstream to Google, but we need more data for them.

If someone has time, testing intermediate Chromium releases listed in https://vikyd.github.io/download-chromium-history-version/#/ would be great to pinpoint when the regression happened.
We know it seems to be failing in 117.0.5938.60, that would be worth confirming with a Chromium build, then test newer versions to check if it's resolved already, and older versions to pinpoint when the regression was introduced.

Since apparently Godot 3.3.4 works, it could also be helpful to check which is the first version of Godot 3.4 or 3.5 (include betas/RCs) where the problem happens. Godot 3.5.x used to work fine, so the actual bug is still in Chromium and should be fixed there, but it can be helpful to know which Godot change triggers it.

@akien-mga akien-mga pinned this issue Sep 26, 2023
@akien-mga akien-mga changed the title Web projects crash on load with Google Chrome 117 on some Android phone (regression, worked fine in Chrome 116) Web projects crash on load with Google Chrome 117 on some Android phones (regression, worked fine in Chrome 116) Sep 26, 2023
@De-Panther
Copy link

Can someone who can reproduce the issue retrieve Chrome logs for when it crashes? Can you confirm that it would crash on an empty Godot project too, or is it specific to projects using certain features?

This needs to be reported upstream to Google, but we need more data for them.

If someone has time, testing intermediate Chromium releases listed in https://vikyd.github.io/download-chromium-history-version/#/ would be great to pinpoint when the regression happened. We know it seems to be failing in 117.0.5938.60, that would be worth confirming with a Chromium build, then test newer versions to check if it's resolved already, and older versions to pinpoint when the regression was introduced.

Since apparently Godot 3.3.4 works, it could also be helpful to check which is the first version of Godot 3.4 or 3.5 (include betas/RCs) where the problem happens. Godot 3.5.x used to work fine, so the actual bug is still in Chromium and should be fixed there, but it can be helpful to know which Godot change triggers it.

It fails on Chrome Beta on Android as well, 118.0.5993.21
But on 118. It doesn't crash, just displays a message "table index is out of bounds", and prints it to the console as well.
If someone can create a version that have the stack trace of the fail message, I can give more details, but currently this is the only thing that was printed to the log on the games I tested.

@ChronoDK
Copy link

This is getting really strange. We tried exporting from the mono version of 3.5.3 and now the games actually run on Chrome Android 117! No more Aw Snap message. The same game, no code changes at all. Still using GDScript. What does the mono version do differently?

@lawnjelly
Copy link
Member

This is getting really strange. We tried exporting from the mono version of 3.5.3 and now the games actually run on Chrome Android 117! No more Aw Snap message. The same game, no code changes at all. Still using GDScript. What does the mono version do differently?

Don't discount that it could simply be a timing difference. Same with running under the chrome remote debugger. Threading bugs / heisenbugs can often exhibit like this.

@kultuk
Copy link

kultuk commented Sep 28, 2023

Don't discount that it could simply be a timing difference. Same with running under the chrome remote debugger. Threading bugs / heisenbugs can often exhibit like this.

While it is possible to be a timing thing, my team experienced the same thing while exporting with mono, with the caveat that on one specific device it still didn't work.

@danielsasakiIGS
Copy link

danielsasakiIGS commented Sep 28, 2023

I have the same problem with my game crashing or taking forever to load =/
I'm using Godot 3.5.2 and this issue happens by testing on low, mid and high-end Androids.
The game only loaded normally after I used Chrome versions equal or below 116.

@ChronoDK
Copy link

@danielsasakiIGS Can you try building the game in the .NET / mono version? In our testing that version does work.

@akien-mga
Copy link
Member

akien-mga commented Sep 29, 2023

This is getting really strange. We tried exporting from the mono version of 3.5.3 and now the games actually run on Chrome Android 117! No more Aw Snap message. The same game, no code changes at all. Still using GDScript. What does the mono version do differently?

The main difference between the Mono and non-Mono builds is the Emscripten version used to build them. The Mono build is stuck an old Emscripten 1.39.9, while classical builds use Emscripten 3.1.14 for Godot 3.5.x.

So you could try to build your own export templates with Emscripten 1.39.9 and see if that solves the issue. It might well be some code emitted by newer Emscripten that trips Chromium.

@ChronoDK
Copy link

We tried building export templates will most of the emscripten releases (took a while, heh), and the latest working version is 2.0.16. With that version of emscripten we now have regular Godot 3.5.3 export templates that works on Android Chrome 117.

@akien-mga
Copy link
Member

Thanks for taking the time to bisect it!

Here's the changelog for Emscripten 2.0.17: https://github.com/emscripten-core/emscripten/blob/2.0.17/ChangeLog.md#2017-04102021

@De-Panther
Copy link

Upload a build if you want me to test on my device.
The mono builds were flaky on it as well.

@Faless
Copy link
Collaborator

Faless commented Sep 29, 2023

For reference, this is the upstream issue in the Chromium bug tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=1485475

@jknightdoeswork
Copy link

We're using Emscripten version 3.1.18 with no problems.

@Faless
Copy link
Collaborator

Faless commented Sep 30, 2023

@jknightdoeswork are you referring to Rocket Bot Royale?
I'm unable to test it on Chrome Android as it force-redirect me to the play store to download the app when it detects I'm on mobile.

@jknightdoeswork
Copy link

jknightdoeswork commented Sep 30, 2023 via email

@De-Panther
Copy link

https://gooberdash.winterpixel.io

Works for me both with Chrome Android 117 and 118

@RByers
Copy link

RByers commented Oct 1, 2023

Chrome team here: very sorry for the regression! I'm also sorry we hadn't seen or acted this issue sooner - the bug wasn't filed with the metadata needed to indicate it was a regression or a report from a developer. It looks like a code generation bug in V8 which is potentially very serious. I've marked the Chrome bug appropriately and you should expect traction in the next 24 hours or so (since it's currently the weekend).

@SysError99
Copy link
Contributor

SysError99 commented Oct 1, 2023

Chrome Canary 119.0.6038.2 works for some reason. Tested with all 3.5.x projects I got hands on.

Screenshot_20231002-063208.jpg

Additional report, building it with very old Emscripten also seemed to be temporary solution at the moment.

@RByers
Copy link

RByers commented Oct 2, 2023

Yes, I've also confirmed it seems to be fixed in Chrome 118 (in beta now, scheduled for stable in 1-2 weeks). We're still trying to identify the root cause and fix, but regardless you should expect this to be addressed in the next major Chrome update. It would be good if others could test their scenarios in Chrome Beta just to confirm there are some cases still broken.

@RByers
Copy link

RByers commented Oct 2, 2023

Also our testing team has found the issue no longer reproduces in our latest 117 build which will start pushing to users tomorrow! We'll continue to investigate, but it would definitely be good to get confirmation from folks here that Chrome 118 (beta) is fine. We have maybe a few more days to get any last minute emergency fixes in the 118 release if necessary.

@De-Panther
Copy link

Yes, I've also confirmed it seems to be fixed in Chrome 118 (in beta now, scheduled for stable in 1-2 weeks). We're still trying to identify the root cause and fix, but regardless you should expect this to be addressed in the next major Chrome update. It would be good if others could test their scenarios in Chrome Beta just to confirm there are some cases still broken.

What version of 118? Downloaded now 118.0.5993.32 from the play store and still gets the "table index is out of bounds".

@RByers
Copy link

RByers commented Oct 2, 2023

I tested on 118.0.5993.32, but I was looking only at the crash (sad tab) which was due to a SIGILL (illegal instruction) in generated code. Perhaps "table index out of bounds" is a separate issue?

@ChronoDK
Copy link

ChronoDK commented Oct 5, 2023

It seems the latest Android Chrome 117 has fixed the problem. Godot 3.5.3 once again seems able to run in all relevant browsers, yay!
I guess we should close this thread and go back to worrying about how to get Godot 4 games running on iOS Safari for longer than 5 seconds now? :-D

@Faless
Copy link
Collaborator

Faless commented Oct 5, 2023

I guess we should close this thread and go back to worrying about how to get Godot 4 games running on iOS Safari for longer than 5 seconds now? :-D

@ChronoDK Would be nice to get some feedback from safari devs, have you tried opening an issue in their bug tracker? https://bugs.webkit.org/

@kaiharuto
Copy link

It seems the latest Android Chrome 117 has fixed the problem. Godot 3.5.3 once again seems able to run in all relevant browsers, yay! I guess we should close this thread and go back to worrying about how to get Godot 4 games running on iOS Safari for longer than 5 seconds now? :-D

I'm currently running Chrome 117.0.5938.141, still experiencing the problem. Which version were you referring to?

@Keetz
Copy link
Contributor

Keetz commented Oct 6, 2023

Had the same issue, my Chrome updated 01:23am today to version 117.0.5938.153 and now everything works again.
Also tested Beta and Canary version which also works.

Stable: 117.0.5938.153 - Works
Beta: 118.0.5993.488 - Works
Canary: 120.0.6049.0 - Works

@Faless
Copy link
Collaborator

Faless commented Oct 20, 2023

Closing as fixed upstream.

@Faless Faless closed this as completed Oct 20, 2023
@AThousandShips AThousandShips unpinned this issue Oct 20, 2023
@YuriSizov YuriSizov removed this from the 3.x milestone Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests