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

Launching app from notification crashes #2

Open
DavidSMills opened this issue Oct 12, 2021 · 0 comments
Open

Launching app from notification crashes #2

DavidSMills opened this issue Oct 12, 2021 · 0 comments

Comments

@DavidSMills
Copy link

Hi, when launching an application using expo-mopub from a FCM notificaiton the application crashes, here are some relevant stack traces/logs:

10-12 18:36:18.078 6962 7125 E unknown:ReactNative: CatalystInstanceImpl caught native exception
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Looper android.app.Activity.getMainLooper()' on a null object reference
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at com.reactlibrary.AdLibSDK.initializeAdSDK(AdLibSDK.java:20)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at com.reactlibrary.RNMoPubRewardedVideo.initializeSdkForRewardedVideoAd(RNMoPubRewardedVideo.java:69)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at java.lang.reflect.Method.invoke(Native Method)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at android.os.Handler.handleCallback(Handler.java:938)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at android.os.Handler.dispatchMessage(Handler.java:99)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at android.os.Looper.loop(Looper.java:245)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
10-12 18:36:18.078 6962 7125 E unknown:ReactNative: at java.lang.Thread.run(Thread.java:923)

Which leads to:

10-12 18:36:19.219 6962 7125 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by Networking

Do you have any idea of how to delay the initialization untill the context is available?

Thanks

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

1 participant