Skip to content

Navigation Menu

Sign in
Sign up

"XRSpace and XRFrame sessions do not match" exception thrown when a session ends and then restarts #473

Open

Description

When an app ends the XR session and then starts it again, the result is a DOMException thrown from createGetXRSpaceMatrix:

space.ts:16 Uncaught DOMException: Failed to execute 'getPose' on 'XRFrame': XRSpace and XRFrame sessions do not match.
 at https://localhost:5173/xr/examples/uikit/@fs/C:/Users/gmorgan/github/xr/packages/xr/src/space.ts:11:25
 at Object.current (https://localhost:5173/xr/examples/uikit/@fs/C:/Users/gmorgan/github/xr/packages/react/xr/src/space.tsx:229:76)
 at update (https://localhost:5173/xr/examples/uikit/node_modules/.vite/deps/chunk-PNRJ6BYA.js?v=bc283d88:13676:22)
 at advance (https://localhost:5173/xr/examples/uikit/node_modules/.vite/deps/chunk-PNRJ6BYA.js?v=bc283d88:13729:8)
 at handleXRFrame (https://localhost:5173/xr/examples/uikit/node_modules/.vite/deps/chunk-PNRJ6BYA.js?v=bc283d88:13424:11)
 at onAnimationFrame (https://localhost:5173/xr/examples/uikit/node_modules/.vite/deps/chunk-PALBDS2N.js?v=bc283d88:29577:37)
 at XRSession.onAnimationFrame (https://localhost:5173/xr/examples/uikit/node_modules/.vite/deps/chunk-PALBDS2N.js?v=bc283d88:21747:5)

See the repro case here (I've added a disconnect button to the uikit example that calls session.end()):
https://github.com/griffin2000/xr/blob/gmorgan/bugs/ReproRefSpaceIssue/examples/uikit/app.tsx#L143

Repro steps:

I can only repro the exception on Pico Ultra (browser 4.0.34), though I believe the error condition exists on all platforms, its just not being caught and thrown by the DOM. I am unable to repro the exception on Quest 3 or Chrome emulator.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /