Failed to asynchronously prepare wasm: Error: Out of executable memory

I can’t load unity webgl on ios now that I’m using 2019.1.1.f on iOS 13.1.3 safari mobile. It was working the last time I built the project but that was about a month ago, I’m not sure which version of unity that was.

failed to asynchronously prepare wasm: Error: Out of executable memory in function at index 22675
printErr — UnityLoader.js:4:11169
(anonymous function) — blob:https://whimsica.com/fca6df89-b094-4ea7-9d25-79e4104b6d1c:8:31443
promiseReactionJob
print — UnityLoader.js:4:11130

I’ve cleared the cache and restarted safari mobile

I’m going to download 2019.2 to see if that helps. My project is only 26mb.
What does this error mean?

It means you need to update to iOS 13.2 (large wasm binaries are broken on iOS 13.0 and 13.1.x). And to answer your question in the other thread, you no longer need to set memory for wasm since Unity can now grow memory without a performance hit (i.e. it’s already optimally set).

I upgraded to 13.2 and 2019.2 and now I get
Assertion failed: 0 && "Threads are not enabled for this platform
Also this error is on safari mobile and firefox desktop now.

Edit: I changed some settings from debug to release and now the thread error and memory error are gone. It opens on firefox desktop.

On safari mobile the new errors are about 100 Invalid Enums

And

exception thrown: TypeError: Argument 1 (‘sync’) to WebGL2RenderingContext.clientWaitSync must be an instance of WebGLSync,clientWaitSync@[native code]

For publishing settings I have enable exceptions set to Explicitly thrown exceptions only. All other settings are not checked. Compression format is gzip.

Edit: I turned off iphone experimental features Web 2.0 and now it loads again. Safari Mobile is not able to use Web 2.0?

Yeah Safari (on both desktop and iOS) can only use WebGL 1.0. Its experimental implantation of WebGL 2.0 was very incomplete last I checked…but…judging by (very) recent commits it does seem like Safari is attempting to implement WebGL 2.0!!! Finally!

1 Like