Failed to initialize basis worker: Error: WebAssembly.Module doesnt parse at byte 4572: invalid opcode 192, in function at index 73

Hello all,

so this game I’m working on gets stuck on the loading screen when running it on older devices (issue originally found on a ipad mini 5).

When I check the console logs, there is some error logs that I think could be causing it to get stuck… Failed to initialize basis worker: Error: WebAssembly.Module doesnt parse at byte 4572: invalid opcode 192, in function at index 73

If anyone has any ideas on what this error could be caused by, or if they are able to re-produce it in other projects that would be great.

Thank you very much

This might help you: Basis Failed to transcode image (Safari 17.0, iOS 17.0) · Issue #5509 · playcanvas/engine · GitHub

2 Likes

Thanks, I will take a look. I guess I would just re-import basis in the editor to update to the latest version of basis containing the fix?

Yep, that worked in the past.

1 Like

Ok first I will try updating basis to the latest version and see if that fixes it. Thanks

I re-imported basis, but seems like it still doesnt work.

I am also getting this error aswell as the other one I posted (although both seem simular and maybe link to the same issue)…
Unhandled Promise Rejection: Error: WebAssembly.Module doesn’t parse at byte 58: invalid opcode 192, in function at index 16

Could you please try and use files from here, as these are definitely up to date:

If this issue persists, we might have a new problem.

1 Like

Ok thanks, I will try

Unfortunately it seems the error still occurs with the latest files.

I tested on this device through browserstack…
iPad Mini 2019 v12.2

Apparently it also got stuck on this device aswell (probably the same issue)
iPad Mini 5 iOS 17.4.1

Maybe if I try reproduce on any other project with basis? I could setup as new small project and import basis? what do you think? if that works then it must be some issue with the project on my end

A simple repro project is always a good idea, even for your own self. Try a blank project with a sample texture and compress it with Basis.

1 Like

Ok will do, thanks

try this perhaps PlayCanvas Examples

1 Like

@LeXXik @mvaligursky

I tried this example: Basis Example - PLAYCANVAS

it seems to load fine. So something must be wrong with the code on my end then I’m assuming (which I am investigating).

It’s Safari issue, not your issue … but it seems they handled the updated wasm fine (without anybody adding any fixes to it).
The issue we had was to occasionally (maybe 1:3) get the issue, not 100% … are you getting yours 100% of time? On all basis textures, or just some of them? We only had it on some I think.

1 Like

Ok thanks. Yes so far its happened everytime. I can try loading a different scene to check if it happens on all the basis textures or just some

I tried using no basis textures in a scene (just a blank scene more or less). However, still got the issue, but I have some textures set to preload that use basis so I guess maybe that’s why

However, ive noticed that im getting this error on chrome…
​Unhandled Promise Rejection: Error: WebAssembly.Module doesn’t parse at byte 58: invalid opcode 192, in function at index 16

very odd. Unless the device i’m testing on is too old haha

@mvaligursky hmm, the link above gives me another error (Win11, Chrome):

Doesn’t happen in stable Chrome. Happens in Version 128.0.6613.7 (Official Build) beta (64-bit)

Chrome on iOS is just reskinned Safari (Webkit Webview)

1 Like

ah ok that makes sense

@LeXXik @mvaligursky

Hey, just posting an update. I havent managed to resolve this issue yet, but ive been testing on more devices.

I am also getting the error on ipad air 4 v14.1

[Error] failed to initialize basis worker: CompileError: WebAssembly.Module doesn’t parse at byte 662: invalid opcode 193, in function at index 108
(anonymous function) (playcanvas-stable.min.js:6:1357126)
(anonymous function) (playcanvas-stable.min.js:6:1356884)
promiseReactionJob