engine icon indicating copy to clipboard operation
engine copied to clipboard

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

Open Devortel opened this issue 2 years ago • 5 comments

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.

Devortel avatar Sep 27 '23 04:09 Devortel

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.

epreston avatar Sep 28 '23 21:09 epreston

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.

Devortel avatar Sep 29 '23 00:09 Devortel

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.

epreston avatar Sep 29 '23 04:09 epreston

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 [email protected]. 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.

Devortel avatar Sep 29 '23 23:09 Devortel

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

  • Looking through the recent commits, there's been an update to the Ammo wasm module since 1.65.3. It's a straight file replacement if you don't want to wait for 1.66. See 4c1da93f650fd6ec5a241935befa55bb79c19c6e

  • Second one is simply confirming the checksum of the wasm binary. Git will mangle these things and treat them like text unless you mark them as binary in the .gitattributes. A *.wasm binary entry in that file for the project never hurts.

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.

epreston avatar Sep 30 '23 00:09 epreston