-
-
Notifications
You must be signed in to change notification settings - Fork 537
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android - App is crashing when performing multiple navigations after upgrading RN to 0.76 #2636
Comments
Hey, while you posted an reproduction, the Expensify app is nowhere near minimal reproducible example (MRE). There are tons of custom code & dependencies which might affect the app behaviour. Would you be able to provide me with something more bare bone and closer to MRE that might actually indicate in more convincing way that the issue is related to |
@kkafar Hi, sure, can I share the new error logs: SurfaceMountingManager: Unhandled SoftException
SurfaceMountingManager: java.lang.IllegalStateException: addViewAt: cannot insert view [3620] into parent [3622]: View already has a parent: [3626] Parent: Screen View: ReactViewGroup
SurfaceMountingManager: at com.facebook.react.fabric.mounting.SurfaceMountingManager.addViewAt(SourceFile:139)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute(SourceFile:248)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(SourceFile:54)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(SourceFile:46)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(SourceFile:35)
SurfaceMountingManager: at com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded(SourceFile:95)
SurfaceMountingManager: at com.facebook.react.fabric.GuardedFrameCallback.doFrame(SourceFile:1)
SurfaceMountingManager: at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(SourceFile:37)
SurfaceMountingManager: at com.facebook.react.modules.core.ReactChoreographer.a(SourceFile:1)
SurfaceMountingManager: at com.facebook.react.modules.core.a.doFrame(SourceFile:26)
SurfaceMountingManager: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229)
SurfaceMountingManager: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
SurfaceMountingManager: at android.view.Choreographer.doCallbacks(Choreographer.java:899)
SurfaceMountingManager: at android.view.Choreographer.doFrame(Choreographer.java:827)
SurfaceMountingManager: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
SurfaceMountingManager: at android.os.Handler.handleCallback(Handler.java:942)
SurfaceMountingManager: at android.os.Handler.dispatchMessage(Handler.java:99)
SurfaceMountingManager: at android.os.Looper.loopOnce(Looper.java:201)
SurfaceMountingManager: at android.os.Looper.loop(Looper.java:288)
SurfaceMountingManager: at android.app.ActivityThread.main(ActivityThread.java:7924)
SurfaceMountingManager: at java.lang.reflect.Method.invoke(Native Method)
SurfaceMountingManager: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
SurfaceMountingManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) I think based on error logs we're trying to insert view into a parent view that already has a parent but I am not sure which file is causing this issue And also I've tried to upgrade to the latest versions of react-native-screens and the error still occurs |
And also this issue is not occurring before we upgrade to RN 0.76 for more details here's the PR And the issue only occurs if we perform multiple navigations only in Android native and if I remove the navigation function the error is gone |
Description
When tapping the link inside the chat, the android app is crashing/exits, here's the error log:
Steps to reproduce
npm install
, note: only use NPM instead of bun/yarn/pnpm, because using other package-manager may cause the installation process to failednpm run configure-mapbox
and when asked for mapbox token, use this token:sk.eyJ1IjoiaGF5YXRhIiwiYSI6ImNsbG11NjRqcDI5aDUzZnFsemQ1bzJ6a2sifQ.0w52KN5Ak4AMiwiW-MnWHg
npm run android
https://dev.new.expensify.com:8082/settings/workspaces/D14467B7F87F1292/[email protected]
Bug6713710_1736843501983.Screen_Recording_20250114_153950_Device_care.1.mp4
Snack or a link to a repository
https://github.com/NJ-2020/Expensify/
Screens version
3.35.0
React Native version
0.76.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo managed workflow
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
Emulator Pixel 8 API 35
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: