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
- Push certificate is uploaded to the Voximplant Control Panel.
- VoxEngine scenario is modified (for calls only).
- VoxEngine scenario should contain this line:
require(Modules.PushService);
- Push token is registered by a mobile or web application.
Check the FCM/APNS status of a push sent (calls only)
- Open the Voximplant Control Panel.
- Find the session logs of the call for which a push notification is not received.
- 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.
“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.- Some other result means that there is an issue in the push notifications setup.
Possible errors and how to fix them.
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” | An existing registration token may cease to be valid in several cases:
| Remove this registration token from the app server and stop using it to send messages. |
“BadDeviceToken” | 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. | If the application is built for release (TestFlight/AppStore), use Production mode for the push certificate. |
“DeviceTokenNotForTopic” | The device token does not match the specified topic.
| Ensure that the certificate is correct. |
“Request has failed with timeout” | iOS | iOS |
“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. |
|
Status is “success” but a push notification is not received
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 manufacturers 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 blocks new VoIP push notifications.
Check and ensure that the application meets these requirements.