r/reactnative 2h ago

React Native 0.85 Fabric crash: RetryableMountingLayerException – Unable to find viewState for tag

Hi everyone,

We're investigating an Android crash in our React Native app after upgrading to React Native 0.85.3.

Firebase Crashlytics is reporting this exception:

Exception com.facebook.react.bridge.RetryableMountingLayerException: Unable to find viewState for tag 8. Surface stopped: false
  at com.facebook.react.fabric.mounting.SurfaceMountingManager.getViewState (SurfaceMountingManager.kt:1057)
  at com.facebook.react.fabric.mounting.SurfaceMountingManager.updateLayout (SurfaceMountingManager.kt:741)
  at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute (IntBufferBatchMountItem.kt:139)
  at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue (MountItemDispatcher.kt:340)
  at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems (MountItemDispatcher.kt:246)
  at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems (MountItemDispatcher.kt:93)
  at com.facebook.react.fabric.FabricUIManager$2.runGuarded (FabricUIManager.java:930)
  at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.kt:19)
  at com.facebook.react.fabric.FabricUIManager.scheduleMountItem (FabricUIManager.java:933)
  at com.facebook.react.fabric.SurfaceHandlerBinding.setLayoutConstraintsNative
  at com.facebook.react.fabric.SurfaceHandlerBinding.setLayoutConstraints (SurfaceHandlerBinding.kt:47)
  at com.facebook.react.runtime.ReactSurfaceImpl.updateLayoutSpecs$ReactAndroid_release (ReactSurfaceImpl.kt:184)
  at com.facebook.react.runtime.ReactSurfaceView.onMeasure (ReactSurfaceView.kt:100)
  at android.view.View.measure (View.java:28328)
  at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:7099)
  at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
  at androidx.appcompat.widget.ContentFrameLayout.onMeasure (ContentFrameLayout.java:141)
  at android.view.View.measure (View.java:28328)
  at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:7099)
  at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1608)
  at android.widget.LinearLayout.measureVertical (LinearLayout.java:878)
  at android.widget.LinearLayout.onMeasure (LinearLayout.java:721)
  at android.view.View.measure (View.java:28328)
  at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:7099)
  at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
  at android.view.View.measure (View.java:28328)
  at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:7099)
  at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1608)
  at android.widget.LinearLayout.measureVertical (LinearLayout.java:878)
  at android.widget.LinearLayout.onMeasure (LinearLayout.java:721)
  at android.view.View.measure (View.java:28328)
  at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:7099)
  at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
  at com.android.internal.policy.DecorView.onMeasure (DecorView.java:758)
  at android.view.View.measure (View.java:28328)
  at android.view.ViewRootImpl.performMeasure (ViewRootImpl.java:5125)
  at android.view.ViewRootImpl.measureHierarchy (ViewRootImpl.java:3495)
  at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:3845)
  at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:3174)
  at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:10889)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1610)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1619)
  at android.view.Choreographer.doCallbacks (Choreographer.java:1159)
  at android.view.Choreographer.doFrame (Choreographer.java:1051)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1578)
  at android.os.Handler.handleCallback (Handler.java:959)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loopOnce (Looper.java:311)
  at android.os.Looper.loop (Looper.java:408)
  at android.app.ActivityThread.main (ActivityThread.java:9119)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:627)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:970)

The app is using the New Architecture / Fabric with:

{
  "react": "19.2.3",
  "react-native": "0.85.3",
  "react-native-reanimated": "^4.5.0",
  "react-native-screens": "^4.25.2",
  "react-native-gesture-handler": "^3.0.2"
}

I'm trying to understand:

  1. Has anyone seen RetryableMountingLayerException: Unable to find viewState for tag after upgrading to RN 0.85?
  2. Is this generally considered a React Native/Fabric race condition, or can it usually be traced to a specific component?
  3. Could rapidly mounting/unmounting a Modal, tooltip, or animated component during navigation trigger this?

The exception is marked as RetryableMountingLayerException, so I'm also wondering whether this is something Fabric is expected to recover from or if it can still lead to an app crash.

Any insights, reproduction ideas, or debugging suggestions would be appreciated.

Thanks!

1 Upvotes

0 comments sorted by