WebXR EnterVR fails in PCVR mode after exiting a few sessions

When I’m using a Three.js application with WebXR in PCVR mode via AirLink, and I repeatedly enter and exit a session (without closing the browser window).
I’m using Windows 10, Chrome, and the latest version of Meta Quest Runtime
I’ve noticed that after a certain point, attempting to start a new session results in a console error and the session fails to initialize.
The error is the following

When this error happens, even closing and restarting Chrome doesn´t help
Edge has the same problem, after the error appears, the only way to recover is to restart my PC

Here is the example I’m using (it’s quite simple)

https://codepen.io/fedeMarino75/pen/NPGYzZo

I understand this might be related to Three.js, perhaps some cleanup should be done when exiting to free some resource?
It could also be a deeper issue involving the browser, the drivers, etc.

I also tried a WebXR basic example as this one

In this case the problem does not occur, at least after extering and exiting 10 times.

I’d like to know what possible solutions there might be for this issue, or what kind of test should I do to get to the root cause of the error.

Thanks

Can you reproduce it with the WebXR emulator in chrome: https://chromewebstore.google.com/detail/immersive-web-emulator/cgffilbpcibhmcfbgggfhfolhkfbhmik?hl=en&pli=1

1 Like

No, it does not fail with the WebXR Emulator