Issue in receiving notifications

SendBirdCall.registerPushToken is not giving any error but still, the push token is not getting registered into the dashboard.

We are facing this issue as well. We have both chat and calls implemented. Same token is being sent to sendbird servers but chat is visible in dashboard while calls “disappear”.

From the logs we can see that registerPushToken() was called successfully.

@dushantsw, we need to have different apps for calls and desk as Sendbird does not support calls and desk in the same app currently.

So, create each Sendbird app separately and initialise both app ids accordingly.

Thanks

@Ajay_Nagwani
Sendbird can support Calls and Desk in the application. Please can I know more about why you think they do not?

@dushantsw Please can I know the SDK version you are using for Calls? Also please can you explain further what you mean this:

Same token is being sent to sendbird servers but chat is visible in dashboard while calls “disappear”.

@Ajay_Nagwani Do you still have this issue?

SendBirdCall.registerPushToken is not giving any error but still, the push token is not getting registered into the dashboard.

If so please can I get your Calls SDK and Chat SDK versions?

We are using version: 1.1.5

Because tokens are generated by firebase. They are unique and app-specific. Therefore, only one token is generated for the app.

So, even though we separately call registerPushTokenForCurrentUser(token) (Chat) and registerPushToken(token) (Calls). The token in both calls is same.

We call both functions on different background threads and there seems to be a race-condition between both functions. Whoever reaches the sendbird server first, is stored and the other one is discarded.

While this issue occurs on android. It is replicable with Platform-API as well

To replicate, pick any user and remove all the tokens for that user.

Perform api request to insert new token for calls:

curl --location --request POST 'https://api-{your_app_id}.calls.sendbird.com/v1/users/{user_id}/push/fcm_voip' \
--header 'Api-Token: {your-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "f7wclMGdU2M:APA91bE87_7FwP94IIKzHvK7FL3foijzRdag1Gx5C8PuizPmb69KucSWzJ5Cv7ogE9G14HRPv60fZJvaUZ4HO0rCWtvgLb2zPQS7x9MET76ziOTvV03IgxI2dYDeL4aVF9voWLHFw5VJ"
}'

Now perform another api request to register new token for chat:

curl --location --request POST 'https://api-{your_app_id}.sendbird.com/v3/users/{user_id}/push/gcm' \
--header 'Api-Token: {your_api_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "gcm_reg_token": "f7wclMGdU2M:APA91bE87_7FwP94IIKzHvK7FL3foijzRdag1Gx5C8PuizPmb69KucSWzJ5Cv7ogE9G14HRPv60fZJvaUZ4HO0rCWtvgLb2zPQS7x9MET76ziOTvV03IgxI2dYDeL4aVF9voWLHFw5VJ"
}'

Both calls should return 200 OK. If you go to dashboard now, you will see that calls has a new token but chat doesn’t.

My hypothesis is that on the second call, the internal API is checking for duplicate token by token string and because there already exists a token with the given token string, it fails silently thinking it’s a duplicate token and returns 200 OK.

@dushantsw Thanks so much for the detailed reproducible steps. We have filed this as an internal bug. I will track the bug and let you know when the fix is released.

Hello I am also facing similar issue in the Android, can someone please let me know what’s going wrong here