Rate this page:

Push troubleshooting

This article shows you how to check that the push notifications setup is correct and diagnose issues (if there are any) yourself.

Setup checklist

Copy URL
  1. Push certificate is uploaded to the Voximplant Control Panel.
  2. VoxEngine scenario is modified (for calls only).
  3. VoxEngine scenario should contain this line: require(Modules.PushService);
  4. Push token is registered by a mobile or web application.

Check the FCM/APNS status of a push sent (calls only)

Copy URL
  1. Open the Voximplant Control Panel.
  2. Find the session logs of the call for which a push notification is not received.
  3. Find the push sent result logs (Call.PushSent event)
Sent event to JS onPhoneEvent with params [{
name = Call.PushSent ;  
proxyId = <proxy_id> ;  
result = {
"user_id":"<your_user>@<your_app>.<your_account>.voximplant.com",
"push_results":[
   {
      "sdk_type":"ios",
      "token":"<ios_voip_push_token>",
      "msg":null,
      "result":true
   },
   {
      "sdk_type":"android",
      "token":"<android_fcm_push_token>",
      "msg":null,
      "result":true
   },
   {
      "sdk_type":"web",
      "token":"<web_fcm_push_token>",
      "msg":null,
      "result":true
   }
]} ; 
} ; ]

where <your_user>@<your_app>.<your_account>.voximplant.com is the Voximplant user that does not receive a push notification and <android_fcm_push_token> and <ios_voip_push_token> are the tokens that were registered from the application.

  1. “result”: true means that the push notification was sent to FCM and/or APNS and was accepted by these services. The push notification should have already been sent to the device.
  2. Some other result means that there is an issue in the push notifications setup.

Possible errors and how to fix them.

Copy URL

Error

Reason

How to fix

“no tokens found”

Push token was not registered for this user/device.

Check the application code and ensure that the push token is registered correctly.

Push token was registered but was rejected by FCM/APNS previously.

Check the session logs of previous call(s); maybe an error occurred when attempting to send a push notification using the required token.

“Forbidden” FCM error

May occur only with a push certificate uploaded as a Service Account JSON file, and the service account does not have the "Service Account Token Creator" role.

Check the Firebase Admin roles and the "Service Account Token Creator" role if it is missing.

“Internal error”

Any

Contact us at support@voximplant.com

“DEVICE_UNREGISTERED”
FCM error (android/web)

An existing registration token may cease to be valid in several cases:

  • The client app unregisters with FCM;
  • The client app is automatically unregistered; it happens when the user uninstalls the application;
  • The registration token expires (for example, Google may refresh registration tokens);
  • The client app is updated, but the new version is not configured to receive messages.

Remove this registration token from the app server and stop using it to send messages.

“BadDeviceToken”
APNS error (iOS only)

From the Apple docs: the specified device token was bad. Verify that the request contains a valid token and that the token matches the environment.
Generally, the error is caused by incorrect environment setup for push certificate (Development/Production) and the application build type (Debug/Release).

If the application is built for release (TestFlight/AppStore), use Production mode for the push certificate.
If the application is for debugging (Xcode build), use Development mode for the push certificate.

“DeviceTokenNotForTopic”
APNS error (iOS only)

The device token does not match the specified topic.
Generally, the error is caused by an incorrect certificate:

  • Certificate is of incorrect type;
  • Certificate is generated for a different application bundle id.

Ensure that the certificate is correct.

“Request has failed with timeout”

iOS
Push certificate may have been expired.

iOS
Make sure the certificate is not expired.
If the certificate is not expired, contact us at support@voximplant.com

“Push certificate not match to a bundle”

Bundle id/package name indicated for a certificate (in the Voximplant Control Panel) does not match the bundle id/package name indicated when initializing SDK.
Generally, this can happen if a user uploaded 2 (or more) certificates of the same type (provider), but does not initialize SDK correctly (wrong or uninitialized bundle id property/field)

  1. Check the push certificates configurations.
  2. Identify the certificate that should be used for the failed call.
  3. Check that the application initialized the SDK with the same bundle id as the one you have in the Voximplant Control Panel.
  4. If the configuration is not aligned, align it on the application side or re-upload push certificates to the Voximplant Control Panel according to the SDK initialization.

Status is “success” but a push notification is not received

Copy URL

Android

Push notifications for calls are sent with the highest priority, however, Android OS may apply some restrictions for push notifications delivery to an application.

First, check the Google recommendations for Doze and Standby modes.

Some manufactures may have additional settings and push notifications limitations. It may be useful to remove these limitations from a device and check if they cause the issue.

Push notifications for IP messaging are sent with normal priority and may not be delivered instantly.

iOS

Since iOS 13 it is required to report a new incoming call from a VoIP push notification to the CallKit framework, otherwise, iOS terminates the application and block new VoIP push notifications.

Check and ensure that the application meets these requirements.