WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 231995
244408
navigator.canShare(data) returns true but navigator.share(data) results in Unhandled Promise Rejection when data contains both image and text field.
https://bugs.webkit.org/show_bug.cgi?id=244408
Summary
navigator.canShare(data) returns true but navigator.share(data) results in Un...
spreadpando
Reported
2022-08-26 13:52:10 PDT
When passed a data object with both text, and image parameters, navigator.share() produces: "Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission." This occurs even if navigator.canShare returns true when passed the same data object. This prevents users from sharing image, text and urls at once and negatively impacts iOS users' abilities to share content on the web. Not a duplicate, but could be related to:
https://bugs.webkit.org/show_bug.cgi?id=231995
For now the Web Share 2 API remains broken on iOS. Produced on iPhone X iOS 15.5 (19F77)
Attachments
Add attachment
proposed patch, testcase, etc.
Marcos Caceres
Comment 1
2022-08-28 18:07:21 PDT
I'll try to reproduce, but there are a few things that can cause canShare() to return true, but still result in a NotAllowedError: 1. .share() called multiple times before the first call's promise settles. 2. .share() is not initiated by user activation (or, more unlikely, there is no Window object). 3. Permissions policy violation, but this produces a different error string so we can rule this out.
Marcos Caceres
Comment 2
2022-08-28 18:34:35 PDT
Ok, confirmed. This is indeed being caused by 231995 and it's a result of 1 (because even though shares completes, the promise is not being resolved). Thus, subsequent calls to .share() cause the API to freeze. *** This bug has been marked as a duplicate of
bug 231995
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug