-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
HTML5 export for Godot 4.x takes 1-2 minutes to load on macOS #70691
Comments
This comment was marked as outdated.
This comment was marked as outdated.
@Calinou I feel like this isn't the same as those. I don't believe it's a size issue. Running locally on MacOS on both Brave and Chrome: Took about ~2 minutes and 30 seconds for the game to load. Both Brave and Chrome wanted to kill the tab. It had locked up the entire browser for (Couldn't go to any other tab). Running this on Windows, and the game loads in ~10 seconds. If this is a size issue, then MacOS Chrome and Brave are just INSANELY slow to load things. Which doesn't seem right. |
In that case, it might be shader loading and/or conversion (correct me if I'm wrong, but MacOS converts stuff to ANGLE behind the scenes, doesn't it?) |
I also think may be a shader compilation issue. Chrome definitely uses ANGLE, but I am not sure about Brave. macOS doesn't use ANGLE when running on desktop though. While attempting to fix the gl_compatibility renderer on macOS I experimented with using ANGLE, but found that the shader compilation times ended up increasing by over 100X. In #70065 I was able to speed up shader compilation times and get gl_compatibility working on macOS without ANGLE. However, since chrome uses ANGLE, my guess is we are hitting those pathological shader compilation issues anyway. I am not sure what exactly in the shader is causing the issue (it may even be a bug in ANGLE). |
Related #65696 |
The issue of Chrome crashing on MacOS 13 does indeed exist, and Firefox takes over 2 minutes to load. |
I'm completely new to C++ dev, but I would like to help with this issue. |
Can confirm, 4.0 RC2 is still taking minutes to load on Brave on MacOS.. Causes my entire browser to lock down completely. |
The issue still persists in rc4, rc5, rc6. In Forward+, Mobile, and Compability mode. Chrome hangs, Firefox takes a while but loads, and Safari has a infinitely loading spinner and reports the following in the console:
|
Thanks @mgc8, all this is great support for all the suffering mac Godot users like me |
On itchio, you should assume that at some point your game will be required to be loaded in an iframe that has been generated by itch.io. A solution that involves breaking out the frame is not a long term fix because we have system in place to automatically inject site locking to prevent shady third-party platforms from embedding our games to steal bandwidth.
Unfortunately I think our long term fix (assuming safari never supports the header) will probably involve launching the game in a separate page containing only an iframe and different headers specific to safari, instead of trying to execute the game on the full project page. Edit: Was double checking the code and it looks like this was already implemented for the Game Embed tool located in the uploader's dashboard. If they generate an embed URL from there, it will provide a link to the game that will use Edit2: I deployed a fix that will cause Safari to always load games in a new window using the embed URL I described above that uses the |
On Newgrounds, SharedArrayBuffer support works in Safari as well as the other major browsers (tested with the same build of the same project, etc.). I'm not sure which method they've used, however, or if it would translate easily to itch, if it would be useful to look into, or who over there to ask about it if it would be useful. Edit: I should note my test wasn't with a Godot game, but a plain jane Emscripten build of a C program—the underlying issue appears to be the same. |
Hi @leafo, thank you for dropping by! This looks like a good, pragmatic solution given the current state of browsers, with every major one seemingly having a different, incompatible issue related to this. I can confirm that the "new window" works nicely for itch.io games in Safari, so at least that's solved now for end-users. Hopefully the browser developers will also move on with updates/fixes to make the whole process less frustrating for both site owners and game devs (three months later, Chrome still hasn't switched to Metal as default back-end on macOS)... |
The "new window" solution works great on desktop! On mobile, it gives me a 404 error in the new tab (tried iOS and iPadOS, both Safari and Chrome, but did not try Android). |
As of right now me using IOS doesn't seem to load my game that used Godot4, so even with the Embed game link it doesn't work. |
Hi there @leafo , thank you so much for the fix and for creating the website indie devs know and love! In recent exports, the new window in safari appears to give 404. This seems to indicate that the generation of the embed link is not working correctly. Is there anything users can do to specify the embed link, or otherwise make the new window use the correct embed link? This is on a laptop M1 Mac. |
Is your safari configured to block cookies in any way? A cookie is combined with the generated link to verify access to the popup |
It seems to be way better when exporting using the single-threaded export template. #85939 |
Maybe on Chrome, but now it takes forever on Firefox/macOS. |
As an update, it does appear that Chrome is now using the Metal renderer by default now. I am using Chome 123.0.6312.59 and I have verified that the Angle Metal renderer is being used. I have not changed any flags or set a custom profile. Also the "image rendering issue" renders without issue. I also use Brave but it still not updated to use the Angle Metal Renderer. I suspect its only a matter of time for the other browsers to follow suit. |
Thank you very much for updating us! I suspect firefox and brave should update soon to match, but I worry that safari is still a long ways off. At any rate, having everything work well on the others puts us in a much better position. |
That demo locks up my Chrome, but no longer locks up my computer. It will sit there like this for a long time: Interesting that this appears to be a CPU bound issue, why is that? |
@tavurth The screenshot you posted indicates you need to relaunch Chrome for chrome version you've listed to take effect. I might try relaunching chrome and trying again. The other difference is that I am using an ARM (M1) machine, but I can't see why that would matter. Once you've restarted Chrome, can you open the console and run the following commands and share the output:
FWIW, on my machine, I see:
|
That's interesting. Can I ask what chrome version? Looks like its M* related though - I have what chrome says is latest as of today: 123.0.6312.87 on an intel macbook pro and a M3 macbook pro and I get: Intel: M3: |
On my M1 laptop the build with a few number labels from here https://arturitoproductions.itch.io/testingimageissue opens quickly on Chrome, but slowly on Firefox. And on Safari it's popping up a new itch.io window, which gives a 404 error :) |
Firefox has likely not adopted the Angle Metal renderer as their default yet. It may be the same with the latest version of non-ARM Chrome installs. If the x86 (intel based) installs of chrome are not yet defaulted to Angle Metal renderer, then we'll have to wait a bit longer for Godot 4 web exports to work as expected for all mac users. As of today, it should be working for M1, M2, M3 mac users with the latest version of chrome I believe the Safari 404 issue is unrelated (there's some discussion above about a missing required header on itch.io) |
It appears the new chrome default has only been applied to ARM based macs. intel based macs may have to wait a bit longer. Still, it's promising that these changes are slowly trickling out |
I believe this is fixed when using the new Godot 4.3 no-threads export. |
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Bugsquad note2: Also, please avoid asking when this will be fixed. The issue is confirmed to be with the version of ANGLE used by Chromium, so we are all waiting for Google to ship the fix.
Godot version
4.0.beta10
System information
MacOS Monterey 12.2.1
Issue description
Godot games block the main thread (And potentially crashes it) on MacOS.
Untested for Windows or Linux.
This happens from both a generic build and when you run the project in a browser from the engine.
Steps to reproduce
Create a new project for Godot Beta 10.
Add a UI Button to the screen.
Have it print things out, whatever you wish.
Add an HTML5 export, install the HTML5 export library if necessary.
Click the run on HTML5 button on the top right.
Proceed to wait for 1-2 minutes before the game will fully load.
Minimal reproduction project
TestGodot4Web.zip
The text was updated successfully, but these errors were encountered: