ConnectyCube / connectycube-flutter-samples

Code samples for Flutter, based on ConnectyCube platform
https://developers.connectycube.com/flutter/
Apache License 2.0
85 stars 91 forks source link

Do not receive push notifications #225

Closed quangvinhvux closed 1 year ago

quangvinhvux commented 1 year ago

Specify the sample to which the issue belongs (use [x]): [x] Chat sample [x] P2P Call sample [] Conference Call sample

Platform (use [x]) [x] Android [] iOS [] macOS [] Windows [x] Web

Device info OS version: Web, Mobile

Using: connectycube_sdk: ^2.2.3 connectycube_flutter_call_kit: ^2.2.1

Describe the bug:

Both of the users I'm using to test have subscribed push token, I'm using postman to send notifications to that token it's working fine, both of cases FirebaseMessaging.onMessage and FirebaseMessaging.onBackgroundMessage receive RemoteMessage. I also tested decoding base64 message from event request object and then sent it by postman to subscribed push token it working fine (both of case in background and killed app received the message and can pickup the call ) I have double-checked FIREBASE CLOUD MESSAGING SERVER KEY, I am sure it is correct.

I think may be an error from BE side of connectycube. because all works fine if I send the notification with the same data by postman. or it because fair usage plan I'm using?

Log


CB-SDK: : {parameters: {message: Vuxxxxxxxxxx calling you, call_type: 1, session_id: 8e0a1fc0-7b0b-4b09-9a43-772e2f3dc903, caller_id: 6268434, call_opponents: 6244953, caller_name: Vuxxxxxxxxxx, user_info: {caller_name: Vuxxxxxxxxxx, call_pricing: 1, sub_call_message: This call will be charged $1/min, message: Vuxxxxxxxxxx calling you}, signal_type: startCall, ios_voip: 1}, notificationType: push, environment: development, eventType: null, usersIds: [6244953], externalUsersIds: [], usersTagsAll: [], usersTagsAny: [], usersTagsExclude: [], date: null, endDate: null, period: null, name: null}
CB-SDK: : =========================================================
REQUEST
  POST https://api.connectycube.com/events 
HEADERS
  {Content-type: application/json, ConnectyCube-REST-API-Version: 0.1.1, CB-SDK: Flutter 2.2.3, CB-Token: EBA0E923087EF214083CAE363467FBA6A72A}
BODY
  {"event":{"id":null,"created_at":null,"updated_at":null,"notification_type":"push","environment":"development","message":"eyJtZXNzYWdlIjoiVnV4eHh4eHh4eHh4IGNhbGxpbmcgeW91IiwiY2FsbF90eXBlIjoxLCJzZXNzaW9uX2lkIjoiOGUwYTFmYzAtN2IwYi00YjA5LTlhNDMtNzcyZTJmM2RjOTAzIiwiY2FsbGVyX2lkIjo2MjY4NDM0LCJjYWxsX29wcG9uZW50cyI6IjYyNDQ5NTMiLCJjYWxsZXJfbmFtZSI6IlZ1eHh4eHh4eHh4eCIsInVzZXJfaW5mbyI6eyJjYWxsZXJfbmFtZSI6IlZ1eHh4eHh4eHh4eCIsImNhbGxfcHJpY2luZyI6IjEiLCJjYWxsZXJfYXZhdGFyIjoiaHR0cHM6Ly9kZXYtbW9kZWx0YWxrLnMzLmFwLXNvdXRoZWFzdC0xLmFtYXpvbmF3cy5jb20vbWVkaWEvNjMwMWQ5MThlMWQyZDgwMDA5ZjljZmEzL2F2YXRhci82MzAxZDkxOGUxZDJkODAwMDlmOWNmYTNBVkFUQVIuanBnPzE2NjI5NjU2MzM4MDQiLCJzdWJfY2FsbF9tZXNzYWdlIjoiVGhpcyBjYWxsIHdpbGwgYmUgY2hhcmdlZCAkMS9taW4iLCJtZXNzYWdlIjoiVnV4eHh4eHh4eHh4IGNhbGxpbmcgeW91In0sInNpZ25hbF90eXBlIjoic3RhcnRDYWxsIiwiaW9zX3ZvaXAiOjF9","user":{"ids":"6244953"}}}

CB-SDK: : Event for offliners created: [{id: 314604494, created_at: 2022-10-22T06:50:19.000Z, updated_at: 2022-10-22T06:50:19.000Z, notification_type: null, environment: development, message: {message: Vuxxxxxxxxxx calling you, call_type: 1, session_id: 8e0a1fc0-7b0b-4b09-9a43-772e2f3dc903, caller_id: 6268434, call_opponents: 6244953, caller_name: Vuxxxxxxxxxx, user_info: {caller_name: Vuxxxxxxxxxx, call_pricing: 1, caller_avatar: https://dev-modeltalk.s3.ap-southeast-1.amazonaws.com/media/6301d918e1d2d80009f9cfa3/avatar/6301d918e1d2d80009f9cfa3AVATAR.jpg?1662965633804, sub_call_message: This call will be charged $1/min, message: Vuxxxxxxxxxx calling you}, signal_type: startCall, ios_voip: 1}, event_type: one_shot, notification_channel: gcm, user_id: 6268434}, {id: 639275467, created_at: 2022-10-22T06:50:19.000Z, updated_at: 2022-10-22T06:50:19.000Z, notification_type: null, environment: production, message: {message: Vuxxxxxxxxxx calling you, call_type: 1, session_id: 8e0a1fc0-7b0b-4b09-9a43-772e2f3dc903, caller_id: 6268434, call_opponents: 6244953, caller_name: Vuxxxxxxxxxx, user_info: {caller_name: Vuxxxxxxxxxx, call_pricing: 1, caller_avatar: https://dev-modeltalk.s3.ap-southeast-1.amazonaws.com/media/6301d918e1d2d80009f9cfa3/avatar/6301d918e1d2d80009f9cfa3AVATAR.jpg?1662965633804, sub_call_message: This call will be charged $1/min, message: Vuxxxxxxxxxx calling you}, signal_type: startCall, ios_voip: 1}, event_type: one_shot, notification_channel: gcm, user_id: 6268434}]
TatankaConCube commented 1 year ago

@quangvinhvux I have asked the server-side team about this issue, will wait the answer

Sriram-52 commented 1 year ago

@TatankaConCube I too facing the same issue.

Sriram-52 commented 1 year ago

@TatankaConCube any update on this?

ArminShahamati commented 9 months ago

any update on this? I have an issue regard push notification