BelledonneCommunications / flexisip

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)
http://flexisip.org
GNU Affero General Public License v3.0
150 stars 74 forks source link

Cannot send push: No push notification client available for push notification request (fcm) #160

Closed eskov-ea closed 1 year ago

eskov-ea commented 1 year ago

Hello guys, I have deployed Flexisip. I use push notification for ios / android. Everything was fine till tomorrow. FCM service stopped sending push notifications.

My PushNotification module configuration is:

enabled=true firebase=true firebase-projects-api-keys=<project_number /sender_id>:

When I start flexisip it says:

flexisip-debug-Adding firebase push notification client [671710503893]

But when a call initiates and it tries to send a push:

flexisip-error-Cannot send push: No push notification client available for push notification reques

If I use test pusher command it is fine and works flexisip_pusher --pn-provider fcm --pn-param 67XXXXXXXXXX --pn-prid ddsu06qqKzw:APA91bGFu-7mAjIU5J566Nr4AhBvmAsLXuXnPRAttrLQMWv5dW6RFGIs7sbwy16fZPcUYTRFqeajg-aUxbYsQvlQ089GFTGFszbaEY2a3ShC96CW4I4NmSz17q_UrOsQhNOJCVCc51Vg --key XXXXX:XXXXX --debug

What can cause this behavier? Any help! Thanks a lot!

eskov-ea commented 1 year ago

Thanks to everyone. I found the problem. I managed to set all required parameters manually on client side as accountParams.pushNotificationConfig and it worked.

MingHieu commented 1 year ago

accountParams.pushNotificationAllowed = true; accountParams.pushNotificationConfig.provider = "fcm"; accountParams.pushNotificationConfig.prid = <device fcm token>; accountParams.pushNotificationConfig.param = <firebase project id>; I set all required parameters like this but still met this error. Can you show more detail or any snippet code ?

eskov-ea commented 1 year ago

accountParams.pushNotificationAllowed = true; accountParams.pushNotificationConfig.provider = "fcm"; accountParams.pushNotificationConfig.prid = <device fcm token>; accountParams.pushNotificationConfig.param = <firebase project id>; I set all required parameters like this but still met this error. Can you show more detail or any snippet code ?

I also use remote token for the current device aka [ accountParams.pushNotificationConfig.remoteToken = token ]. I am not sure if it is the thing you can try it. Then you can check if all the needed information comes to redis because flexisip uses redis to store user's contact.

eskov-ea commented 1 year ago

@MingHieu so in the end in redis you have to have all this information for the contact

MingHieu commented 1 year ago

@eskov-ea Thanks for your help. I resolved it by change accountParams.pushNotificationConfig.param = firebase project id; to accountParams.pushNotificationConfig.param = firebase sender id;

eskov-ea commented 1 year ago

@MingHieu in a case you would need it https://wiki.linphone.org/xwiki/wiki/public/view/Flexisip/D.%20Specifications/Push%20notifications/