[WebGL] Random Crashes on iOS 18 (works fine on iOS <18)

Hey, I’m facing random crashes in my WebGL build (Unity 6) on iOS 18.
Everything works fine for devices running iOS 17 or lower.

The crashes seem to be random, as it works sometimes if I reload the page or restart the browser.
Even with a highly optimized, lightweight configuration (minimal scene with just a camera and a light, no depth/opaque textures, HDR off, shadows disabled, tried Gamma & Linear color space, and initial WebAssembly heap set as low as 32 MB).

Crashes happen on Safari & Chrome.

Everything works fine on Desktop & Android.

Has anyone an idea whats the issue?

sounds likely running out of memory.. whats the error?

That’s also one of the biggest problems… I can’t really get one :(… Seems to crash silent.

If I try a development Build, even after hundreds of reloads I never get the game to run and don’t see anything in the Safari console.

Trying with a non-development build, empty scene, I get this:

Console from Safari iPhone: (crashing)

Now if randomly the game opens I see this log:

Console from Safari iPhone: (not crashing)

SO the only difference I see is here:
(additional logs if NOT crashing)

so it looks like the crash happens before Unity finishes shader compilation, but honestly I have no idea :frowning:

Let me know if I should try something else…

Answered here, but it seems iOS 18.4 introduced new memory management at the OS level. Depending on the RAM of the devices you support, you’ll have to decrease the size of the build to load initially without issue. The good news is that you can load additional assets after.

As an example, on an iPad 9th gen with 3GB RAM, the compressed build had to be 12MB total or smaller to work. The tolerated size goes up for devices with higher RAM.

Good luck! This one was a doozy.

Seems like v18.5 fixed it up for me