Babylon freezes on Oculus Go in WebXR mode when users touch the touchpad

Hi there,

I encountered a strange behavior in the framework. As soon as I touch the touchpad of Oculus Go controller in WebXR mode, the framework stops to draw. It freezes completely. I can’t reproduce it in the playground.

The error is: Uncaught TypeError: Cannot set property 'isVisible' of undefined, it is pointing to this line.

Does anybody know what it is and how to fix it?

May be hard to diagnose if there’s no repro, but @RaananW may still know what’s going on.

Also: which version of the framework are you using? If it is not the very latest preview version, can you try with it?

That’s interesting that you can’t reproduce that in the playground.

As @Evgeni_Popov asked - what version of the framework are you using? Are you trying to use the oculus go on the playground as well? Would you be able to share the code that you are using ?

@Evgeni_Popov Currently, I use 4.1.0, but I tried to use the latest alpha version (4.2.0-alpha.33) too, the error is the same.

Can you share the code you are using? and the playground you are testing against?

@RaananW I tried to reproduce that here. I can’t share my project with you, but I will try to create another simple project to show the issue.

i think this is the wrong link :slight_smile:

@RaananW My bad :slight_smile: here

1 Like

I checked the oculus go profile, and emulated it. It all seems to be well validated.

I am working on a quick PR that will check if this mesh exists, but this is just a defensive solution. The better solution would be to understand what profile you are loading and why the valueMesh of the component (probably the touchpad) is not defined.

Are you by any chance loading the models from a different source?

Can’t wait to see your code and check what the difference is

@RaananW Here is the test project. Built sources may be taken in the build folder.

Do you by any chance get a warning in the console about incorrectly loading GLTF model?
The webxr profile library require the gltf loader in order to load the models required. Otherwise it falls back to a generic (and sometimes incompatible) model.

Please make sure you are adding the @babylonjs/loaders package and import the gltf loader

2 Likes

@RaananW Thanks a lot!

You are right, there were some logs:

BJS - [14:09:01]: glTF / glb loaded was not registered, using generic controller instead
BJS - [14:09:01]: Falling back to generic models

After I added @babylonjs/loaders and imported this package, everything works perfectly!

1 Like