Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions policy violation: xr-spatial-tracking #6692

Open
LeXXik opened this issue Jun 12, 2024 · 9 comments
Open

Permissions policy violation: xr-spatial-tracking #6692

LeXXik opened this issue Jun 12, 2024 · 9 comments
Labels
area: xr XR related issue bug

Comments

@LeXXik
Copy link
Contributor

LeXXik commented Jun 12, 2024

If the document doesn't allow to use WebXR Device API, then a DOM exception is thrown:

image

Details:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/xr-spatial-tracking

@mvaligursky mvaligursky added bug area: xr XR related issue labels Jun 13, 2024
@Maksims
Copy link
Contributor

Maksims commented Jun 13, 2024

Where do you get this error?

@LeXXik
Copy link
Contributor Author

LeXXik commented Jun 13, 2024

Where do you get this error?

Windows Chrome? Maybe an iframe? Not sure what you are asking. Its a self-hosted environment. Noticed the error mentioned in our team and decided to add here. I can get the details if you clarify.

@LeXXik
Copy link
Contributor Author

LeXXik commented Jun 13, 2024

Repro:
app.zip

npm install
node app.js
localhost:3000/printer

Additional details:
https://www.w3.org/TR/permissions-policy-1/#document-policies

@Maksims
Copy link
Contributor

Maksims commented Jun 14, 2024

WebXR is allowed only in HTTPS.

@mvaligursky
Copy link
Contributor

mvaligursky commented Jun 14, 2024

That's the same requirement as WebGPU .. needs to be https.
I'll close this but please reopen if this is still a problem.

@LeXXik
Copy link
Contributor Author

LeXXik commented Jun 14, 2024

Please, reopen. The issue is not about HTTPS protocol. The issue is that the engine is trying to use WebXR Device API on a webpage that does not allow it, resulting in a permissions violation exception.

Changed the repro app, added local certs so https can be used.
app.zip

https://localhost:3000/printer

@mvaligursky mvaligursky reopened this Jun 14, 2024
@willeastcott
Copy link
Contributor

Is this really something for the engine to handle? If you're going to host a WebXR app, then you're going to have to correctly configure your server.

@LeXXik
Copy link
Contributor Author

LeXXik commented Jun 14, 2024

The exception is thrown for a default blank application. The engine is using WebXR Device API regardless if the app is going to use WebXR or not. We don't use WebXR in any of our games, but still noticed the exception.

@willeastcott
Copy link
Contributor

Interesting. What's your take on this, @Maksims?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: xr XR related issue bug
Projects
None yet
Development

No branches or pull requests

4 participants