kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.37k stars 55 forks source link

Error: Exception in HostFunction: expected 1 arguments, got 0 #429

Closed edapess closed 1 month ago

edapess commented 2 months ago

Describe the bug App crashes after start

To Reproduce Update react native to 0.74.0

Screenshots Screenshot_1714466258

Screenshot 2024-04-30 at 12 38 47

Smartphone (please complete the following information):

edapess commented 2 months ago

@kirillzyusko is there any eta for react native 0.74 ?

kirillzyusko commented 2 months ago

Hello @edapess

I was working in this branch for support 0.74 - https://github.com/kirillzyusko/react-native-keyboard-controller/pull/410/files

And I managed to run both apps (paper/fabric) without significant code modifications 🤷‍♂️ Can you try to use the version from this branch and see if it fixes the problem?

edapess commented 2 months ago

@kirillzyusko you mean react-native : "0.74.0-rc.6" ?

kirillzyusko commented 2 months ago

@edapess I meant to try to use chore/react-native-0.74 branch and install react-native-keyboard-controller from github (instead of npm).

edapess commented 2 months ago

@kirillzyusko I tried but it's not working, I think the issue can be related to reanimated version that we have to use in our app.

"react-native-reanimated": "^3.9.0",

Any Idea?

Also I found this PR https://github.com/kirillzyusko/react-native-keyboard-controller/pull/410

kirillzyusko commented 2 months ago

Yes @edapess

Can you try to use a version from the PR you sent? In this PR I'm using REA 3.9.0 so we both should use the same version 😊

edapess commented 2 months ago

@kirillzyusko I tried again, nothing changed, so the error comes from

Screenshot 2024-04-30 at 19 09 23 Screenshot 2024-04-30 at 19 09 23
kirillzyusko commented 2 months ago

Interesting 🤔 What is the version of REA in react-native-keyboard-controller/node_modules/react-native-reanimated?

edapess commented 2 months ago

it's 3.9.0

I found another thing, here is comment

her is issue

I had build issue with new React native version, after resolving it with using various versions, so as the comment mention I had conflicts in gorhom bottom sheet and keyboard controller (

kirillzyusko commented 2 months ago

@edapess it's weird 🤔 Why everything works in my PR? I'm also using bottom-sheet and safe-area-context in my example app.

edapess commented 2 months ago

@kirillzyusko yeeeah, it's weird :////, there is many reports

kirillzyusko commented 2 months ago

Well, I merged a pr with bridgeless support into main

Let's keep this PR open for now. If you want - you can clone this repository and compare project settings with your own project 👀 Maybe it'll help you somehow (but basically everything should be working).

edapess commented 2 months ago

@kirillzyusko Thanks anyway, will try, and will get back here if i find something, maybe it will help somebody else

irekrog commented 2 months ago

Sometimes I get exactly this error, but in React Native 0.73 and reanimated 3.8 and latest version keyboard-controller. It's hard to say what's wrong because the error appears randomly, only on Android.

edapess commented 2 months ago

Hey @irekrog @kirillzyusko I found the problem, in our app we had reanimated in resolutions section, so there was 3.6.1 version, which causes the problem, so check that case. Hope this will help you. So now my reanimated is 3.9.0 and react native is 0.74.0, everything works fine

I had to remove or bump version in resolutions, then delete node modules and install again.

irekrog commented 1 month ago

FYI in my case there was a problem with react-native-code-push :)

kirillzyusko commented 1 month ago

@edapess @irekrog cool, glad we figured out and resolved your problems 😊 I'll close the issue then!