Push notifications were not successfully delivered and have bad status

Hello everyone,

I have been working on a macOS app that utilizes push notifications for the past year. Up until recently, everything was functioning correctly. However, now I'm experiencing issues where push notifications are either not being delivered at all or are experiencing significant delays, sometimes up to 10 minutes. Setting the priority header to 10 hasn't made any difference. I am currently using development push notifications, but the issue persists when switching to the production environment.

I'm curious if anyone else has encountered similar problems. When checking the push console, it frequently reports that the device is offline, even though it's actually online ("discarded as device was offline"). Occasionally, notifications are delivered promptly, but this is becoming increasingly infrequent.

This issue has been consistently reported by our testers, particularly after they updated to macOS Sonoma. Any insights or assistance you can provide would be greatly appreciated.

bump, I've run into something similar with my app Transloader.

Bump

We are still experiencing issues with push notifications:

The status indicates an incorrect state, even though the device is online. Changing the network interface sometimes resolves the problem, causing the push notifications to be delivered immediately after the network change.

The apns-priority is set to 10, apns-push-type is alert, and all configurations appear to be correct, as pushes are promptly delivered to other devices. However, this particular device is encountering delays in receiving notifications.

Kindly investigate the issue. Thank you.

My situation in Transloader is like this:

I save CKRecords in the private database (not zoned), with CKQuerySubscriptions for silent notifications. They work perfectly fine on all iOS devices, but the Mac either doesn't receive them, or very late (> 10 mins after the fact). Again, it's the same sync code running on Mac and iOS, but the Mac just doesn't get the notifications most of the time. I had to resort to polling the cloud as a temporary measure - that can't be what Apple intends here, since one of the reasons push notifications exist is to avoid polling.

I did open a DTS but have not heard back yet. Will update if/when I do.

– Matt

The DTS technician told me this has always been the case. Which it hasn't. And filing a bug report just ends up in a black box where no one ever knows if they even received it. Back to the stone age, where polling is king, and silent push notifications for content updates haven't been invented yet to prevent unnecessary loading and energy consumption.

macOS 14.2 apparently has brought no fix for this.

I'm also having these issues, and background notifications (sent from my server and CloudKit subscriptions) are vital to my app. I have a macOS version of my iOS app ready to go, but this bug is blocking its release.

Judging from these discussions I found, these issues have persisted for more than a year by now. Is there any hope of a resolution from Apple?

https://stackoverflow.com/questions/74868553/apple-push-notifications-arriving-on-macos-but-not-in-the-application-itself

https://github.com/raivo-otp/macos-receiver/issues/15

We're having the same issue with our Mac App. Everything was working fine with push notifications coming as expected but all of a sudden users are reporting delays or not receiving at all.

Timeframe: Ongoing, Exact start time is unknown, first report was 2023-11-30T03:45:00+13:00

Observed behavior: On Mac devices, after sending a push notification, nothing is received in the app. After waiting for several minutes, we turn off the wifi on the mac device and turn it back on, after connecting to the wifi again the push message is received. Very rarely push notifications do come through promptly as expected but this normally only happens once or twice, then the following notifications are delayed. The delays observed are between 5 minutes and 25 minutes.

If we try and use the Push Notifications Console we get this:

If use try once, it logs "discarded as device was offline"

If use an expiry instead I get "stored for device power considerations"

Once I toggle my wifi connection the push notification comes immediately and I get the log "successfully delivered to the target device"

Business impact involves users not receiving any type of push messages. We use push messages which may include imminent threat to life alerts that show fullscreen on the users Mac device. Without push notifications mac users will not receive these potentially imminent threat to life alerts.

Running into the issue with the latest macOS release (14.4.x)

I have filed feedback FB13701617 regarding this.

Yeah same here !

Can confirm that this is still an issue with iOS 18. I experience the same issue as @XVC_but on mobile apps. Toggling network type from Wifi to cellular and in reverse almost always resolves the issue so that notifications arrive nearly instantly.

I have found that the quickest way to reproduce the issue is to toggle the airplane mode on and after 5 minutes toggle it off.

I second _nox, am testing against IOS 18, but this seems to have broken for my app a few weeks ago. I had hoped the big upgrade would have fixed this. I have verified that the token I have in my db matches what my app gets in didRegisterForRemoteNotificationsWithDeviceToken at startup, and whether I build my app in production or development I get the same token, which seems peculiar. If I build and push from apple web site console to production I see

"The specified device token is invalid. Verify that the request contains a valid token and that the token matches the environment."

with APS Env set to production, but if I build to development and send to development, from their web console thingy, I get

"discarded as device was offline" from my server sending the production works always giving me

sendToToken com.eatthepath.pushy.apns.util.concurrent.PushNotificationFuture@5770671b[Not completed, 1 dependents]

but sending with the development cert I get io.netty.channel.ConnectTimeoutException: connection timed out: api.push.apple.com/[2620:149:149:1029:0:0:0:1f]:443

This has been working for a while, albeit I've just been using production for testing since the sandbox hasn't worked in a long time. However, this system seems to be down or my particular app is being blocked. I've always been an android developer, and am trying to work cross platform these days. It seems to me that a working push notifications system is kind of a minimum requirement. This is costing me time and money as I'm not sitting around collecting a big Apple Pay check nor getting stock options.

我今天也遇到了apple收不到APNs通知的情况,显示我的设备离线。

Same problem. Development mode — notifications not working, device offline 😤

Push notifications were not successfully delivered and have bad status
 
 
Q