ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
124 stars 111 forks source link

Push Notifications send via connectycube but not received #275

Closed rexcode closed 2 years ago

rexcode commented 2 years ago

Hi,

I am able to successfully send a notification when initiating a call but call receiver is not receiving the notification notification is visible in the admin panel - as shown below

image

have followed instructions given here - https://developers.connectycube.com/reactnative/push-notifications

Please guide

DaveLomber commented 2 years ago

@rexcode please let here know which platform you test (iOS / Android) and which RN you use - CLI or Expo

rexcode commented 2 years ago

My platform is Android

using RN CLI "react-native": "0.63.2", also using "react-native-onesignal": "^4.3.0", "react-native-push-notification": "^8.1.0",

rexcode commented 2 years ago

Hi there,

Please guide

rexcode commented 2 years ago

Hi @ccvlad can u pls guide me?

I am also not able to receive chat updates ie. when I am chatting one on one, the first user sends a chat message, it is not instantly received by the second user, however when the reload the app. new chat message appears, similar to the push notification reported above, ie. message is sent successfully - both chat and push notifications - which I can see in the connectycube admin panel but it is not received by the user receiving it.

image

on screen reload - new message is received

image

Please guide

ccvlad commented 2 years ago

Hi, @rexcode

Could you show the log on the moment of sending the message and config which you're passing in ConnectyCube.init(creds, config)?

rexcode commented 2 years ago

Log - when sending chat -

2021-10-14 14:54:18.376 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8 2021-10-14 14:54:18.376 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8 2021-10-14 14:54:19.495 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8 2021-10-14 14:54:19.495 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8 2021-10-14 14:54:20.171 12362-12675/com.pdmc.glmetaforiki I/ReactNativeJS: ----------sending Message------------- 2021-10-14 14:54:20.176 1837-1837/? W/adbd: timeout expired while flushing socket, closing 2021-10-14 14:54:20.195 1795-7129/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4962812 , only wrote 4962788 2021-10-14 14:54:20.415 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8 2021-10-14 14:54:20.415 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8 2021-10-14 14:54:20.658 12362-12675/com.pdmc.glmetaforiki I/ReactNativeJS: '--------msg send success---------', '6167f74401d226054c000002' 2021-10-14 14:54:20.787 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.787 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 2021-10-14 14:54:20.798 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection 2021-10-14 14:54:20.799 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getSelectedText on inactive InputConnection 2021-10-14 14:54:20.808 8307-8307/? I/GoogleInputMethodService: GoogleInputMethodService.onStartInput():2028 2021-10-14 14:54:20.809 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.809 8307-12897/? E/LstmTrainingCache: TrainingInputEventProcessor$1.onSuccess():441 onSuccess() 2021-10-14 14:54:20.809 8307-8307/? I/DeviceUnlockedTag: DeviceUnlockedTag.notifyDeviceLockStatusChanged():38 Notify device unlocked. 2021-10-14 14:54:20.810 8307-8307/? W/SessionManager: SessionManager.beginSession():55 Try to begin an already begun session [INPUT_SESSION], end it first 2021-10-14 14:54:20.810 8307-8307/? W/SessionManager: SessionManager.endSession():98 Child session [INPUT_VIEW_SESSION] is not ended while ending session [{TRAINING_CACHE_SESSION=1634203415177, IME_SESSION=1634203415177, INPUT_VIEW_SESSION=1634203415158, INPUT_SESSION=1634203415156}], ending it now. 2021-10-14 14:54:20.810 8307-8307/? W/SessionManager: SessionManager.endSession():98 Child session [IME_SESSION] is not ended while ending session [{TRAINING_CACHE_SESSION=1634203415177, IME_SESSION=1634203415177, INPUT_VIEW_SESSION=1634203415158, INPUT_SESSION=1634203415156}], ending it now. 2021-10-14 14:54:20.812 2028-2055/? E/memtrack: Couldn't load memtrack module 2021-10-14 14:54:20.812 2028-2055/? W/android.os.Debug: failed to get memory consumption info: -1 2021-10-14 14:54:20.815 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.815 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.815 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.815 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.816 2028-2055/? E/memtrack: Couldn't load memtrack module 2021-10-14 14:54:20.816 2028-2055/? W/android.os.Debug: failed to get memory consumption info: -1 2021-10-14 14:54:20.817 8307-8307/? I/GoogleInputMethodService: GoogleInputMethodService.onStartInputView():2175 2021-10-14 14:54:20.818 8307-8307/? I/DeviceUnlockedTag: DeviceUnlockedTag.notifyDeviceLockStatusChanged():38 Notify device unlocked. 2021-10-14 14:54:20.824 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.824 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 2021-10-14 14:54:20.825 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection 2021-10-14 14:54:20.829 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getSelectedText on inactive InputConnection 2021-10-14 14:54:20.831 8307-8307/? I/KeyboardViewUtil: KeyboardViewUtil.getKeyboardHeightRatio():170 systemKeyboardHeightRatio:1.000000; userKeyboardHeightRatio:1.000000. 2021-10-14 14:54:20.832 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.832 8307-8307/? I/KeyboardWrapper: KeyboardWrapper.consumeEvent():288 Skip consuming an event as current keyboard is deactivated (state=0, keyboard existence=true) 2021-10-14 14:54:20.833 8307-8307/? I/VoiceInputManagerWrapper: VoiceInputManagerWrapper.shutdown():76 shutdown() 2021-10-14 14:54:20.833 8307-8307/? I/AndroidIME: AbstractIme.onDeactivate():207 LatinIme.onDeactivate() 2021-10-14 14:54:20.834 8307-8307/? W/SessionManager: SessionManager.endSession():90 Try to end a not begun session [IME_SESSION]. 2021-10-14 14:54:20.835 8307-8307/? I/AndroidIME: AbstractIme.onActivate():86 LatinIme.onActivate() : EditorInfo = inputType=Text imeActionName=DONE dump=[inputType=0x24001 imeOptions=0x40000006 privateImeOptions=null actionLabel=null actionId=0 initialSelStart=4 initialSelEnd=4 initialCapsMode=0x0 hintText=Type a message... label=null packageName=com.pdmc.glmetaforiki fieldId=535 fieldName=null extras=null hintLocales=null contentMimeTypes=null ], IncognitoMode = false, DeviceLocked = false 2021-10-14 14:54:20.835 8307-8307/? I/Delight5Facilitator: Delight5Facilitator.initializeForIme():755 initializeForIme() : Locale = [en_US], layout = qwerty 2021-10-14 14:54:20.835 8307-8307/? I/VoiceInputManagerWrapper: VoiceInputManagerWrapper.cancelShutdown():54 cancelShutdown() 2021-10-14 14:54:20.835 8307-8307/? I/VoiceInputManagerWrapper: VoiceInputManagerWrapper.syncLanguagePacks():66 syncLanguagePacks() 2021-10-14 14:54:20.835 8307-8307/? I/LatinIme: LatinIme.updateEnableInlineSuggestionsOnDecoderSideFlags():1297 inline flag updated to:false 2021-10-14 14:54:20.836 8307-9428/? I/SpeechFactory: SpeechRecognitionFactory.maybeScheduleAutoPackDownloadForFallback():182 maybeScheduleAutoPackDownloadForFallback() 2021-10-14 14:54:20.837 8307-9428/? I/FallbackOnDeviceRecognitionProvider: FallbackOnDeviceRecognitionProvider.maybeScheduleAutoPackDownload():194 maybeScheduleAutoPackDownload() for language tag en-US 2021-10-14 14:54:20.844 8307-8307/? I/KeyboardWrapper: KeyboardWrapper.consumeEvent():288 Skip consuming an event as current keyboard is deactivated (state=0, keyboard existence=true) 2021-10-14 14:54:20.847 8307-8307/? I/KeyboardViewUtil: KeyboardViewUtil.calculateMaxKeyboardBodyHeight():62 leave 344 height for app when screen height:2028, header height:121 and isFullscreenMode:false, so the max keyboard body height is:1563 2021-10-14 14:54:20.847 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.847 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.847 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.847 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.850 8307-8307/? I/NormalModeController: NormalModeController.getKeyboardBodyViewHolderPaddingBottom():109 currentPrimeKeyboardType:SOFT systemPaddingBottom:-1 2021-10-14 14:54:20.851 8307-8745/? I/Delight5Decoder: Delight5DecoderWrapper.setKeyboardLayout():435 setKeyboardLayout() 2021-10-14 14:54:20.852 8307-8307/? I/KeyboardViewUtil: KeyboardViewUtil.calculateMaxKeyboardBodyHeight():62 leave 344 height for app when screen height:2028, header height:121 and isFullscreenMode:false, so the max keyboard body height is:1563 2021-10-14 14:54:20.854 8307-8307/? I/NormalModeController: NormalModeController.getKeyboardBodyViewHolderPaddingBottom():109 currentPrimeKeyboardType:SOFT systemPaddingBottom:-1 2021-10-14 14:54:20.854 8307-9447/? E/putmethod.lati: Invalid ID 0x00000217. 2021-10-14 14:54:20.854 8307-9447/? E/LstmTrainingCache: TrainingInputEventProcessor$SlotTask.process():120 Can't get resource name for input slot android.content.res.Resources$NotFoundException: Unable to find resource ID #0x217 at android.content.res.ResourcesImpl.getResourceName(ResourcesImpl.java:276) at android.content.res.Resources.getResourceName(Resources.java:2064) at emb.a(PG:4) at elx.run(PG:3) at java.lang.Thread.run(Thread.java:919) 2021-10-14 14:54:20.859 8307-8307/? I/NormalModeController: NormalModeController.getKeyboardBodyViewHolderPaddingBottom():109 currentPrimeKeyboardType:SOFT systemPaddingBottom:-1 2021-10-14 14:54:20.866 8307-8307/? I/VoiceImeExtension: VoiceImeExtension.shouldStartVoiceInputAutomatically():354 No private IME option set to start voice input. 2021-10-14 14:54:20.869 8307-12586/? I/FederatedC2QExtension: FederatedC2QExtension.setupInferencing():557 Federated Conv2Query inferencing disabled, switching to baseline 2021-10-14 14:54:20.873 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.873 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 2021-10-14 14:54:20.874 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection 2021-10-14 14:54:20.876 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: getSelectedText on inactive InputConnection 2021-10-14 14:54:20.877 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.879 8307-8307/? I/GoogleInputMethodService: GoogleInputMethodService.onStartInput():2028 2021-10-14 14:54:20.880 8307-8307/? I/DeviceUnlockedTag: DeviceUnlockedTag.notifyDeviceLockStatusChanged():38 Notify device unlocked. 2021-10-14 14:54:20.880 8307-8307/? W/SessionManager: SessionManager.beginSession():55 Try to begin an already begun session [INPUT_SESSION], end it first 2021-10-14 14:54:20.880 8307-8307/? W/SessionManager: SessionManager.endSession():98 Child session [INPUT_VIEW_SESSION] is not ended while ending session [{TRAINING_CACHE_SESSION=1634203460835, IME_SESSION=1634203460834, INPUT_VIEW_SESSION=1634203460817, INPUT_SESSION=1634203460810}], ending it now. 2021-10-14 14:54:20.880 8307-8307/? W/SessionManager: SessionManager.endSession():98 Child session [IME_SESSION] is not ended while ending session [{TRAINING_CACHE_SESSION=1634203460835, IME_SESSION=1634203460834, INPUT_VIEW_SESSION=1634203460817, INPUT_SESSION=1634203460810}], ending it now. 2021-10-14 14:54:20.881 8349-8349/? D/BoundBrokerSvc: onBind: Intent { act=com.google.firebase.dynamiclinks.service.START pkg=com.google.android.gms } 2021-10-14 14:54:20.881 8349-8349/? D/BoundBrokerSvc: Loading bound service for intent: Intent { act=com.google.firebase.dynamiclinks.service.START pkg=com.google.android.gms } 2021-10-14 14:54:20.882 8307-8307/? I/GoogleInputMethodService: GoogleInputMethodService.onStartInputView():2175 2021-10-14 14:54:20.883 8307-8307/? I/DeviceUnlockedTag: DeviceUnlockedTag.notifyDeviceLockStatusChanged():38 Notify device unlocked. 2021-10-14 14:54:20.883 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 2021-10-14 14:54:20.883 12362-12362/com.pdmc.glmetaforiki W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 2021-10-14 14:54:20.919 8307-8307/? I/KeyboardViewUtil: KeyboardViewUtil.getKeyboardHeightRatio():170 systemKeyboardHeightRatio:1.000000; userKeyboardHeightRatio:1.000000. 2021-10-14 14:54:20.926 8307-8307/? I/KeyboardWrapper: KeyboardWrapper.consumeEvent():288 Skip consuming an event as current keyboard is deactivated (state=0, keyboard existence=true) 2021-10-14 14:54:20.926 8307-8307/? I/VoiceInputManagerWrapper: VoiceInputManagerWrapper.shutdown():76 shutdown() 2021-10-14 14:54:20.927 8307-8307/? I/AndroidIME: AbstractIme.onDeactivate():207 LatinIme.onDeactivate() 2021-10-14 14:54:20.928 8307-8307/? W/SessionManager: SessionManager.endSession():90 Try to end a not begun session [IME_SESSION]. 2021-10-14 14:54:20.928 8307-8307/? I/AndroidIME: AbstractIme.onActivate():86 LatinIme.onActivate() : EditorInfo = inputType=Text imeActionName=DONE dump=[inputType=0x24001 imeOptions=0x40000006 privateImeOptions=null actionLabel=null actionId=0 initialSelStart=0 initialSelEnd=0 initialCapsMode=0x2000 hintText=Type a message... label=null packageName=com.pdmc.glmetaforiki fieldId=535 fieldName=null extras=null hintLocales=null contentMimeTypes=null ], IncognitoMode = false, DeviceLocked = false 2021-10-14 14:54:20.929 8307-8307/? I/Delight5Facilitator: Delight5Facilitator.initializeForIme():755 initializeForIme() : Locale = [en_US], layout = qwerty 2021-10-14 14:54:20.929 8307-8307/? I/VoiceInputManagerWrapper: VoiceInputManagerWrapper.cancelShutdown():54 cancelShutdown() 2021-10-14 14:54:20.929 8307-8307/? I/VoiceInputManagerWrapper: VoiceInputManagerWrapper.syncLanguagePacks():66 syncLanguagePacks() 2021-10-14 14:54:20.930 8307-8307/? I/LatinIme: LatinIme.updateEnableInlineSuggestionsOnDecoderSideFlags():1297 inline flag updated to:false 2021-10-14 14:54:20.930 8307-9428/? I/SpeechFactory: SpeechRecognitionFactory.maybeScheduleAutoPackDownloadForFallback():182 maybeScheduleAutoPackDownloadForFallback() 2021-10-14 14:54:20.930 8307-9428/? I/FallbackOnDeviceRecognitionProvider: FallbackOnDeviceRecognitionProvider.maybeScheduleAutoPackDownload():194 maybeScheduleAutoPackDownload() for language tag en-US 2021-10-14 14:54:20.935 8307-8307/? I/KeyboardWrapper: KeyboardWrapper.consumeEvent():288 Skip consuming an event as current keyboard is deactivated (state=0, keyboard existence=true) 2021-10-14 14:54:20.939 8307-8307/? I/KeyboardViewUtil: KeyboardViewUtil.calculateMaxKeyboardBodyHeight():62 leave 344 height for app when screen height:2028, header height:121 and isFullscreenMode:false, so the max keyboard body height is:1563 2021-10-14 14:54:20.942 8307-8307/? I/NormalModeController: NormalModeController.getKeyboardBodyViewHolderPaddingBottom():109 currentPrimeKeyboardType:SOFT systemPaddingBottom:-1 2021-10-14 14:54:20.944 8307-8307/? I/KeyboardViewUtil: KeyboardViewUtil.calculateMaxKeyboardBodyHeight():62 leave 344 height for app when screen height:2028, header height:121 and isFullscreenMode:false, so the max keyboard body height is:1563 2021-10-14 14:54:20.948 8307-8307/? I/NormalModeController: NormalModeController.getKeyboardBodyViewHolderPaddingBottom():109 currentPrimeKeyboardType:SOFT systemPaddingBottom:-1 2021-10-14 14:54:20.949 8307-8745/? I/Delight5Decoder: Delight5DecoderWrapper.setKeyboardLayout():435 setKeyboardLayout() 2021-10-14 14:54:20.951 8307-8518/? I/NebulaeTrainingCacheMetricsProcessor: NebulaeTrainingCacheMetricsProcessor.processEndSession():242 No input action collection in this session, skip logging. 2021-10-14 14:54:20.954 8307-8307/? I/NormalModeController: NormalModeController.getKeyboardBodyViewHolderPaddingBottom():109 currentPrimeKeyboardType:SOFT systemPaddingBottom:-1 2021-10-14 14:54:20.965 8307-9447/? E/putmethod.lati: Invalid ID 0x00000217. 2021-10-14 14:54:20.965 8307-9447/? E/LstmTrainingCache: TrainingInputEventProcessor$SlotTask.process():120 Can't get resource name for input slot android.content.res.Resources$NotFoundException: Unable to find resource ID #0x217 at android.content.res.ResourcesImpl.getResourceName(ResourcesImpl.java:276) at android.content.res.Resources.getResourceName(Resources.java:2064) at emb.a(PG:4) at elx.run(PG:3) at java.lang.Thread.run(Thread.java:919) 2021-10-14 14:54:20.971 8307-8307/? I/VoiceImeExtension: VoiceImeExtension.shouldStartVoiceInputAutomatically():354 No private IME option set to start voice input. 2021-10-14 14:54:20.976 8307-12587/? I/FederatedC2QExtension: FederatedC2QExtension.setupInferencing():557 Federated Conv2Query inferencing disabled, switching to baseline 2021-10-14 14:54:20.977 8307-8307/? W/InputContextProxy: InputContextProxy.applyClientDiffInternal():896 Ignore [FetchSuggestions] diff due to stale request: 221<227, inputStateId=209, lastInputStateId=214 2021-10-14 14:54:20.979 8307-8307/? W/InputContextProxy: InputContextProxy.applyClientDiffInternal():896 Ignore [FetchSuggestions] diff due to stale request: 223<227, inputStateId=211, lastInputStateId=214 2021-10-14 14:54:20.981 8307-8307/? W/InputContextProxy: InputContextProxy.applyClientDiffInternal():896 Ignore [FetchSuggestions] diff due to stale request: 225<227, inputStateId=213, lastInputStateId=214 2021-10-14 14:54:21.031 8307-8338/? I/putmethod.lati: Background young concurrent copying GC freed 126922(4884KB) AllocSpace objects, 10(520KB) LOS objects, 31% free, 11MB/16MB, paused 8.563ms total 46.790ms 2021-10-14 14:54:21.122 8349-8349/? D/BoundBrokerSvc: onBind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.122 8349-8349/? D/BoundBrokerSvc: Loading bound service for intent: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.131 8349-8349/? D/BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.137 8349-8349/? D/BoundBrokerSvc: onBind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.137 8349-8349/? D/BoundBrokerSvc: Loading bound service for intent: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.142 8349-8349/? D/BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.153 8349-8349/? D/BoundBrokerSvc: onBind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.153 8349-8349/? D/BoundBrokerSvc: Loading bound service for intent: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.159 8349-8349/? D/BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.172 8349-8349/? D/BoundBrokerSvc: onBind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.172 8349-8349/? D/BoundBrokerSvc: Loading bound service for intent: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.186 8349-8349/? D/BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.common.BIND_SHARED_PREFS pkg=com.google.android.gms } 2021-10-14 14:54:21.416 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8 2021-10-14 14:54:21.416 1804-2285/? E/GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8

params passed in ConnectyCube.init(creds, config) - CC_CREDENTIALS - {"appId": 5367, "authKey": "hDpyhJMzUtz5zY4", "authSecret": "BrHNW9EbuSn8X6k"} CC_CONFIG - {"debug": {"mode": 0}}

rexcode commented 2 years ago

Hi @ccvlad please guide

ccvlad commented 2 years ago

Please set {"debug": {"mode": 1}} and show log from Metro. Need to check ConnectyCube's logs

rexcode commented 2 years ago

Metro log

------------------subcribeToPushNotification - {"os": "android", "token": "eVCpc2PVT_G78o0wREjazh:APA91bFJaQOhdkFr0v423z-fZLhrasn9Rutq5MeSx5-gp0YG431PkW0ZpSPz1NaDWoE3rZpyGULvcblyalUrW7f8jBQXQnvCc6DzLw9y5EIrDbsoooho779Phk6qdazzrrZF6hKbrG9K"} 74b2daf7ceedadec [Mon Oct 18 2021 16:05:31.405] LOG [Request][6] POST https://api.connectycube.com/subscriptions.json {"data": {"device": {"platform": "android", "udid": "74b2daf7ceedadec"}, "notification_channels": "gcm", "push_token": {"client_identification_sequence": "eVCpc2PVT_G78o0wREjazh:APA91bFJaQOhdkFr0v423z-fZLhrasn9Rutq5MeSx5-gp0YG431PkW0ZpSPz1NaDWoE3rZpyGULvcblyalUrW7f8jBQXQnvCc6DzLw9y5EIrDbsoooho779Phk6qdazzrrZF6hKbrG9K", "environment": "development"}}, "type": "POST", "url": "https://api.connectycube.com/subscriptions.json"} [Mon Oct 18 2021 16:05:31.667] LOG [Response][6] {"items": [{"_id": "6167f74401d226054c000002", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-14T09:24:19Z", "date_sent": 1634203460, "delivered_ids": [Array], "edited_at": null, "message": "Test", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "6167f71601d226054c000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-14T09:23:33Z", "date_sent": 1634203414, "delivered_ids": [Array], "edited_at": null, "message": "U", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "6167f6fe01d226054c000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-14T09:23:09Z", "date_sent": 1634203390, "delivered_ids": [Array], "edited_at": null, "message": "Test", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "6166c3a53eee501ca1000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T11:31:49Z", "date_sent": 1634124709, "delivered_ids": [Array], "edited_at": null, "message": "wewe", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "6166aad6cff07e57bb000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T09:45:57Z", "date_sent": 1634118358, "delivered_ids": [Array], "edited_at": null, "message": "rtrt", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "6166a9bcdb9ff478d3000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T09:41:15Z", "date_sent": 1634118076, "delivered_ids": [Array], "edited_at": null, "message": "rtrtr", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "6166a9b780b84052e4000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T09:41:11Z", "date_sent": 1634118071, "delivered_ids": [Array], "edited_at": null, "message": "test", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61669a1a303cda2143000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T08:34:34Z", "date_sent": 1634114074, "delivered_ids": [Array], "edited_at": null, "message": "test", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616698597a894e6ff5000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T08:27:05Z", "date_sent": 1634113625, "delivered_ids": [Array], "edited_at": null, "message": "eee", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616695f3abf6352eee000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T08:16:50Z", "date_sent": 1634113011, "delivered_ids": [Array], "edited_at": null, "message": "eee", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61669394db061028f9000002", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T08:06:44Z", "date_sent": 1634112404, "delivered_ids": [Array], "edited_at": null, "message": "T", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61668faadb061028f9000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:50:01Z", "date_sent": 1634111402, "delivered_ids": [Array], "edited_at": null, "message": "wewe", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61668fa41cd2277fb7000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:49:55Z", "date_sent": 1634111396, "delivered_ids": [Array], "edited_at": null, "message": "rrr", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61668dba2db95710e2000004", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:41:45Z", "date_sent": 1634110906, "delivered_ids": [Array], "edited_at": null, "message": "rrr", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616688201f6f056609000002", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:17:51Z", "date_sent": 1634109472, "delivered_ids": [Array], "edited_at": null, "message": "Tt", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616688152db95710e2000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:17:41Z", "date_sent": 1634109461, "delivered_ids": [Array], "edited_at": null, "message": "rrr", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "6166874e33fbad2a40000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:14:21Z", "date_sent": 1634109262, "delivered_ids": [Array], "edited_at": null, "message": "ttt", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61668740eb33030102000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:14:08Z", "date_sent": 1634109248, "delivered_ids": [Array], "edited_at": null, "message": "eee", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616684cc527fc5508e000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T07:03:39Z", "date_sent": 1634108620, "delivered_ids": [Array], "edited_at": null, "message": "Ty", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616682a782ccf03ec3000002", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:54:31Z", "date_sent": 1634108071, "delivered_ids": [Array], "edited_at": null, "message": "G", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667d9846ca3b6cdd000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:32:56Z", "date_sent": 1634106776, "delivered_ids": [Array], "edited_at": null, "message": "T", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667d9246ca3b6cdd000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:32:50Z", "date_sent": 1634106770, "delivered_ids": [Array], "edited_at": null, "message": "rrrr", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667c2465824814ac000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:26:43Z", "date_sent": 1634106404, "delivered_ids": [Array], "edited_at": null, "message": "Ttt", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667c1965824814ac000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:26:32Z", "date_sent": 1634106393, "delivered_ids": [Array], "edited_at": null, "message": "eee", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667bccbc342750b4000002", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:25:16Z", "date_sent": 1634106316, "delivered_ids": [Array], "edited_at": null, "message": "eee", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667b561b01c337cc000001", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:23:17Z", "date_sent": 1634106198, "delivered_ids": [Array], "edited_at": null, "message": "rrrr", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667b4cbc342750b4000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:23:08Z", "date_sent": 1634106188, "delivered_ids": [Array], "edited_at": null, "message": "test", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616679caeeb26d1128000002", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:16:42Z", "date_sent": 1634105802, "delivered_ids": [Array], "edited_at": null, "message": "yyy", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616679c375e53e7eb0000000", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:16:35Z", "date_sent": 1634105795, "delivered_ids": [Array], "edited_at": null, "message": "rrr", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616679690ffb1c281600000c", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:15:05Z", "date_sent": 1634105705, "delivered_ids": [Array], "edited_at": null, "message": "gggg", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667963e13ee13b6d000006", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:14:59Z", "date_sent": 1634105699, "delivered_ids": [Array], "edited_at": null, "message": "eee", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "61667797e13ee13b6d000005", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:07:19Z", "date_sent": 1634105239, "delivered_ids": [Array], "edited_at": null, "message": "hhhh", "read": 1, "read_ids": [Array], "recipient_id": 4815195, "sender_id": 4815200, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}, {"_id": "616677900ffb1c2816000009", "attachments": [Array], "chat_dialog_id": "61657665107bd9002fdb60b0", "created_at": "2021-10-13T06:07:11Z", "date_sent": 1634105232, "delivered_ids": [Array], "edited_at": null, "message": "hi", "read": 1, "read_ids": [Array], "recipient_id": 4815200, "sender_id": 4815195, "updated_at": "2021-10-14T09:27:54Z", "views_count": 0}], "limit": 100, "skip": 0} [Mon Oct 18 2021 16:05:32.584] LOG [Response][6] [{"subscription": {"_id": "61542ae9ee49b0002028559a", "bundle_identifier": null, "client_identification_sequence": "eVCpc2PVT_G78o0wREjazh:APA91bFJaQOhdkFr0v423z-fZLhrasn9Rutq5MeSx5-gp0YG431PkW0ZpSPz1NaDWoE3rZpyGULvcblyalUrW7f8jBQXQnvCc6DzLw9y5EIrDbsoooho779Phk6qdazzrrZF6hKbrG9K", "device": [Object], "environment": "development", "id": 2352216, "notification_channel": [Object], "notification_channel_id": 3, "platform_id": 2, "udid": "74b2daf7ceedadec", "user_id": 4815200}}] [Mon Oct 18 2021 16:05:32.585] LOG ----------PushNotificationService - result [{"subscription": {"_id": "61542ae9ee49b0002028559a", "bundle_identifier": null, "client_identification_sequence": "eVCpc2PVT_G78o0wREjazh:APA91bFJaQOhdkFr0v423z-fZLhrasn9Rutq5MeSx5-gp0YG431PkW0ZpSPz1NaDWoE3rZpyGULvcblyalUrW7f8jBQXQnvCc6DzLw9y5EIrDbsoooho779Phk6qdazzrrZF6hKbrG9K", "device": [Object], "environment": "development", "id": 2352216, "notification_channel": [Object], "notification_channel_id": 3, "platform_id": 2, "udid": "74b2daf7ceedadec", "user_id": 4815200}}] [Mon Oct 18 2021 16:05:37.469] LOG ----------sending Message-------------
[Mon Oct 18 2021 16:05:37.493] LOG [Chat] SENT: test161657665107bd9002fdb60b048152001634553335 [Mon Oct 18 2021 16:05:38.216] LOG --------msg send success--------- 616d4df7245c7d1b25000000

ccvlad commented 2 years ago

I am not seeing the normal message sending log. The log [Chat] SENT: have to be started from <message type="..." id="..." from="..." to="..." ...>...

Make sure that you do all by the guide: https://developers.connectycube.com/js/messaging?id=sendreceive-chat-messages

rexcode commented 2 years ago

Log code when pasted is not directly showing in the comment, it is some how getting formatted, please check below image for metro log from 2 emulators

image

Message is send successfully and from log image above it appears to be recevied but it is not being displayed in the receiving device

image

ccvlad commented 2 years ago

From the log I see that you've sent the message in private chat and have received on other side. Check the incoming message in ConnectyCube.chat.onMessageListener:

ConnectyCube.chat.onMessageListener = onMessage; // init the listener before 'ConnectyCube.chat.connect(params)'

const onMessage = (userId, message) => {
    // you will be receiving messages here and displaying
    console.log('[ConnectyCube.chat.onMessageListener] callback:', {userId, message])
}

Also on first screenshot from prev post the last message was displayed with status 'pending' (a clock icon), because you didn't configure messages statuses.

rexcode commented 2 years ago

Hi, I have found the issue- chat listeners were not properly setup which was causing the issue. now chat both send and receipt is working properly

However, I am still not able to receive notifications I am able to send notifications which I can see in the connectycube admin panel

whenever I send a single notification from my app - I am seeing 2 notifications in admin panel with different errors as shown below -

image

image

image

I have set the same sender id in my app in connectycube and in my code which I received from firebase

Also, I am setting up notification subscription when user logs in as shown in your demo app below -

https://github.com/ConnectyCube/connectycube-reactnative-samples/blob/master/RNChat/src/services/push-notification.js

metro log -

[Tue Oct 19 2021 16:55:30.109] LOG ----------PushNotificationService - subscriptions success [{"subscription": {"_id": "6156c5f83de60a003324b628", "bundle_identifier": null, "client_identification_sequence": "ck8nbI1AT8KH2-UaYf6A26:APA91bEb7MQeRQ0LMEH6RAeNcvwhIGq-1cbuq7K_qbRTeGMMnPoNAzVa1nBp5xAspfdnf7i4egQbdfPL8oGNaNXgQpV9dEaWCPs1zbV2xEpKhnYlYGstr-p6zDXji7NCl8iwHHfKyvi8", "device": [Object], "environment": "development", "id": 2361064, "notification_channel": [Object], "notification_channel_id": 3, "platform_id": 2, "udid": "47c2837e270b7864", "user_id": 4815200}}] [Tue Oct 19 2021 16:55:30.150] LOG ----------PushNotificationService - subscriptions success [{"subscription": {"_id": "61542ae9ee49b0002028559a", "bundle_identifier": null, "client_identification_sequence": "fc5I8B1QS2WN6IDsZE4_gT:APA91bHshzv9zBQLlIAX-3-WL34lEm4LHFveMuCSgZiKImbOJRzNJm9g4YtbwduikAcDBQvJjVs6xQtqyI1FzXT1bo2ZOnt61DVLz0oFbb_stfG_l7NcM7Z2vZpJU_SLYqVJbzzSTU11", "device": [Object], "environment": "development", "id": 2352216, "notification_channel": [Object], "notification_channel_id": 3, "platform_id": 2, "udid": "74b2daf7ceedadec", "user_id": 4815195}}]

ccvlad commented 2 years ago

Make sure that you've set up push notification by the guide - https://developers.connectycube.com/reactnative/push-notifications?id=push-notifications

Configured the react-native-push-notification lib - https://github.com/zo0r/react-native-push-notification#installation

Also use real device to test push notification instead of Android emulator.

rexcode commented 2 years ago

Hi, I have followed the above instrucitons -

testing with real device

Now i am able to send notifciations from firebase and receive it in my app, but still not able to receive notifications send via connectycube.

response from admin panel for push notification

image

image

Mismatch sender id error is gone but subscription error is still there, I have checked the user details, the user is subscribed

image

DaveLomber commented 2 years ago

@rexcode are you using EXPO or RN CLI?

Also, I checked the error from this https://github.com/ConnectyCube/connectycube-reactnative-samples/issues/275#issuecomment-946729264

Just to be clear,

2 more questions:

ccvlad commented 2 years ago

Closed due to inactivity. Please create a new issue if needed.