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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tcloudAce opened this issue Mar 20, 2024 · 4 comments
Assignees
Labels
馃 android Android specific 馃摎 components Anything related to the exported components of this library 馃幆 crash Library triggers a crash of the app 馃彮 fabric Changes specific to new (fabric/jsi) architecture

Comments

@tcloudAce
Copy link

Environment

  • Library Version: latest version
  • React Native Version: 0.73.6
  • Platform: Android
  • Device: Android Emulator
  • React Native Architecture: New Architecture (Fabric)

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
Copy link
Owner

kirillzyusko commented Mar 20, 2024

@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?

@kirillzyusko kirillzyusko added 馃 android Android specific 馃彮 fabric Changes specific to new (fabric/jsi) architecture 馃幆 crash Library triggers a crash of the app 馃摎 components Anything related to the exported components of this library labels Mar 20, 2024
@tcloudAce
Copy link
Author

tcloudAce commented Mar 21, 2024

@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
Copy link
Owner

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 #410 in your environment and let me know if it indeed fixed the problem?

kirillzyusko added a commit that referenced this issue Apr 30, 2024
## 馃摐 Description

Updated `react-native` to `0.74` (wich has bridgeless mode enabled by
default in new arch).

## 馃挕 Motivation and Context

We need to support bridgeless mode.

Main changes to make fabric working were:
- change a context from which we emit an event (event emitter, not
dispatcher);
- remove checks for `_jsThread` on iOS (since it's bridgeless mode ->
these variable will be always `false`);

Also in this PR I had to remove flipper integration to speed up delivery
of this PR. Later on I'll probably add this integration back.

Closes
#429
#394

## 馃摙 Changelog

### JS

- bumed deps;

### iOS

- removed `_jsThread` check as in Fabric it'll be always `false`;

### Android

- change context for emitting events (now we need to use appContext);

## 馃 How Has This Been Tested?

tested locally + on CI using both architectures.

## 馃摳 Screenshots (if appropriate):

Everything works as before 馃檭 

## 馃摑 Checklist

- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
@kirillzyusko
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃 android Android specific 馃摎 components Anything related to the exported components of this library 馃幆 crash Library triggers a crash of the app 馃彮 fabric Changes specific to new (fabric/jsi) architecture
Projects
None yet
Development

No branches or pull requests

2 participants