Skip to content

[BUG] - SecurityError: Failed to execute 'isSessionSupported' on 'XRSystem' when in iframe #722

@leon

Description

@leon

UE Version:
UE5.6

Frontend Version:
E.g. UE5.5-1.2.4

Problem component
Frontend

Description
When loading pixel streaming in an iframe and you don't have the allow="xr-spatial-tracking" the dom will throw an Exception when trying to read the property .xr

SecurityError: Failed to execute 'isSessionSupported' on 'XRSystem': Access to the feature "xr" is disallowed by permissions policy.

Steps to Reproduce:

  1. create an iframe an embed a pixel streaming app in it.

Expected behavior
We should wrap the navigator.xr.isSessionSupported() call in a try catch block so that we don't get an error if we are in an iframe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions