APNs development servers respond with `InternalServerError` after period of inactivity

Originator:jon
Number:rdar://30168506 Date Originated:2017-01-24
Status:Open Resolved:
Product:iOS + SDK Product Version:
Classification: Reproducible:Always
 
Area:
Notifications

Summary:
When using token-based authentication in the APNs development environment, the APNs server will respond with HTTP/500 (`InternalServerError`) when sending notifications after a connection has been idle for more than an hour.

Steps to Reproduce:
1. Open a connection to a development-environment APNs server without TLS client authentication (i.e. in "token authentication" mode).
2. Send a notification with an authentication token.
3. Leave the connection idle (except for HTTP/2 `PING` frames) for more than an hour.
4. Send a second notification with the same authentication token as the first notification.

Expected Results:
The APNs server takes one of three actions:

1. Some time in the idle period, the server closes the connection with an HTTP/2 `GOAWAY` frame.
2. After the second notification is sent, the APNs server accepts the notification.
3. After the second notification is sent, the APNs server rejects the notification for a specific reason (e.g. `ExpiredProviderToken`).

Actual Results:
After the second notification is sent, the APNs server responds with `InternalServerError`.

Version:
n/a

Notes:
This issue appears to affect multiple APNs providers on multiple platforms, and so it seems unlikely that the issue is a bug in a specific provider library. Some examples:

- https://github.com/relayrides/pushy/issues/408
- https://github.com/node-apn/node-apn/issues/449

Configuration:
Token-based authentication in the development APNs environment

Attachments:

Comments


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!