# Troubleshooting iOS, Mac OS X, Safari errors

These errors come from Apple's APNS service when Pushwoosh sends push notifications to iOS, macOS, or Safari devices.

| Error                      | Description                                                                                                                                                                                | What to do                                                                                                                                                                                                                                                                                                                           |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **BadCertificate**         | The APNS certificate for this application is invalid.                                                                                                                                      | Create a valid certificate using [this guide](/developer/first-steps/connect-messaging-services/ios-configuration/ios-platform-configuration/#generating-a-certificate-request-file) and check that the platform is configured correctly.                                                |
| **BadDeviceToken**         | The specified device token is invalid. Therefore, the device will be unsubscribed from notifications.                                                                                      | Verify that the request contains a valid token and that the token matches the environment.                                                                                                                                                                                                                                           |
| **DeviceTokenNotForTopic** | The specified token is unsuitable for sending notifications to the specified topic (package name specified when creating the iOS app). The device will be unsubscribed from notifications. | Use the token that is suitable for sending notifications to this topic.                                                                                                                                                                                                                                                              |
| **ExpiredCertificate**     | The APNS certificate for this application has expired.                                                                                                                                     | Create a valid certificate using [this guide](/developer/first-steps/connect-messaging-services/ios-configuration/ios-platform-configuration#generating-a-certificate-request-file) and check that the platform is configured correctly.                                                |
| **FrequencyCapping**       | The device was filtered by [Frequency Capping](/product/messaging-channels/global-frequency-capping).                                                               | If such behavior was not intended, check the [Frequency Capping](/product/messaging-channels/global-frequency-capping) settings.                                                                                                                                                                              |
| **InvalidCertificate**     | The APNS certificate for this application is invalid.                                                                                                                                      | Create a valid certificate using [this guide](/developer/first-steps/connect-messaging-services/ios-configuration/ios-platform-configuration/#generating-a-certificate-request-file) and check that the platform is configured correctly.                                                |
| **InvalidProviderToken**   | The specified token is invalid or signed with an invalid certificate. Notifications will no longer be sent to the platform where this error occurred.                                      | Check that the platform is configured correctly.                                                                                                                                                                                                                                                                                     |
| **InvalidToken**           | The specified token is invalid. Notifications will no longer be sent to the platform where this error occurred.                                                                            | <p>Check that the platform is configured correctly. </p><p></p><p>This error usually points to the mismatch between gateways (for example, if you're sending pushes to your development/sandbox build through the production gateway or vice versa). Also, some of your users may have another build installed on their devices.</p> |
| **MissingDeviceToken**     | The device token isn’t specified in the request.                                                                                                                                           | Verify that the header contains the device token.                                                                                                                                                                                                                                                                                    |
| **PayloadIsTooLarge**      | The message size exceeds 4096 bytes.                                                                                                                                                       | Reduce the message size.                                                                                                                                                                                                                                                                                                             |
| **RevokedCertificate**     | The APNS certificate for this application has been revoked via the Apple Developer admin panel. Push notifications will be disabled for this platform.                                     | Renew your certificate using [this guide](/developer/first-steps/connect-messaging-services/ios-configuration/ios-platform-configuration/#generating-a-certificate-request-file).                                                                                                        |
| **SandboxSendingError**    | Failed to send message to the sandbox APNS environment.                                                                                                                                    | Try sending the message again later.                                                                                                                                                                                                                                                                                                 |
| **TimeoutExceeded**        | Multiple attempts to send a message to the device within 1 hour were unsuccessful, as the APNS server did not respond.                                                                     | Try sending the message again later.                                                                                                                                                                                                                                                                                                 |
| **Unregistered**           | The token is no longer valid. The device will be unsubscribed from notifications.                                                                                                          | Use a new token.                                                                                                                                                                                                                                                                                                                     |