react-native-keyboard-controller icon indicating copy to clipboard operation
react-native-keyboard-controller copied to clipboard

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

Open edapess opened this issue 9 months ago • 15 comments

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):

  • Desktop OS: Mac OS 14.4.1
  • Device: Pixel 8
  • OS: Android
  • RN version: 0.74.0
  • JS engine: Hermes
  • Library version: ^1.11.7

edapess avatar Apr 30 '24 08:04 edapess

@kirillzyusko is there any eta for react native 0.74 ?

edapess avatar Apr 30 '24 09:04 edapess

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?

kirillzyusko avatar Apr 30 '24 09:04 kirillzyusko

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

edapess avatar Apr 30 '24 10:04 edapess

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

kirillzyusko avatar Apr 30 '24 11:04 kirillzyusko

@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

edapess avatar Apr 30 '24 13:04 edapess

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 😊

kirillzyusko avatar Apr 30 '24 14:04 kirillzyusko

@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

edapess avatar Apr 30 '24 15:04 edapess

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

kirillzyusko avatar Apr 30 '24 15:04 kirillzyusko

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 (

edapess avatar Apr 30 '24 15:04 edapess

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

kirillzyusko avatar Apr 30 '24 16:04 kirillzyusko

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

edapess avatar Apr 30 '24 16:04 edapess

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).

kirillzyusko avatar Apr 30 '24 16:04 kirillzyusko

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

edapess avatar Apr 30 '24 16:04 edapess

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.

irekrog avatar May 03 '24 08:05 irekrog

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.

edapess avatar May 03 '24 09:05 edapess

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

irekrog avatar May 08 '24 06:05 irekrog

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

kirillzyusko avatar May 08 '24 08:05 kirillzyusko