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

Touching the middle part of picker (not Icon on the right) crashes the app #237

Closed
khofesh opened this issue Apr 1, 2021 · 30 comments
Closed

Comments

@khofesh
Copy link

khofesh commented Apr 1, 2021

"react": "17.0.1",
"react-native": "0.64.0",
"@react-native-picker/picker": "^1.12.0",

video_2021-04-01_09-14-03.mp4

the error details look the same to this issue (#220)

@GaylordP
Copy link

GaylordP commented Apr 1, 2021

Hello,

I have been facing the same issue since 0.64.

It would be interesting to have a reliable answer on this subject; various users mention solutions but no "official" answer :/

@milule
Copy link

milule commented Apr 2, 2021

I have a same issue too when upgrage react native 0.64

@Naturalclar
Copy link
Contributor

Seems like the issue happens when the picker is combined with other native modules on version 0.64
facebook/react-native#31245

Using picker on a new React Native project (v0.64) works fine
I'll continue to investigate in the issue

@AyyanNiazi
Copy link

I have same issue;
@react-native-picker/picker ^1.14.0
react-native 0.64.0

doesn't matter where I click it cause to crash

@mahmoud2802
Copy link

hello I have same issue

@SaeedBoroo
Copy link

I have same issue;
@react-native-picker/picker ^1.14.0
react-native 0.64.0

when I click Icon picker it works. but when I click another space crashed.

@pdpd123
Copy link

pdpd123 commented Apr 7, 2021

Facing the exact same issue as well

@AlphaJuliettOmega
Copy link

AlphaJuliettOmega commented Apr 8, 2021

:<

Just upgraded to .64 on one branch while a developer added this library on another branch now we have an app crash on a new feature - mega disappointing

Left my comment on the wrong issue, one of these is a duplicate: #221

@AlphaJuliettOmega
Copy link

Hello,

I have been facing the same issue since 0.64.

It would be interesting to have a reliable answer on this subject; various users mention solutions but no "official" answer :/

Would you be able to share any links or insight on possible solutions?

@khofesh
Copy link
Author

khofesh commented Apr 9, 2021

Seems like the issue happens when the picker is combined with other native modules on version 0.64
facebook/react-native#31245

Using picker on a new React Native project (v0.64) works fine
I'll continue to investigate in the issue

You're right.
My picker component works on RN 0.64.
I'm figuring out which component when combined with the picker crashes the app.

@khofesh khofesh closed this as completed Apr 9, 2021
@khofesh khofesh reopened this Apr 9, 2021
@khofesh
Copy link
Author

khofesh commented Apr 9, 2021

So i managed to get the error

###### without gesture handler
java.lang.IllegalArgumentException: Unable to find JSIModule for class UIManager
 at com.facebook.react.bridge.JSIModuleRegistry.getModule(JSIModuleRegistry.java:24)
 at com.facebook.react.bridge.CatalystInstanceImpl.getJSIModule(CatalystInstanceImpl.java:564)
 at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:90)
 at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:46)
 at com.facebook.react.uimanager.UIManagerHelper.getUIManagerForReactTag(UIManagerHelper.java:40)
 at com.facebook.react.animated.NativeAnimatedNodesManager.handleEvent(NativeAnimatedNodesManager.java:505)
 at com.facebook.react.animated.NativeAnimatedNodesManager.onEventDispatch(NativeAnimatedNodesManager.java:483)
 at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:116)
 at com.facebook.react.uimanager.JSTouchDispatcher.handleTouchEvent(JSTouchDispatcher.java:74)
 at com.facebook.react.ReactRootView.dispatchJSTouchEvent(ReactRootView.java:283)
 at com.facebook.react.ReactRootView.onInterceptTouchEvent(ReactRootView.java:201)
 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2646)
 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3141)
 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2746)
 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3141)
 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2746)
 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3141)
 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2746)
 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3141)
 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2746)
 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3141)
 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2746)
 at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:498)
 at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1853)
 at android.app.Activity.dispatchTouchEvent(Activity.java:4059)
 at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
 at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:456)
 at android.view.View.dispatchPointerEvent(View.java:13782)
 at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5816)
 at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5607)
 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5104)
 at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5157)
 at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5123)
 at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5263)
 at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5131)
 at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5320)
 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5104)
 at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5157)
 at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5123)
 at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5131)
 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5104)
 at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7940)
 at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7909)
 at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7860)
 at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8086)
 at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:250)
 at android.os.MessageQueue.nativePollOnce(Native Method)
 at android.os.MessageQueue.next(MessageQueue.java:336)
 at android.os.Looper.loop(Looper.java:181)
 at android.app.ActivityThread.main(ActivityThread.java:7551)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)

@AlphaJuliettOmega
Copy link

The absolutely bizzare thing for me, was that I removed react-native-snap-carousel and implemented my carousel with a different library, some swiper and the error disappeared, just noting here in case it helps anyone.

For whatever reason, the horizontal flatlist or some kind of handler in the other carousel library, caused picker to crash when you click on the label, not the arrow - if you visit the view with the carousel before the view with the picker.

@khofesh
Copy link
Author

khofesh commented Apr 9, 2021

@AlphaJuliettOmega I tried, no luck. It still crashes.
We disable the picker component until we figure this out.

@HishamMubarak
Copy link

The absolutely bizzare thing for me, was that I removed react-native-snap-carousel and implemented my carousel with a different library, some swiper and the error disappeared, just noting here in case it helps anyone.

For whatever reason, the horizontal flatlist or some kind of handler in the other carousel library, caused picker to crash when you click on the label, not the arrow - if you visit the view with the carousel before the view with the picker.

We used the same react-native-snap-carousel package. Commented out wherever we used that package and deleted that package from package.json and tried, Picker is now working without any crash. Switched to react-native-swiper-flatlist and it is working fine alongside react-native-picker

@onmotion
Copy link

I assume it's related to henninghall/react-native-date-picker#301

@java666p
Copy link

Hey are using react-native-tab-view ? For me the same issue started when I upgraded to react-native-tab-view from 2.16.0 to 3.0.0 in my react-native 0.64 project. The picker was crashing when I picked the middle part but when I press only the arrow it works. So I resolved it my case by downgrading back react-native-tab-view to 2.16.0. I think the problem had to do with react-native-tab-view using react-native-pager-view in their latest update.

@jretamalc
Copy link

Same problem here, is there any solution?

@pdpd123
Copy link

pdpd123 commented Apr 20, 2021 via email

@khofesh
Copy link
Author

khofesh commented Apr 20, 2021

I solved it back not upgrading to 0.6 RN. Just curious, why do you have to upgrade from 0.5 to 0.6? I would suggest staying with 0.5.x a bit longer if you can jretamalc @.***>于2021年4月19日 周一下午10:31写道:

Same problem here, is there any solution? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#237 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQNW4UJDPS6TGIHAG4WN3TTJQ5D3ANCNFSM42GBB37Q .

Everytime new version of RN is released, we make new branch, then upgrade RN, and list which works and which doesn't.

@boybeo68
Copy link

Are you using this with @react-navigation? I've just had this same issue since upgrading to 0.64 and found that this problem occurred on screens where I had enabled gestures (gestureEnabled: true in screenOptions).

@onmotion
Copy link

Are you using this with @react-navigation? I've just had this same issue since upgrading to 0.64 and found that this problem occurred on screens where I had enabled gestures (gestureEnabled: true in screenOptions).

Yes, but not turning on gestureEnabled param manually

@Slals
Copy link

Slals commented Apr 27, 2021

Same issue. I think it is not related to react-navigation. When I use the Picker inside a screen it works as expected. But when used inside a modal with Modalize (Bottom modal) there is something that makes the app crash when tapping in the picker. The weird part is that tapping in the bottom arrow in the Picker does not crash the app. It only crashes on real device.

Im on RN 0.64.0 using @react-native-picker/picker 1.15.0

Tried to disable all gesture features on the modal does not avoid the crash.

I dont find real insight in logcat.

@AlphaJuliettOmega
Copy link

@Slals I don't know why, but if you read comments above carefully

react-native-snap-carousel and a certain version of react-native-tab-view cause the picker to hard crash the app with no error message.

I'm using RNN so it's definitely not react-navigation (I don't have react-navigation in my project where I also had the crash.

I'm hoping it's an obscure peer dependency api update that those two crash causing culprits have in common that the picker just needs to be able to sidestep.

@lehaBay
Copy link

lehaBay commented May 9, 2021

I have the the same issue only when picker on same screens with react-native-pager-view.
I'm using:
"react-native": "0.64.0"
"@react-native-picker/picker": "1.15.0",
"react-native-pager-view": "^5.1.5",

@LinusdP
Copy link

LinusdP commented May 17, 2021

Same issue. I think it is not related to react-navigation. When I use the Picker inside a screen it works as expected. But when used inside a modal with Modalize (Bottom modal) there is something that makes the app crash when tapping in the picker. The weird part is that tapping in the bottom arrow in the Picker does not crash the app. It only crashes on real device.

Im on RN 0.64.0 using @react-native-picker/picker 1.15.0

Tried to disable all gesture features on the modal does not avoid the crash.

I dont find real insight in logcat.

I have the same issue in a modal. Pressing the picker on the "text"-part causes the crash but. It worls fine when using the using the icon. It also works fine with Pickers in a normal screen.

I'm on RN 0.64.1.

@khofesh
Copy link
Author

khofesh commented May 17, 2021

I think this needs to be closed..
we'll wait RN-0.65
facebook/react-native#31245 (comment)

facebook/react-native@c317f55

@khofesh khofesh closed this as completed May 17, 2021
@arnaudambro
Copy link

I don't think this issue should be closed.

I also don't think @drneyx deserves all this thumbs down, because for now he is right : that's the only solution !

And finally, I really think this should be documented in the README: don't use RN 0.64 if you want to use react-native-picker/picker

@Dassine
Copy link

Dassine commented Jun 30, 2021

Here is the solution that worked for me:

#225
lawnstarter/react-native-picker-select#442

@suma1892
Copy link

just add enabled={false} and use ref to call Picker

Screen Shot 2021-07-16 at 19 51 15

@on29-dev
Copy link

on29-dev commented May 17, 2022

The only way to handle this bug is using ref and method of ref? Then, why does this props enabled exist? It would be false always.

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