[Webkit-unassigned] [Bug 252544] Non-opened Home Screen web app can not receive post message from Notificationclick callback

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 7 14:28:43 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=252544

--- Comment #5 from Brady Eidson <beidson at apple.com> ---
(In reply to Brady Eidson from comment #4)
> Inside `openPushNotification`, the Notification does have the data intact.
> So that's great.
> 
> But through direct debugging I can also see that
> ServiceWorkerClient.postMessage is never actually called.
> 
> Seems like some part of a promise chain or something is getting dropped in
> all of your async/await code, causing none of the postMessages to actually
> fire.
> 
> I'll try copying your notificationclick handler verbatim over to mine and go
> from there.

postMessage is never getting called because the call to focus() results in a rejected promise, mostly aborting the rest of your SW code.

I'm digging deeper in to why it rejects now, but you can also change your code to handle the rejection and then postMessage successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230307/73530379/attachment.htm>


More information about the webkit-unassigned mailing list