playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.55k stars 1.34k forks source link

Safari 14 CompileError: WebAssembly.Module doesn't parse at byte 58: invalid opcode 192, in function at index 16 #5681

Open Devortel opened 11 months ago

Devortel commented 11 months ago

This only affects a relatively small number of users using Safari 14, but I thought it was worth reporting anyway. The following output is from Poki.com's console error tracking API. This data was collected over 24 hours across ~200K gameplays. The project uses an unmodified version of PlayCanvas v1.65.3 with the Ammo.js library installed.

Screenshot 2023-09-27 at 12 07 10 PM

You can recreate this by opening the following project: https://poki.com/en/g/vortellis-pizza-delivery in Safari 14.

epreston commented 11 months ago

Gathering data to qualify the issue:

Does this affect all users on Safari 14 or just a small subset ?

Apple's support for 14 was between 2018–2021. It currently represents less than 0.26% of global usage.

Devortel commented 11 months ago

I can't confirm whether it's all or just a subset of Safari 14 users because we only see the logs when the error occurs. It's only affecting ~0.18% of our players in the last 24 hours so I completely understand if it's not worth allocating dev time.

epreston commented 11 months ago

It's worth while for my purposes to gather data. I'm just an independent developer. In my personal view, is its hard to lose $200 in effort on a $3 sale when people are often happy to just update their phone. Those that can't because its jailbroken usually have other issues my code can't fix.

Please share what you can. This helps me plan some things.

Devortel commented 11 months ago

If you're interested in collecting more data, I'm happy to share similar screenshots of the most frequently occurring errors, you can reach me at wes@v1digital.com. While PlayCanvas has been extremely performant and stable, my game is receiving around 220K daily unique users on a huge variety of different devices and geos. There are probably a few edge cases and obscure console errors that may be of interest to PlayCanvas developers.

epreston commented 11 months ago

I'll do that. Thank you. Found two things that might help:

The other thing I'm looking at is some devices reporting capabilities they do not support. Often its because the reference drivers are copied from a desktop platform / unmodified by the device vendor. These are difficult to track down because the device itself gives the wrong numbers when asked.