meta-quest / immersive-web-emulator

Browser extension that emulates Meta Quest devices for WebXR development. Lead: Felix Zhang (fe1ix@meta.com)
https://developer.oculus.com/blog/webxr-development-immersive-web-emulator/
MIT License
297 stars 34 forks source link

Bug: Errors in WebXR Samples - Controller State #34

Closed De-Panther closed 5 months ago

De-Panther commented 9 months ago

When using the Controller State sample https://immersive-web.github.io/webxr-samples/controller-state.html First there's an error

motion-controllers.module.js:120 Uncaught (in promise) Error: No matching handedness, , in profile generic-hand
    at fetchProfile (motion-controllers.module.js:120:13)
fetchProfile @ motion-controllers.module.js:120
Promise.then (async)
(anonymous) @ input-renderer.js:248
dispatchEvent @ webxr-polyfill.js:2958
_checkInputSourcesChange @ webxr-polyfill.js:3391
XRSession$1.<computed>.onDeviceFrame @ webxr-polyfill.js:3161
requestAnimationFrame (async)
requestAnimationFrame @ webxr-polyfill.js:27152
XRSession$1.<computed>.startDeviceFrameLoop @ webxr-polyfill.js:3178
XRSession$1 @ webxr-polyfill.js:3252
requestSession @ webxr-polyfill.js:4461
await in requestSession (async)
CustomWebXRPolyfill.XRSystem.requestSession @ webxr-polyfill.js:32464
initXR @ controller-state.html:254
(anonymous) @ controller-state.html:364

image

And when entering the XR session, the hands poses are tracked, but not the joints or pinch input.

felixtrz commented 8 months ago

The hand in this sample is not animated on device or through IWE. There is no implementation to animate the hand mesh in the sample's source code. But something is definitely wrong with buttons exposed through emulated hand tracking, I will fix it.

De-Panther commented 8 months ago

IWE?

I think that the first issue, is that while in inline session, the emulator is trying to run other sessions operations, like _checkInputSourcesChange. And I guess that once there's an error, other stuff stops working as intended.

felixtrz commented 8 months ago

It's indeed curious.. it seems to be a bug in the WebXR polyfill library that the emulator is using, I will patch that up.

IWE == Immersive Web Emulator

felixtrz commented 8 months ago

The fix has been landed into the main branch. If you'd like immediate access, you can build from the source to obtain the patch. Otherwise, it will be included in the upcoming v1.4.2 release.

Thank you for bringing this issue to our attention.