You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Library version: 2.9.0
React native version: 0.76.0, new architecture enabled
When opening react-native-picker, I get this error in runtime:
Process: app.florio.userfactor, PID: 29998
java.lang.NullPointerException: Attempt to invoke interface method 'com.facebook.react.bridge.ReadableNativeMap com.facebook.react.uimanager.StateWrapper.getStateData()' on a null object reference
at com.reactnativecommunity.picker.FabricEnabledPicker.updateState(FabricEnabledPicker.java:45)
at com.reactnativecommunity.picker.FabricEnabledPicker.setMeasuredHeight(FabricEnabledPicker.java:32)
at com.reactnativecommunity.picker.ReactPicker.onMeasure(ReactPicker.java:226)
This patch seems to fix it:
diff --git a/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java b/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java
index 08edd095d688be68fba52be667fc416a0d290b3b..925fc2b296151ba9325a3d9cd5fbd57454c232d5 100644
--- a/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java
+++ b/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java
@@ -35,6 +35,11 @@ public abstract class FabricEnabledPicker extends AppCompatSpinner {
void updateState(int measuredHeight) {
float realHeight = PixelUtil.toDIPFromPixel(measuredHeight);
+ // If the state wrapper is null, we can't update the state, let's wait until it's set.
+ if (mStateWrapper == null) {
+ return;
+ }
+
// Check incoming state values. If they're already the correct value, return early to prevent
// infinite UpdateState/SetState loop.
ReadableMap currentState = mStateWrapper.getStateData();
The text was updated successfully, but these errors were encountered:
Library version: 2.9.0 React native version: 0.76.0, new architecture enabled
When opening react-native-picker, I get this error in runtime:
Process: app.florio.userfactor, PID: 29998
java.lang.NullPointerException: Attempt to invoke interface method 'com.facebook.react.bridge.ReadableNativeMap com.facebook.react.uimanager.StateWrapper.getStateData()' on a null object reference
at com.reactnativecommunity.picker.FabricEnabledPicker.updateState(FabricEnabledPicker.java:45)
at com.reactnativecommunity.picker.FabricEnabledPicker.setMeasuredHeight(FabricEnabledPicker.java:32)
at com.reactnativecommunity.picker.ReactPicker.onMeasure(ReactPicker.java:226)
This patch seems to fix it:
diff --git a/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java b/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java
index 08edd095d688be68fba52be667fc416a0d290b3b..925fc2b296151ba9325a3d9cd5fbd57454c232d5 100644
--- a/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java
+++ b/android/src/fabric/java/com/reactnativecommunity/picker/FabricEnabledPicker.java
@@ -35,6 +35,11 @@ public abstract class FabricEnabledPicker extends AppCompatSpinner {
void updateState(int measuredHeight) {
float realHeight = PixelUtil.toDIPFromPixel(measuredHeight);
+ // If the state wrapper is null, we can't update the state, let's wait until it's set.
+ if (mStateWrapper == null) {
+ return;
+ }
+
// Check incoming state values. If they're already the correct value, return early to prevent
// infinite UpdateState/SetState loop.
ReadableMap currentState = mStateWrapper.getStateData();
do you have patch for ios? it's look for patching android right?
Library version: 2.9.0
React native version: 0.76.0, new architecture enabled
When opening react-native-picker, I get this error in runtime:
This patch seems to fix it:
The text was updated successfully, but these errors were encountered: