Bug 218156

Summary: REGRESSION(iOS 14): Webshare API only works once - Promise never resolved/rejected
Product: WebKit Reporter: Hanz Luo <lhz0516>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Major CC: lhz0516, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: Other   
URL: https://developer.apple.com/forums/thread/662629

Description Hanz Luo 2020-10-24 21:53:26 PDT
On iOS 14 devices (test with iOS 14.0 and 14.1 / Safari) it works fine only once. For the second time it throws a permission error:


Error: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.


Here are all the steps to reproduce:

     1. Go to https://mdn.github.io/dom-examples/web-share/

     2. Click the "Share MDN!" button

     3. Choose one of the suggested options or just click X to close the sharing popover

     4. Click on the "Share MDN!" button again

     5. See the error

We see the error because the previous sharing promise never gets resolved or rejected.
iOS 13 doesn't have the issue. Only iOS 14 has it.
Comment 1 Radar WebKit Bug Importer 2020-10-25 12:02:36 PDT
<rdar://problem/70662025>
Comment 2 Tim Horton 2020-10-25 13:26:58 PDT

*** This bug has been marked as a duplicate of bug 216913 ***