WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
273063
iOS service worker - webPush subscription becomes invalid for few users
https://bugs.webkit.org/show_bug.cgi?id=273063
Summary
iOS service worker - webPush subscription becomes invalid for few users
Thawfeeq
Reported
2024-04-22 04:30:29 PDT
It seems that PWA push notifications on iOS are sometimes being revoked outside of user interaction. In the event handler, when we check the service worker registration for an active push subscription via ServiceWorkerRegistration.pushmanager.getSubscription(), and sometimes it reports null, indicating that the push subscription which was just used to receive a message is now no longer active. We had seen 1 such case recently. We would like to know how & when this happens. This is a fail for PWA push notifications on iOS, especially given that the pushsubscriptionchange event is not supported. Reference:
https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event
. Could you please take a look?
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2024-04-22 07:08:12 PDT
@Thawfeeq - do you have minimal test case or you have any theory on why you think this is happening e.g., Intelligent Tracking Protection? Also which version of iOS, you are referring (iOS 17.4.1)? Appreciate if you can share more details and context. I have only found this one more thread but also without more context -
https://developer.apple.com/forums/thread/727372
Thawfeeq
Comment 2
2024-04-22 22:09:55 PDT
iOS VERSION - 17.4.1 Browser- Safari We haven't identified an exact reproducible scenario - as this has been reported by only a few users.
Thawfeeq
Comment 3
2024-04-23 01:24:47 PDT
We are currently trying to identify the patterns which can lead to this behaviour.. I see such issues reported in apple forums - but no solid solution yet. Also I see that PushSubscriptionChange event (
https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event
) , which is used for handling such scenarios , is not supported for mobile devices at all.
Radar WebKit Bug Importer
Comment 4
2024-04-29 04:31:14 PDT
<
rdar://problem/127225883
>
Ben Nham
Comment 5
2024-05-09 16:28:04 PDT
We don't fire PushSubscriptionChangeEvent, and the last time I checked (which was admittedly several years ago), no other browsers did either. The IDL is in the repo but is otherwise unused. I'm not sure we can do much without a sysdiagnose (which you can include via a Feedback Assistant report). We did fix a number of bugs with Web Push on iOS recently (which should be in 17.5 RC), but the bugs weren't in WebKit but rather in Web.app, e.g. bugs where Web.app would handle the push, but then tell WebKit that the website didn't have permissions anymore, which would then result in the subscription being deleted. Can you try reproing on 17.5 RC and/or filing a Feedback Assistant report with a sysdiagnose?
Berni
Comment 6
2024-07-30 02:11:44 PDT
After updating to 17.6 I had to resubscribe again, otherwise Notifications where not delivered. Unfortunately no further information yet.
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