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.54k stars 61 forks source link

🐛App Crashes with "ReanimatedCommitMarker: assertion failed" in Official Example on Android Using React Native New Architecture #394

Closed tcloudAce closed 3 months ago

tcloudAce commented 5 months ago

Environment

Description While running the official example provided by the react-native-keyboard-controller library on an Android emulator configured with React Native's New Architecture, I encountered an app crash. The issue occurs when interacting with the KeyboardAwareScrollView and clicking on the bottom input field. This action leads to an immediate crash with the following error message:

ReanimatedCommitMarker: assertion failed (reanimatedCommitFlag_ != true)

Steps to Reproduce

  1. Clone or download the official example from the react-native-keyboard-controller GitHub repository.
  2. Setup an Android emulator.
  3. Ensure the setup is configured for React Native's New Architecture.
  4. Run the example project within this environment.
  5. Navigate to the KeyboardAwareScrollView component example.
  6. Attempt to click on the bottom input field.

Expected Behavior Upon clicking the bottom TextInput, the keyboard should appear normally, and the clicked TextInput should smoothly slide up, ensuring it is not obscured by the keyboard. This would allow for a seamless interaction with the keyboard functionality within the app.

Actual Behavior Upon attempting to interact with the bottom input field within KeyboardAwareScrollView, the app crashes immediately, displaying the error mentioned above.

kirillzyusko commented 5 months ago

@tcloudAce thanks! I think that's something that I experienced as well but didn't have a time for proper investigation 👀

Thank you for providing additional logs - I'll look into this problem 👍

May I ask your emulator configuration as well? Because I tested on real devices and I haven't seen any messages on screen or in metro bundler - have you seen this error in logcat?

tcloudAce commented 5 months ago

@kirillzyusko I'm using the Flipper Crash Reporter plugin. Additionally, I've tested using the Android Studio's built-in emulator with Android versions 28, 31, and 34, and the results were the same across all versions.

kirillzyusko commented 4 months ago

Hey @tcloudAce

I've tested RN 0.74 with REA 3.9.0 and it lloks like the issue has gone. May I kindly ask you to test https://github.com/kirillzyusko/react-native-keyboard-controller/pull/410 in your environment and let me know if it indeed fixed the problem?

kirillzyusko commented 3 months ago

I'm closing this issue, because the crash is not happening in RN 0.74.

The KASV still not working properly on new arch + android (sometimes a flick happens for one frame), but it's a different issue and I would like to handle these issues separately, so I'm closing this issue.