navigator.xr.requestSession('immersive-ar').then((session) =>
{
let refSpace = await session.requestReferenceSpace('unbounded');
});
This gives me the following error in the Magic Leap 2 browser:
VM8 ARCubes.js:82 Uncaught (in promise) DOMException: Failed to execute 'requestReferenceSpace' on 'XRSession': This device does not support the requested reference space type.
Only viewer and local reference spaces are defualt and can be used without any request. For all other reference spaces, the application needs to specify explicitly when recoding a session. So instead of
navigator.xr.requestSession('immersive-ar').then((session) =>
{
let refSpace = await session.requestReferenceSpace('unbounded');
});