Skip to content

Commit 3d119ac

Browse files
javachemeta-codesync[bot]
authored andcommitted
Error: android_crash:com.facebook.react.bridge.RetryableMountingLayerException:com.facebook.react.fa
Reviewed By: cortinico Differential Revision: D95793355 fbshipit-source-id: 27faff3c27430c8148f5d5bb97f2d2e5e5f82cb9
1 parent 455c49c commit 3d119ac

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,13 +739,20 @@ internal constructor(
739739
return
740740
}
741741

742-
val viewState = getViewState(reactTag)
742+
val viewState = getNullableViewState(reactTag)
743+
if (viewState == null) {
744+
ReactSoftExceptionLogger.logSoftException(
745+
ReactSoftExceptionLogger.Categories.SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE,
746+
ReactNoCrashSoftException("Unable to find viewState for tag $reactTag for updateLayout"),
747+
)
748+
return
749+
}
743750
// Do not layout Root Views
744751
if (viewState.isRoot) {
745752
return
746753
}
747754

748-
val viewToUpdate = checkNotNull(viewState.view) { "Unable to find View for tag: $reactTag" }
755+
val viewToUpdate = viewState.view ?: return
749756

750757
viewToUpdate.layoutDirection =
751758
when (layoutDirection) {

0 commit comments

Comments
 (0)