-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After ~1 month, push to iOS Safari stops working #12
Comments
Hi @jgarplind, Since your service worker implementation calls Unfortunately, the Web Push spec has made it impossible to query for the delivery status of push notifications. However, it is possible to track delivery by implementing a Here is sample code for achieving the same:
However, if the notification never actually makes it to your end user's device, the delivery tracking code will never run. If you could please provide us with an affected Pushy device token, we will be glad to investigate further. Feel free to send the token via e-mail to [email protected]. As of today, none of your apps' registered devices have been reported as "Unregistered" by the Safari APNs service, and no other Error Logs are being reported in the dashboard for any of your apps, so it seems like the APNs service still accepts the notifications you're sending, however, possibly due to internal APNs logic decisions, the notification does not actually make it to your end user, even though the APNs service returned a 200 OK status code. As per FCM Fallback Delivery - it is not related to the issue at hand, as FCM Fallback Delivery only affects Android app push notification delivery behavior. |
Thanks for being so quick to respond.
I agree, this is probably a good course of action regardless.
I've now sent an email with the currently affected token. Will try to update this issue with any insights to help others who are facing similar problems. |
Hi @jgarplind, We've tried to send a test notification to the device, and APNs responded with HTTP status code 201, indicating success. That means APNs has accepted the notification and it has not deemed the device unregistered/expired. We cannot tell, however, whether the notification has made it to the device or not. The issue is occurring due to either a bug in Safari, iOS, APNs, or internal APNs design logic. It seems the notification does not actually make it to your end user(s), even though the APNs service returned a HTTP 201 OK status code. Since your service worker is already calling As per @rchan41's updated findings, it seems to be an issue with Safari: It is also actively being discussed in multiple threads on Apple's developer forum: Most likely, it will be fixed in future versions of iOS/Safari. We greatly apologize for the inconvenience. |
Then we have come to similar conclusions. Thank you very much for offering your expert perspective.
Hopefully, but I am a bit hesitant to believe in Safari's future in this space after the PWA withdrawal (which has since been reverted, but it still makes it clear that it is not a top priority of Apple's).
Please don't be. This is not your issue, and you are offering an extremely valuable perspective on this issue. The path forward for us is probably any mix of the following:
*This got me thinking... so far the solution has been to "re-install" the PWA by removing it from the home screen and adding it again. Do you happen to have any insights and/or educated guesses as to whether this is actually necessary, or if it could be enough to just register a new Pushy token, without reinstalling the app? We will have to test any way, but if you can tell with some degree of confidence that either scenario is more likely, it could help us prioritize. |
Hi @jgarplind, We do recommend native push on iOS (via a native iOS app) for its robustness. There are no such issues with APNs for native iOS apps. As per your inquiry - it seems that just re-registering the same PWA (calling
So it seems unnecessary to reinstall the PWA. Simply call |
Your assumption was correct - re-registering works just fine without reinstalling the app. I think we can close this issue from a Pushy-perspective now, so feel free to do so if you agree. |
Apologies in advance for convoluted issue that may not be within the scope of your library.
We are finding that push notifications stop being delivered to iOS devices after ~1 month, and the only solution seems to be for the users to re-add the app to their home screen.
Since the dashboard does not show delivery rates for iOS devices, we have no way to know if Pushy considers the messages to be delivered or not. When we fired a message from the test UI in the dashboard, we got a "message sent successfully" toast, but the message was never seen by the test user.
Rather than a fix for the root cause (which I assume to be on the iOS / Safari side of things, given similar reports for FCM-driven push (see e.g. firebase/firebase-js-sdk#8010)), I was hoping to know if there is any more information that you are able to retrieve / see on your side of things, e.g. delivery rates, error codes, or anything else that is not directly surfaced to us.
Note: We are using the fallback FCM solution, could that have any impact?
Sidenote: We are aware of the possibility that iOS stops sending notifications if we do not promptly display them to our users. However, (other than the FCM fallback) we believe that we do always show them promptly and should therefore not have this issue. Our service worker is based on yours with some added/altered domain-specific logic:
Thankful for any light you could possibly shed on this issue!
The text was updated successfully, but these errors were encountered: