Skip to content

[0.86] Handle missing viewState gracefully in SurfaceMountingManager.updateState and updatePadding #1398

Description

@ryan-saffer

Target Branch

0.86

Link to commit or PR to be picked

react/react-native#57181

Description

React Native 0.86 currently crashes on Android when a stale INSTRUCTION_UPDATE_STATE or INSTRUCTION_UPDATE_PADDING operation reaches a removed Fabric view tag through IntBufferBatchMountItem. Because this batch item does not support retry handling, RetryableMountingLayerException escapes and terminates the application.

This exact crash is occurring in production on React Native 0.86.2. The upstream fix was developed for the same production crash in Meta’s Oculus application and is a focused, non-breaking change to two view-state lookups.

The commit applies cleanly to React Native 0.86.2 and has been verified by compiling ReactAndroid and Hermes into an Android application. Without a backport, Expo SDK 57 applications must build React Native from source to consume the fix, significantly increasing Android build time and pipeline complexity.

Please consider cherry-picking this commit into the supported 0.86 branch for a future 0.86.4 patch release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type Pick RequestPick requests to include commits inside a React Native release

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions