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

Compatibility issue with Safari 15 #3500

Closed
mvaligursky opened this issue Sep 21, 2021 · 9 comments · Fixed by #3503
Closed

Compatibility issue with Safari 15 #3500

mvaligursky opened this issue Sep 21, 2021 · 9 comments · Fixed by #3503
Assignees
Labels

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Sep 21, 2021

Playcanvas engine fails to initialize on just released Safari 15. This seems to affect both Webgl1 and Webgl2 context.

This is the line that fails / makes the page reload:

gl = canvas.getContext(names[i], options);

When this line is commented out, the engine starts up:

options.graphicsDeviceOptions.xrCompatible = true;

I don't see this problem mentioned online yet.

Looking at documentation:
https://www.w3.org/TR/webxr/

it's recommended makeXRCompatible() is suggested to be used instead of this flag for multiple reasons. It could trigger context loss which is possibly the reason we do not use it at the moment.

@mvaligursky mvaligursky self-assigned this Sep 21, 2021
@willeastcott
Copy link
Contributor

CC @Maksims

@mvaligursky
Copy link
Contributor Author

This seems to have the same behaviour in Safari Technology Preview Release 132 (Safari 15.4, WebKit 16613.1.1.5)

@mvaligursky
Copy link
Contributor Author

Some related discussions
immersive-web/webxr#1014
mrdoob/three.js#19275

@Maksims
Copy link
Collaborator

Maksims commented Sep 21, 2021

The use of makeXRCompatible can lead to context loss on multi-gpu systems.
One quickest option for action here: as Safari is misbehaving, then it should be a Safari-only fix not to affect all the other users.
As Safari does not support WebXR, we can safely not set the flag for Safari only. I understand this is not desired behaviour when we do platform-specific fixes, but this is a platform-specific bug with misbehaving from their side.

@mvaligursky
Copy link
Contributor Author

This is the initial PR which added xrCompatible to options .. projects published before this are ok (Jan 2020)
#1834

Maksims added a commit to Maksims/engine-1 that referenced this issue Sep 21, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The recent update of Safari 15 brought the crash for MacOS.
This, unfortunately, affects all published projects out there.

Fixes: playcanvas#3500
willeastcott pushed a commit that referenced this issue Sep 21, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The recent update of Safari 15 brought the crash for MacOS.
This, unfortunately, affects all published projects out there.

Fixes: #3500
@willeastcott
Copy link
Contributor

Reopening until we know what Apple intends to do...

@willeastcott willeastcott reopened this Sep 21, 2021
@mvaligursky
Copy link
Contributor Author

another issue related to Safari 15: #3506

@grorg
Copy link

grorg commented Sep 21, 2021

We fixed this here: https://bugs.webkit.org/show_bug.cgi?id=230525

I've tried with tip-of-tree WebKit on the various reported pages and it seems to work now.

@willeastcott
Copy link
Contributor

Closing since Safari has now been fixed (albeit not deployed yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants