QuickBlox / quickblox-flutter-sdk

quickblox-flutter-sdk
Other
8 stars 0 forks source link

Notification not receiving after subscribing to push. #36

Closed Anonymousthe1 closed 3 years ago

Anonymousthe1 commented 3 years ago

I am trying to send test notification.

In Queue I am getting this bellow error logs. {"notification":{"id":51431197,"badge":null,"device_token":null,"sound":"default","alert":null,"data":{"message":"Hello","collapse_key":"event37262399"},"expiry":86400,"delivered":false,"delivered_at":null,"failed":true,"failed_at":"2021-09-07T05:47:21+00:00","fail_after":"2021-09-07T06:47:16+00:00","retries":0,"error_code":null,"error_description":"Unable to deliver notification 51431197, received error (Failed to deliver to all recipients. Errors: MismatchSenderId.)","deliver_after":null,"alert_is_json":null,"sound_is_json":null,"app_id":73997,"collapse_key":null,"delay_while_idle":false,"registration_ids":["fX6lzhlgTKKmWx0bJ_K2qv:APA91bHHNjC65pwjpAG0g91fGCrRDGHaKxnToNRwpgPPTKDOt6j3OuNv8uPmln7Lqn4b2ETHepBHcDAmgrMLehiLB5C8TVXc0ZrvZU-6TzYkfaJ5unbw1svUsn3rB4f8sceM5d-qtqYs"],"uri":null,"priority":10,"url_args":null,"category":null,"content_available":false,"dry_run":false,"mutable_content":false,"notification":null,"thread_id":null,"type":"Rpush::Client::Redis::Fcm::Notification","event_id":37262399,"event_date":"2021-09-07T05:47:16+00:00"},"log":[{"device_token":null,"delivered_at":null,"failed_at":"2021-09-07T05:47:21+00:00","error_code":null,"error_description":"Unable to deliver notification 51431197, received error (Failed to deliver to all recipients. Errors: MismatchSenderId.)"}]}

I am getting all data correct in subscription of the user.

Using Flutter Lib 0.6.0-beta

ishaforenkoqb commented 3 years ago

"Errors: MismatchSenderId" means that FCM Server Key doesn't match to FCM Sender ID. Link to FCM settings - https://console.firebase.google.com/project/_/settings/cloudmessaging

Potential reasons for that:

Note that FCM device registration token may change according to Firebase documentation, in this case you need to create a new QuickBlox Subscription.

QuickBlox sends request to FCM server using FCM Server Key (specified on QuickBlox Dashboard -> Push notification -> Settings) and FCM device registration token that is part of QuickBlox Subscription (https://docs.quickblox.com/docs/flutter-push-notifications#create-push-subscription). If something wrong with them - Firebase will respond with an error.