WebXR exception "Shim: We don't expect user adds" on WebXR Viewer / iPad only

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?

cc @RaananW but I wonder if the viewer you use is on par with specs knowing ios can only run Safari at the moment

iOS has a version of Brave too, they arent limited to Safari.

That being said, Ive just tried Brave on the iPad and that simply fails differently. The XRExp helper appears to init successfully, but no xr.baseExperience object is then found, preventing me from creating the WebXRCamera for lack of an xr.baseExperience.sessionManager, and also the lack of an xr.baseExperience.featuresManager.

Is there no interest at this time in active iPad support, then? I need to find an iPad Babylon user/developer to compare notes?

iOS doesn’t allow any other rendering engine apart from Safari. So even if you use brave or chrome, you are still using iOS under the hood.

There is no WebXR support to any iOS device at the moment, though I will be very happy to be proven differently :slight_smile:

Have you considered giving Babylon Native a try?

2 Likes

The iOS Firefox WebXR viewer is no longer being maintained and has not been updated since May 29, 2020. I would not expect it to work anymore.

2 Likes

Roger. Giving up on WebXRViewer then, thank you for that clarification.

And looking at React Native next.

3 Likes

This is the project that finally led me to a useable solution:

And I can confirm it even runs correctly on iPad. That’s what I needed. (I also needed to figure out how the hell to develop for Mac/iOS ! Now Im learning to use XCode.)

4 Likes