diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java index 0231061f4a2d30..d5d937f8eda26c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java @@ -147,7 +147,14 @@ public void run() { return; } - if (rootView.getId() != View.NO_ID) { + if (rootView.getId() == mSurfaceId) { + ReactSoftException.logSoftException( + TAG, + new IllegalViewOperationException( + "Race condition in addRootView detected. Trying to set an id of [" + + mSurfaceId + + "] on the RootView, but that id has already been set. ")); + } else if (rootView.getId() != View.NO_ID) { FLog.e( TAG, "Trying to add RootTag to RootView that already has a tag: existing tag: [%d] new tag: [%d]",