Testing my XR demo app, the setup call to
scene.createDefaultXRExperienceAsync()
throws this exception only on iPad/WebXR Viewer (a stripped ver of Firefox):
Shim: We don't expect user adds event before starting session.
The same code runs fine on Android (8 and latest 13) using Brave (latest), and fails properly and cleanly on Brave desktop/Win10 (immersive AR not available on desktop, naturally). The problem appears to be isolated to Web XR Viewer (iPad), but since the exception is received from a Babylon XR call I thought Id start here.
I am not explicitly loading any polyfill for XR, although ARViewer Settings contains a link to a default polyfill. But I also understand I dont need it / it wont matter, because Im not using the deprecated WebVR API.
My invocation is extremely basic:
const xr:WebXRDefaultExperience = await newScene.createDefaultXRExperienceAsync();
Ive also tried with options, with no change to the problem:
const xr:WebXRDefaultExperience = await newScene.createDefaultXRExperienceAsync( {
uiOptions: {
sessionMode: 'immersive-ar',
referenceSpaceType: "local-floor"
},
optionalFeatures: [ WebXRPlaneDetector.Name, WebXRHitTest.Name ]
}
It’s not Playground but you can currently run the test case here. Ive redirected console.<log|warn|error> to alert() so there’s some other chatter before the error appears:
https://ultimator.snaponpromotion.com/ar/KCP1423
Everything is latest:
Babylon @ 5.29
iPad 9th gen, iPadOS 15.7
ARViewer whatever’s on App Store
I can’t find this error text within BabylonJS so I guess it’s bubbling up from a dependency within BJS.
Also, zero hits on Google for this error message. I have no idea what it wants. Help?