Skip to content

Tried to access a JS module before the React instance was fully set up #877

@abdullahizzuddiin

Description

@abdullahizzuddiin

Description:

Caused by java.lang.RuntimeException
Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module.

Environment
Version: 3.3.0
Install using: yarn

Steps to Reproduce Issue:
Actually, I cannot reproduce this issue. But, thousand users of my app get this error
Screenshot from 2019-10-08 10-54-41

Anything else:

Caused by java.lang.RuntimeException: Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module.
       at com.facebook.react.bridge.ReactContext.getJSModule(ReactContext.java:107)
       at com.geektime.rnonesignalandroid.RNOneSignal.sendEvent(RNOneSignal.java:102)
       at com.geektime.rnonesignalandroid.RNOneSignal.notificationReceived(RNOneSignal.java:413)
       at com.onesignal.OneSignal.handleNotificationReceived(OneSignal.java:2025)
       at com.onesignal.NotificationExtenderService.processJsonObject(NotificationExtenderService.java:194)
     (crash stacktraces, as well as any other information here)  at com.onesignal.NotificationExtenderService.processIntent(NotificationExtenderService.java:155)
       at com.onesignal.NotificationExtenderService.onHandleWork(NotificationExtenderService.java:123)
       at com.onesignal.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:439)
       at com.onesignal.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:430)
       at android.os.AsyncTask$2.call(AsyncTask.java:295)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
       at java.lang.Thread.run(Thread.java:818)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions