Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot receive tapped notification event when app is closed #61

Closed
sunnylab96 opened this issue Apr 17, 2023 · 5 comments
Closed

Cannot receive tapped notification event when app is closed #61

sunnylab96 opened this issue Apr 17, 2023 · 5 comments

Comments

@sunnylab96
Copy link

sunnylab96 commented Apr 17, 2023

Hi! I can not receive tapped notification event when the app is closed. I'm using SDK 8.0.0 on Android 12, getting this error when tap on the notification message:

04-17 15:51:17.891 10157  6183  6457 D RNMobileMessaging: Will not migrate cryptor :
04-17 15:51:17.892 10157  6183  6457 W System.err: java.lang.ClassNotFoundException: org.infobip.mobile.messaging.cryptor.ECBCryptorImpl
04-17 15:51:17.892 10157  6183  6457 W System.err: 	at java.lang.Class.classForName(Native Method)
04-17 15:51:17.893 10157  6183  6457 W System.err: 	at java.lang.Class.forName(Class.java:454)
04-17 15:51:17.895 10157  6183  6457 W System.err: 	at java.lang.Class.forName(Class.java:379)
04-17 15:51:17.895 10157  6183  6457 W System.err: 	at org.infobip.reactlibrary.mobilemessaging.ReactNativeMobileMessagingModule.init(ReactNativeMobileMessagingModule.java:384)
04-17 15:51:17.895 10157  6183  6457 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
04-17 15:51:17.896 10157  6183  6457 W System.err: 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
04-17 15:51:17.896 10157  6183  6457 W System.err: 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
04-17 15:51:17.897 10157  6183  6457 W System.err: 	at com.facebook.jni.NativeRunnable.run(Native Method)
04-17 15:51:17.898 10157  6183  6457 W System.err: 	at android.os.Handler.handleCallback(Handler.java:938)
04-17 15:51:17.899 10157  6183  6457 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:99)
04-17 15:51:17.899 10157  6183  6457 W System.err: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
04-17 15:51:17.899 10157  6183  6457 W System.err: 	at android.os.Looper.loopOnce(Looper.java:201)
04-17 15:51:17.900 10157  6183  6457 W System.err: 	at android.os.Looper.loop(Looper.java:288)
04-17 15:51:17.900 10157  6183  6457 W System.err: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
04-17 15:51:17.900 10157  6183  6457 W System.err: 	at java.lang.Thread.run(Thread.java:920)
04-17 15:51:17.901 10157  6183  6457 W System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.infobip.mobile.messaging.cryptor.ECBCryptorImpl" on path: DexPathList[[zip file "/data/app/~~nr8CSaI7bVYmde_3fVICeA==/com.sunnylab-xa3piZpoYY3DfbCdMFaZYQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~nr8CSaI7bVYmde_3fVICeA==/com.sunnylab-xa3piZpoYY3DfbCdMFaZYQ==/lib/x86_64, /data/app/~~nr8CSaI7bVYmde_3fVICeA==/com.sunnylab-xa3piZpoYY3DfbCdMFaZYQ==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]]
04-17 15:51:17.902 10157  6183  6457 W System.err: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
04-17 15:51:17.903 10157  6183  6457 W System.err: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
04-17 15:51:17.903 10157  6183  6457 W System.err: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
04-17 15:51:17.904 10157  6183  6457 W System.err: 	... 15 more
@riskpp
Copy link
Contributor

riskpp commented Apr 18, 2023

Hi @sunnylab96 could you please put full stack trace and try to reproduce this scenario with Example app.

This error you provided, just means that cryptor migration isn't setup, just informative one, however we might remove it if it confuses.

Let me also clarify what does it mean "I can not receive tapped notification event when the app is closed"? Does it mean that app was swiped off and then user tapped on received notification and event "notificationTapped" wasn't received?

I'll need also the code for how are you calling init method and subscribing to notifications.

@sunnylab96
Copy link
Author

sunnylab96 commented Apr 18, 2023

Hi @riskpp , yes, I could not receive the notificationTapped event when swiped off the app, here is how I initiate the mobile SDK and subscribe for the notificationTapped event:

  if (Platform.OS === 'ios' || !configuration.geofencingEnabled) {
    mobileMessaging.init(
      {
        applicationCode:
          'xxxxxxxxxxxxxxxx',
        ios: {
          notificationTypes: ['alert', 'badge', 'sound'],
          logging: true,
        },
        defaultMessageStorage: true,
        inAppChatEnabled: true,
        geofencingEnabled: false,
      },
      () => {
        console.log('Mobile messaging initialized');
        mobileMessaging.subscribe('notificationTapped', message => {
          console.log('Notification tapped event received!');
        });
      },
      error => console.log('An error occur: ', error),
    );
  }
};

@riskpp
Copy link
Contributor

riskpp commented Apr 18, 2023

You can try to subscribe earlier, as done in Example app and where are you calling mobileMessaging.init ?

@riskpp
Copy link
Contributor

riskpp commented Jul 27, 2023

@sunnylab96 did the answer help you? We are going to close it in a week if no activity

@tjuric
Copy link
Member

tjuric commented Sep 29, 2023

Closing due to inactivity.

@tjuric tjuric closed this as completed Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants