Skip to content

Compatibility issue with Safari 15 #3500

Closed

Description

@mvaligursky

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.

Activity

  1. self-assigned this
    on Sep 21, 2021
  2. willeastcott commented on Sep 21, 2021

    @willeastcott
    Contributor
  3. mvaligursky commented on Sep 21, 2021

    @mvaligursky
    ContributorAuthor

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

  4. mvaligursky commented on Sep 21, 2021

    @mvaligursky
    ContributorAuthor
  5. Maksims commented on Sep 21, 2021

    @Maksims
    Collaborator

    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.

  6. mvaligursky commented on Sep 21, 2021

    @mvaligursky
    ContributorAuthor

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

  7. willeastcott commented on Sep 21, 2021

    @willeastcott
    Contributor

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

  8. mvaligursky commented on Sep 21, 2021

    @mvaligursky
    ContributorAuthor

    another issue related to Safari 15: #3506

  9. grorg commented on Sep 21, 2021

    @grorg

    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.

  10. willeastcott commented on Sep 22, 2021

    @willeastcott
    Contributor

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

  11. added theissue type on Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions