infobip / mobile-messaging-react-native-plugin

Mobile Messaging SDK plugin for React Native projects
24 stars 4 forks source link

Push notifications not receiving #47

Closed imkrishh closed 1 year ago

imkrishh commented 1 year ago

Hi,

I migrated mobile-messaging-react-native-plugin to the latest version(6.3.3) that got released recently.

   mobileMessaging.init(
           {
              applicationCode: '<your app code>',
              ios: {
                 notificationTypes: ['alert', 'badge', 'sound'],
              },
           },
           () => {
              console.log('MobileMessaging started');
           },
           error => {
              console.log('MobileMessaging error: ', error);
           },
   );

system logs

MobileMessaging started

Tested all types of push notifications on both Android and iOS but none of the Notifications are getting received in the mobile App.

React-Native :- 0.65.1 Android :- 11,12 iOS :- 14,15 mobile-messaging-react-native-plugin :- 6.3.3

riskpp commented 1 year ago

Hi @imkrishh, I guess you provided real application code instead of '<your app code>'? Could you please share with us android and iOS logs (RN logs isn't enough for investigation the issue), to set logging for iOS you need to put logging: true to the configuration. Also please describe how are you sending notifications (API, portal, using some user Id for which user is personalized or?) Would be great to know pushRegId from the installations which failed to receive messages - https://github.com/infobip/mobile-messaging-react-native-plugin/wiki/How-do-I-get-Infobip's-unique-(push-registration)-ID

You can send sensitive data to our support e-mail - support@infobip.com

imkrishh commented 1 year ago

@riskpp, yes real application code is being used. it was working fine on version infobip-mobile-messaging-react-native-plugin v4.1.6

riskpp commented 1 year ago

Then we need what I asked previously (logs and etc.) Have you check the Migration guides?

imkrishh commented 1 year ago

This is the error we are getting when trying to send push notifications from infobip portal.

Outbound Mobile Push Undeliverable - Handset errors Expired pushRegistrationId (code 8001) Reason: UNDELIVERABLE_REJECTED_OPERATOR Test.

Below added the logs from iOS when set logging: true

2022-07-05 17:38:04:625 [MobileMessaging] 🛠 [MobileMessaging] Starting service (with apns registration disabled=false, apns unregistering disabled=false, notification center delegate disabled=false)...
2022-07-05 17:38:04:632 [MobileMessaging] đŸ’Ŧ Unarchived Optional(<MobileMessaging.InternalData: 0x2829d40e0>) from /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:632 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} <MobileMessaging.InternalData: 0x2829d40e0> /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:644 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:644 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:644 [MobileMessaging] đŸ’Ŧ Archiving <NSThread: 0x2817ad940>{number = 8, name = (null)} at /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:652 [MobileMessaging] đŸ’Ŧ Unarchived Optional(<MobileMessaging.MMInstallation: 0x105a51e70>) from /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:652 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} <MobileMessaging.MMInstallation: 0x105a51e70> /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:653 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:653 [MobileMessaging] 🛠 [MMMessageHandler] starting
2022-07-05 17:38:04:653 [MobileMessaging] 🛠 [VersionManager] started...
2022-07-05 17:38:04:654 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:698 [MobileMessaging] 🛠 [MessagesEvictionOperation] started...
2022-07-05 17:38:04:700 [MobileMessaging] đŸ’Ŧ [Core Data] NO CHANGES IN ** UNNAMED ** CONTEXT - NOT SAVING
2022-07-05 17:38:04:700 [MobileMessaging] 🛠 [MessagesEvictionOperation] finished with errors: []
2022-07-05 17:38:04:700 [MobileMessaging] 🛠 [LocalMessageFetchingOperation] Retrieved 0 messages from notification extension storage.
2022-07-05 17:38:04:709 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:721 [MobileMessaging] 🛠 [DynamicBaseUrlHTTPSessionManager] Sending request: 
2022-07-05 17:38:04:723 [MobileMessaging] 🛠 [NotificationsInteractionService] starting
2022-07-05 17:38:04:723 [MobileMessaging] 🛠 [MobileMessaging] Retrying sending mobile originated messages...
2022-07-05 17:38:04:724 [MobileMessaging] 🛠 [UserSessionService] starting
2022-07-05 17:38:04:724 [MobileMessaging] 🛠 [InstallationDataService] starting
2022-07-05 17:38:04:724 [MobileMessaging] 🛠 [InstallationDataService] sync installation data with server...
2022-07-05 17:38:04:724 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:724 [MobileMessaging] đŸ’Ŧ Unarchived Optional(<MobileMessaging.MMInstallation: 0x105a9e240>) from /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:04:725 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} <MobileMessaging.MMInstallation: 0x105a9e240> /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:04:725 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:727 [MobileMessaging] 🛠 [UserSessionService] starts
2022-07-05 17:38:04:728 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:756 [MobileMessaging] ⚠ī¸ [UpdateInstanceOperation] There is no data to send. Aborting...
2022-07-05 17:38:04:757 [MobileMessaging] ⚠ī¸ [CreateInstanceOperation] There is no registration data to send. Aborting...
2022-07-05 17:38:04:760 [MobileMessaging] 🛠 [MessagePostingOperation] started...
2022-07-05 17:38:04:760 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:761 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x281793c80>{number = 9, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:761 [MobileMessaging] 🛠 [MessagePostingOperation] nothing to send...
2022-07-05 17:38:04:761 [MobileMessaging] 🛠 [MessagePostingOperation] finished with errors: []
2022-07-05 17:38:04:763 [MobileMessaging] 🛠 [LocalMessageFetchingOperation] Retrieved 0 messages from notification center.
2022-07-05 17:38:04:763 [MobileMessaging] 🛠 [MMKeychain] get internalId "cdaf7a55-befe-4f94-b06b-e527a2ddef5b"
2022-07-05 17:38:04:763 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:763 [MobileMessaging] 🛠 [ApnsRegistrationManager] Registering...
2022-07-05 17:38:04:763 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:769 [MobileMessaging] 🛠 [UserDataService] sync user data with server
2022-07-05 17:38:04:770 [MobileMessaging] đŸ’Ŧ Unarchived Optional(<MobileMessaging.MMUser: 0x283093210>) from /{path}/Library/Application Support/com.mobile-messaging.user
2022-07-05 17:38:04:770 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} <MobileMessaging.MMUser: 0x283093210> /{path}/Library/Application Support/com.mobile-messaging.user
2022-07-05 17:38:04:776 [MobileMessaging] 🛠 [LocalMessageFetchingOperation] finished with errors: []
2022-07-05 17:38:04:776 [MobileMessaging] 🛠 [MMMessageHandler] abort messages handling [], service running true
2022-07-05 17:38:04:782 [MobileMessaging] đŸ’Ŧ Unarchived Optional(<MobileMessaging.MMUser: 0x2830932a0>) from /{path}/Library/Application Support/com.mobile-messaging.dirty-user
2022-07-05 17:38:04:782 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} <MobileMessaging.MMUser: 0x2830932a0> /{path}/Library/Application Support/com.mobile-messaging.dirty-user
2022-07-05 17:38:04:783 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:783 [MobileMessaging] 🛠 [MobileMessaging] Service started with subservices: ["UserDataService": <MobileMessaging.UserDataService: 0x280c01830>, "MMMessageHandler": <MobileMessaging.MMMessageHandler: 0x2826aa880>, "InstallationDataService": <MobileMessaging.InstallationDataService: 0x280c02130>, "BaseUrlManager": <MobileMessaging.BaseUrlManager: 0x2817b3440>, "UserSessionService": <MobileMessaging.UserSessionService: 0x2829d5f80>, "NotificationsInteractionService": <MobileMessaging.NotificationsInteractionService: 0x2817be000>, "EventsService": <MobileMessaging.EventsService: 0x2826ac300>]
2022-07-05 17:38:04:786 [MobileMessaging] 🛠 [SeenStatusSendingOperation] There is no non-seen meessages to send to the server. Finishing...
2022-07-05 17:38:04:787 [MobileMessaging] 🛠 [SeenStatusSendingOperation] finished: []
2022-07-05 17:38:04:787 [MobileMessaging] 🛠 [MessageFetchingOperation] Starting operation...
2022-07-05 17:38:04:787 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e04c0>{number = 15, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:788 [MobileMessaging] 🛠 [MessageFetchingOperation] Found Optional(0) not reported messages. Optional(0) archive messages.
2022-07-05 17:38:04:797 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e04c0>{number = 15, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:812 [MobileMessaging] 🛠 [DynamicBaseUrlHTTPSessionManager] Sending request: 
2022-07-05 17:38:04:818 [MobileMessaging] 🛠 [DynamicBaseUrlHTTPSessionManager] Response received
2022-07-05 17:38:04:818 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:819 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:826 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:827 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:827 [MobileMessaging] đŸ’Ŧ Archiving <NSThread: 0x2817e29c0>{number = 16, name = (null)} at /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:04:831 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:831 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:831 [MobileMessaging] đŸ’Ŧ Archiving <NSThread: 0x2817e29c0>{number = 16, name = (null)} at /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:835 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:04:835 [MobileMessaging] 🛠 [UpdateInstanceOperation] successfully synced
2022-07-05 17:38:04:835 [MobileMessaging] 🛠 [UpdateInstanceOperation] finished with errors: []
2022-07-05 17:38:04:835 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817e29c0>{number = 16, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:05:120 [MobileMessaging] ℹī¸ [ApnsRegistrationManager] Application did register with device token {##token##}
2022-07-05 17:38:05:120 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:05:120 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:05:120 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:05:120 [MobileMessaging] đŸ’Ŧ Setting cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} <MobileMessaging.MMInstallation: 0x1058a8d90> /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:05:120 [MobileMessaging] đŸ’Ŧ Archiving <NSThread: 0x2817ad940>{number = 8, name = (null)} at /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:05:126 [MobileMessaging] 🛠 [InstallationDataService] sync installation data with server...
2022-07-05 17:38:05:126 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.installation
2022-07-05 17:38:05:161 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.dirty-installation
2022-07-05 17:38:05:162 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
2022-07-05 17:38:05:164 [MobileMessaging] đŸ’Ŧ Using cached value <NSThread: 0x2817ad940>{number = 8, name = (null)} /{path}/Library/Application Support/com.mobile-messaging.internal-data
riskpp commented 1 year ago

Hi @imkrishh, we need more info, could you please provide pushRegistrationId on which you are trying to send a notification via support@infobip.com and put a link to this issue on github.