From 6915fce8980ade286f7f01397003710c742b7a3c Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Tue, 10 May 2022 16:45:31 -0700 Subject: [PATCH] Log more metadata when throwing error for non-existent viewState Summary: Collecting more telemetry to address or debug T112157805 further. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D36295635 fbshipit-source-id: 7896d641a0a745537c8dedf25f44913f47b83876 --- .../facebook/react/fabric/mounting/SurfaceMountingManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 f1d28f26bf5..94b06743bb1 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 @@ -1017,7 +1017,8 @@ public class SurfaceMountingManager { private @NonNull ViewState getViewState(int tag) { ViewState viewState = mTagToViewState.get(tag); if (viewState == null) { - throw new RetryableMountingLayerException("Unable to find viewState for tag " + tag); + throw new RetryableMountingLayerException( + "Unable to find viewState for tag " + tag + ". Surface stopped: " + isStopped()); } if (ReactFeatureFlags.enableDelayedViewStateDeletion) { mScheduledForDeletionViewStateTags.remove(tag);