You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While upgrading an app to RN 0.80.1, I've encountered a crash on Android that only occurs in the new architecture. I can reliably reproduce it in that project, but am unable to share it as the code belongs to my employer. That project uses many libraries, but I've created a reproducer with just a few to help narrow down the cause. While I am able to reproduce it every time in the project I am upgrading, the reproducer triggers it often but not 100% of the time, so it might take many tries before it happens. I have seen this issue both in the Android emulator (for the project I'm upgrading as well as the reproducer) as well as on an actual device (for the project I'm upgrading only).
To run:
Install the dependencies with npm i
Start Metro with npm start
In a new terminal, run the app on Android using npm run android
I believe all of the following must be true for the crash to occur:
The new architecture must be enabled
There must be two TextInput components within a ScrollView
You must type in the first TextInput
The second TextInput must be focused before clicking submit
The submit button must:
Display a Toast using Toast.show (from the react-native-toast-message library)
Attempt to navigate using navigation.popTo or navigation.replace. I have been unable to reproduce it with navigation.navigate (from the react-navigation libraries)
When the app crashes, the Metro logs show nothing other than the websocket disconnecting when the app closes. The stack trace with the exception is captured by Logcat. I've included a recording demonstrating the problem with Logcat in the background in case it is useful, and included the exact stack trace from that recording in this report.
Apologies if this is the wrong place to post this - I'm not totally sure if this is an issue with React Native, React Navigation, or React Native Toast Message as I required all 3 to reproduce this issue. I opted to put it here since I was only able to reproduce the problem with the new architecture enabled. I also searched for existing issues as well as any other users who encountered this but found nothing. If you require any additional information, please let me know. Additionally, if the problem lies with one of the other projects and I'll open an issue there.
Steps to reproduce
Focus the "Title" field, and type some text
Focus the "Description" field
Click the "Submit" button
Note that the crash doesn't occur 100% of the time, and might take many tries to reproduce.
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getId()' on a null object reference
at com.facebook.react.views.scroll.ReactScrollViewHelper.findNextFocusableView(ReactScrollViewHelper.kt:500)
at com.facebook.react.views.scroll.ReactScrollView.focusSearch(ReactScrollView.java:369)
at android.view.ViewGroup.focusSearch(ViewGroup.java:1089)
at android.view.View.focusSearch(View.java:14699)
at android.widget.TextView.hasEditorInFocusSearchDirection(TextView.java:10073)
at android.widget.TextView.onCreateInputConnection(TextView.java:10096)
at androidx.appcompat.widget.AppCompatEditText.onCreateInputConnection(AppCompatEditText.java:270)
at com.facebook.react.views.textinput.ReactEditText.onCreateInputConnection(ReactEditText.kt:341)
at android.view.inputmethod.InputMethodManager.createInputConnection(InputMethodManager.java:5327)
at android.view.inputmethod.InputMethodManager.startInputInner(InputMethodManager.java:3455)
at android.view.inputmethod.InputMethodManager.startInputOnWindowFocusGainInternal(InputMethodManager.java:1126)
at android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.java:3774)
at android.view.inputmethod.InputMethodManager.updateCursorAnchorInfo(InputMethodManager.java:4195)
at android.widget.Editor$CursorAnchorInfoNotifier.updatePosition(Editor.java:4957)
at android.widget.Editor$PositionListener.onPreDraw(Editor.java:3820)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1179)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4418)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3077)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10644)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1570)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1579)
at android.view.Choreographer.doCallbacks(Choreographer.java:1179)
at android.view.Choreographer.doFrame(Choreographer.java:1108)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1553)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:248)
at android.os.Looper.loop(Looper.java:338)
at android.app.ActivityThread.main(ActivityThread.java:9067)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
Description
While upgrading an app to RN 0.80.1, I've encountered a crash on Android that only occurs in the new architecture. I can reliably reproduce it in that project, but am unable to share it as the code belongs to my employer. That project uses many libraries, but I've created a reproducer with just a few to help narrow down the cause. While I am able to reproduce it every time in the project I am upgrading, the reproducer triggers it often but not 100% of the time, so it might take many tries before it happens. I have seen this issue both in the Android emulator (for the project I'm upgrading as well as the reproducer) as well as on an actual device (for the project I'm upgrading only).
To run:
npm inpm startnpm run androidI believe all of the following must be true for the crash to occur:
TextInputcomponents within aScrollViewTextInputTextInputmust be focused before clicking submitToast.show(from thereact-native-toast-messagelibrary)navigation.popToornavigation.replace. I have been unable to reproduce it withnavigation.navigate(from thereact-navigationlibraries)When the app crashes, the Metro logs show nothing other than the websocket disconnecting when the app closes. The stack trace with the exception is captured by Logcat. I've included a recording demonstrating the problem with Logcat in the background in case it is useful, and included the exact stack trace from that recording in this report.
Apologies if this is the wrong place to post this - I'm not totally sure if this is an issue with React Native, React Navigation, or React Native Toast Message as I required all 3 to reproduce this issue. I opted to put it here since I was only able to reproduce the problem with the new architecture enabled. I also searched for existing issues as well as any other users who encountered this but found nothing. If you require any additional information, please let me know. Additionally, if the problem lies with one of the other projects and I'll open an issue there.
Steps to reproduce
Note that the crash doesn't occur 100% of the time, and might take many tries to reproduce.
React Native Version
0.80.1
Affected Platforms
Runtime - Android
Areas
Other (please specify)
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://github.com/BrandonWade/rncrashtest
Screenshots and Videos
rncrashtest.mov