Testing and Troubleshooting

In this guide you will find some common errors along with details of how to resolve them. However, if you continue to experience any problems, please contact support.

Mobile Marketing Testing

If you have integrated the Mobile credentials for your app project then you can check the progress of your integration by using the install browser.

Checking installs of your App

When you run your app on a simulator or install your app on a device, you can check that the SDK has been initialized correctly by selecting the app in your Optimove UI and clicking the Installs tab to see the ten most recent installs of your app. Click on any install to see more information.

Sending test pushes

Once you have run your app on a device or simulator and found it in the Installs tab you can send a test push directly to that device, click on an install, click the 'Push' tab and click Send Test Push.

If you do not receive the push notification, you can check the Error Log for any errors sending the push notification to the native push gateways by accessing Messaging, Configuration, then selecting the Error Log tab.

Push Notifications

Viewing the Error Log

The Error Log, found under OptiMobile in the Settings area, will show any errors encountered when sending push notifications to the native push gateways such as APNS or FCM. You can see the gateway where the error occurred, the status code, the error message itself, and when it happened. This can help debug any problems.

If you cannot see the Error Log, you may need to update to the latest APNS/FCM APIs.

Common Errors

Here are some common errors along with details of how to resolve them. However, if you continue to experience any problems, please don't hesitate to contact support who is standing by to help.

APNs (iOS)

For more information, refer to the Apple documentation for handling notification responses from APNs

Error messageMeaning
Post https://api.push.apple.com...Expired iOS certificate. Replace it following the instructions here. Note that p8 keys are refreshed automatically.
Unable to connect to 'ssl://gateway.push.apple.com...Expired iOS certificate. Replace it following the instructions here. Note that p8 keys are refreshed automatically.
BadDeviceTokenToken mismatch (possibly using other apps token for production app or vice versa).
DeviceTokenNotForTopicThe app push certificate and bundle ID are mismatched. Verify that the bundle ID saved in OptiMobile (Mobile Push Notifications Configuration) matches exactly the bundle ID in the application source code.
Check that your APNS certificate is a Sandbox & Production certificate and that the bundle id matches that of your XCode project.
TooManyRequestsToo many requests were made consecutively to the same device token.
BadExpirationDateThe apns-expiration value is invalid.
BadCertificateThe certificate is invalid.
BadCertificateEnvironmentThe client certificate is for the wrong environment.
ExpiredProviderTokenThe provider token is stale, and a new token should be generated.
PayloadTooLargeThe message payload is too large. Contact OptiMobile team.

FCM (Android)

Error messageMeaning
Permission 'cloudmessaging.messages.create' denied on resource '//cloudresourcemanager.googleapis.com/projects/\<ANDROID_PACKAGE_NAME' (or it may not exist).Firebase Cloud Messaging Admin does not have a cloudmessaging.messages.create permission. Follow the instructions here
Sender_ID_mismatchThe sender ID uploaded to the OptiMobile platform doesn't match the sender ID used to generate the push token.
Firebase Cloud Messaging API has not been used in the projectThis error can sometimes be received from FCM depending on how old your Firebase project is and where in the Google developer console you enabled FCM.
To learn more about why this error has occurred, please go to your Google developer console and enable the Firebase Cloud Messaging API.
Wait a few minutes for the action to propagate to our systems and retry.
"status": "INVALID_ARGUMENT", "message": "Android message is too big"The message payload is too large. Payload size limit is 4kb - general ios/android push limitation.
"status": "INVALID_ARGUMENT", "message": "Invalid registration"Token mismatch (possibly using other apps token for production app or vice versa).
"status": "INVALID_ARGUMENT", "message": "Invalid package name"The app push certificate and package name are mismatched. Verify that the package name saved in OptiMobile (Mobile Push Notifications Configuration) matches the package name in the application source code exactly.
"QUOTA_EXCEEDED"Too many requests to a gateway. Contact OptiMobile team.