Skip to content

Meta Immersive-Web-Emulator can not enter WebXR when the threejs release > r172 #31432

@odysseyjason

Description

@odysseyjason

Description

The Immersive-Web-Emulator extension from Meta for desktop Chrome browser can not enter a WebXR session in debug Developer Tools with the polyfill active and code using a threejs import version greater than r172.

Here are Codepen's using the WebXR Dragging Example to isolate the issue at just the import for threejs version change from r172 to r173
threejs@r172 - WebXR Emulator Working - webxr dragging example
threejs@r173 - WebXR Emulator NOT Working -webxr dragging example

the error in console with r173 and newer is:

three.module.js:12906 Uncaught (in promise) TypeError: Failed to construct 'XRWebGLBinding': parameter 1 is not of type 'XRSession'.
at WebXRManager.setSession (three.module.js:12906:18)
at async onSessionStarted (XRButton.js:15:5)

Reproduction steps

  1. use just the code from the threejs examples, webXR dragging on a Chrome Browser with Meta WebXR Emulator extension installed
  2. set the import to r172 and the webxr session can be started using the Meta WebXR Emulator
  3. set the import to r173 and the webxr session can NOT be started using the MetaWebXR Emualtor

Code

<script type="importmap"> { "imports": { "three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js", "three/addons/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/" } } </script>

vs

<script type="importmap"> { "imports": { "three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js", "three/addons/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/" } } </script>

Live example

Screenshots

No response

Version

173

Device

Desktop

Browser

Chrome

OS

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions