Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions patches/react-native/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@

### [react-native+0.85.3+025+log-soft-exception-if-viewState-not-found.patch](react-native+0.85.3+025+log-soft-exception-if-viewState-not-found.patch)

- Reason: This patch prevents app crashes by soft-logging the exception when JS try to send events to native views even if they are removed from view hierarchy. The approach follows existing patterns in the same file where similar events are already handled this way and is based on suggestions from other developers in upstream discussions.
- Upstream PR/issue: [#49077](https://github.com/facebook/react-native/issues/49077) [#7493](https://github.com/software-mansion/react-native-reanimated/issues/7493)
- E/App issue: [#82611](https://github.com/Expensify/App/issues/82611)
- Reason: This patch prevents app crashes by soft-logging missing view-state exceptions when JS sends events or Fabric mount instructions for native views that have already been removed from the hierarchy. It includes the upstream `updateOverflowInset` guard so stale batch mount items return safely instead of throwing `RetryableMountingLayerException`.
- Upstream PR/issue: [#49077](https://github.com/facebook/react-native/issues/49077) [#56762](https://github.com/facebook/react-native/pull/56762) [#7493](https://github.com/software-mansion/react-native-reanimated/issues/7493)
- E/App issues: [#82611](https://github.com/Expensify/App/issues/82611) [#93833](https://github.com/Expensify/App/issues/93833)
- PR introducing patch: [#84303](https://github.com/Expensify/App/pull/84303)

### [react-native+0.85.3+026+fix-view-stealing-first-responder.patch](react-native+0.85.3+026+fix-view-stealing-first-responder.patch)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt
index eb0b519..50bffae 100644
index eb0b519..1ddcbe2 100644
--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt
+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt
@@ -281,15 +281,33 @@ internal constructor(
Expand Down Expand Up @@ -75,3 +75,18 @@ index eb0b519..50bffae 100644
// Do not layout Root Views
if (viewState.isRoot) {
return
@@ -840,4 +876,13 @@ internal constructor(
- val viewState = getViewState(reactTag)
+ val viewState = getNullableViewState(reactTag)
+ if (viewState == null) {
+ ReactSoftExceptionLogger.logSoftException(
+ ReactSoftExceptionLogger.Categories.SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE,
+ ReactNoCrashSoftException(
+ "Unable to find viewState for tag $reactTag for updateOverflowInset"
+ ),
+ )
+ return
+ }
// Do not layout Root Views
if (viewState.isRoot) {
return
Loading