Skip to content

Permissions-Policy web-share=self #34

Closed

Activity

  1. added
    compat-bug-proposal
    on Nov 18, 2021
  2. added
    requires:tests
    on Dec 6, 2021
  3. added this to the Interop 2022 milestone on Sep 16, 2022
  4. gsnedders commented on Oct 16, 2022

    @gsnedders
    Member

    Did we ever end up with any tests covering this?

  5. karlcow commented on Oct 17, 2022

    @karlcow

    Did we ever end up with any tests covering this?

    Maybe @marcoscaceres knows.

  6. marcoscaceres commented on Oct 17, 2022

    @marcoscaceres

    Actually, we need a test for allow="web-share" to test cross origin in WPT. We only have the HTTP test above.

  7. marcoscaceres commented on Oct 17, 2022

    @marcoscaceres

    I put together some tests:
    web-platform-tests/wpt#36495

    @karlcow, any chance you could spare some cycles and check the state of YouTube again? At TPAC, folks from Google said that they (YouTube) had at least added a try/catch around the offending code, but apparently it's still failing in Firefox (Windows Desktop). Not sure if you have access to a Windows box, but maybe you can check?

  8. marcoscaceres commented on Oct 17, 2022

    @marcoscaceres

    I'm reopening while we discuss...

  9. karlcow commented on Oct 18, 2022

    @karlcow

    I put together some tests: web-platform-tests/wpt#36495

    @karlcow, any chance you could spare some cycles and check the state of YouTube again? At TPAC, folks from Google said that they (YouTube) had at least added a try/catch around the offending code, but apparently it's still failing in Firefox (Windows Desktop).

    I can check.

    Not sure if you have access to a Windows box, but maybe you can check?

    Nope.

  10. karlcow commented on Oct 18, 2022

    @karlcow

    YouTube doesn't offer the fancy sharing.

    Screenshot 2022-10-18 at 12 01 09
    Screenshot 2022-10-18 at 12 02 09

    While twitter does.

    Untitled

  11. marcoscaceres commented on Oct 18, 2022

    @marcoscaceres

    Sorry, I don't think I was very clear. The blockers here are:

    • Chrome: doesn't implement the policy. @foolip, can you enquire if/when the policy will be implemented?
    • Firefox: YouTube's code didn't handle Firefox well last we checked. @jgraham or @saschanaz, can you please check in Firefox for Windows? Is YouTube's share button working as expected?
    • Safari/WebKit: Currently implements "*" as the policy. I can switch it over to 'self' if we get agreement from Chrome to implement (Firefox was already doing the "right thing" per spec).

    Let me know and @karlcow and I can patch WebKit.

  12. saschanaz commented on Oct 18, 2022

    @saschanaz
    Member

    can you please check in Firefox for Windows? Is YouTube's share button working as expected?

    Unfortunately not if I disable site intervention. I do see YT did something to improve if navigator.share fails, but it still ultimately throws an error with the share button from here (the share button inside full YouTube page does not really use Web Share).

    Uncaught (in promise) TypeError: can't access property "xk", this.j is undefined
        fQ https://www.youtube.com/s/player/a25d4acf/player_ias.vflset/en_US/base.js:9248
    

    Note that Firefox shipped site intervention for YouTube (to not expose navigator.share at all for YouTube iframes), so it by default just opens the in-page share screen. Which is fine, for now.

    image

  13. gsnedders commented on Oct 18, 2022

    @gsnedders
    Member
    • Safari/WebKit: Currently implements "*" as the policy. I can switch it over to 'self' if we get agreement from Chrome to implement (Firefox was already doing the "right thing" per spec).

    And for those confused, https://bugs.webkit.org/show_bug.cgi?id=241363 changed the policy from self to * due to various bits of site breakage.

  14. marcoscaceres commented on Oct 19, 2022

    @marcoscaceres

    We are really pleading (ok, begging) with to Google folks to help us here again. I know a lot of effort has been made by folks at Google to get in touch with the YouTube team, but with no avail. We (webkit folks) have also tried emailing them too, but they haven't responded. cc'ing @inexorabletash, @miketaylr for suggestions.

  15. miketaylr commented on Oct 21, 2022

    @miketaylr
    Member

    😞 I will ping the internal bugs again, and send some emails.

  16. mgiuca commented on Oct 24, 2022

    @mgiuca
    Member

    Thanks @saschanaz for spelling out the error you get in Firefox. I have mentioned this comment to the YouTube team internally.

    I do see YT did something to improve if navigator.share fails, but it still ultimately throws an error with the share button

    I worked with YT a few months back to add code to catch the NotAllowedError and fall back to the HTML share sheet (this means that any embed without allow=web-share — i.e. basically all of them at the moment as it is not part of the boilerplate — would fall back gracefully to the HTML share sheet instead of doing nothing). However it seems that that fix, at least in Firefox, was buggy.

    @marcoscaceres have you tested it in Safari since August? Trying to figure out if this is only a problem in Firefox or if it affects other browsers too.

  17. marcoscaceres commented on Oct 24, 2022

    @marcoscaceres

    @mgiuca, yes, Karl tested Safari a few days ago: #34 (comment) (it goes to the fallback code, which is ok)

  18. saschanaz commented on Oct 24, 2022

    @saschanaz
    Member

    @mgiuca, yes, Karl tested Safari a few days ago: #34 (comment) (it goes to the fallback code, which is ok)

    Please retry with some embedded YT since the full YT does not use Web Share. (otherwise they can't provide embed code)

  19. mgiuca commented on Oct 26, 2022

    @mgiuca
    Member

    The full YT does also use Web Share (under "Apps"), but it's totally different code. The broken code in question is YT embeds.

  20. saschanaz commented on Oct 27, 2022

    @saschanaz
    Member

    The full YT does also use Web Share (under "Apps"), but it's totally different code. The broken code in question is YT embeds.

    Interesting, I don't immediately see any button labeled Apps, could you give me a screenshot?

  21. inexorabletash commented on Oct 27, 2022

    @inexorabletash

    FYI that we're still pushing on this, but if there are YT changes required they're unlikely to happen before the start of 2023.

  22. marcoscaceres commented on Oct 27, 2022

    @marcoscaceres

    @inexorabletash, that's ok.

    The larger question is around coordinating across UAs on switching the permissions policy itself. We basically all need to ship that across UAs around the same time (at least, in the case of Safari and Chrome, as Firefox already uses self).

  23. ewilligers commented on Nov 2, 2022

    @ewilligers

    We are preparing to ship the permission policy with self in Chrome 110. Stable in Feb '23.

  24. marcoscaceres commented on Nov 3, 2022

    @marcoscaceres

    Ok, that's great news @ewilligers! I'll patch WebKit now... thanks also for merging that WPT test.

  25. foolip commented on Feb 2, 2023

    @foolip
    Member

    This is an Interop 2022 proposal, closing.

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

    compat-bug-proposalrequires:tests

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions