APNs gateway continues to accept notifications after rejecting a notification

Originator:jon
Number:rdar://19888085 Date Originated:2015-02-19
Status:Resolved Resolved:2015-03-02
Product:Other Product Version:
Classification:Other bug Reproducible:Always
 
Summary:
The "Binary Interface and Notification Format" section of the "Provider Communication with Apple Push Notification Service" chapter of the the "Local and Remote Notification Programming Guide" (https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html) states:

"If you send a notification that is malformed or otherwise unintelligible, APNs returns an error-response packet and closes the connection. Any notifications that you sent after the malformed notification using the same connection are discarded, and must be resent."

However, we have observed that notifications sent in the time between a rejected notification and connection closure (i.e. in the period where, due to network latency, the gateway has sent the rejection notice, but the provider has not yet received the rejection notice) may still be delivered to their destinations. This appears to go against notification state guarantee made in the docs and makes it impossible to know whether notifications should be resent.

Steps to Reproduce:
1. Send a notification to the APNs gateway that will be rejected (e.g. a notification with a zero-length token).
2. Immediately (i.e. before the rejection response arrives from the gateway and before the connection is closed) send a valid notification to the APNs gateway that, on its own, should be delivered to its destination.

Expected Results:
The APNs gateway will reject the first notification and close the connection without delivering the second notification to its destination.

Actual Results:
The APNs gateway rejects the first notification and closes the connection, but may also deliver the second notification to its destination.

Version:


Notes:
Please see https://github.com/relayrides/pushy/issues/149 and https://github.com/relayrides/pushy/pull/152 for additional discussion of the issue. This problem was discovered in conjunction with rdar://19875314 and may or may not be related.

Configuration:
This problem has been observed in the sandbox APNs environment. It is not immediately clear if it affects the production environment.

Attachments:

Comments

Reply from Apple

Apple Developer Relations 02-Mar-2015 02:59 PM

We believe that this issue has been resolved through changes on our side.

Please let us know whether the issue is resolved for you by updating your bug report.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!