-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Labels
Description
Description:
We encountered a NullPointerException crash when attempting to interact with the checkbox component in our React Native app. This issue specifically occurs when the ReactCheckBoxManager tries to access the EventDispatcher from a null UIManagerModule reference. This crash has been observed on React Native version 0.76.1.
Stack Trace:
E FATAL EXCEPTION: main
Process: com.pokket.challenger.plus, PID: 9991
java.lang.NullPointerException: Attempt to invoke virtual method 'com.facebook.react.uimanager.events.EventDispatcher com.facebook.react.uimanager.UIManagerModule.getEventDispatcher()' on a null object reference
at com.reactnativecommunity.checkbox.ReactCheckBoxManager$1.onCheckedChanged(ReactCheckBoxManager.java:37)
at com.reactnativecommunity.checkbox.ReactCheckBox.setChecked(ReactCheckBox.java:27)
at android.widget.CompoundButton.toggle(CompoundButton.java:137)
at android.widget.CompoundButton.performClick(CompoundButton.java:142)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28305)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Steps to Reproduce:
- Upgrade to React Native 0.76.1.
- Integrate the
@react-native-community/checkboxpackage. - Interact with the checkbox component.
- Observe the crash occurring on Android.
Expected Behavior:
The checkbox component should work without causing a crash.
Actual Behavior:
The app crashes when attempting to use the checkbox component due to a NullPointerException when accessing the EventDispatcher.
Environment:
- React Native version: 0.76.1
- react-native-checkbox: Latest version at the time of writing
- Platform: Android
ditiem, omerts, NifemiCodes, MohamedMoustafaMK, Nordsword3m and 3 more