Skip to content

fix(Fabric, iOS): soften the _props subclass assert in RCTViewComponentView.updateProps - #59142

Open
talha7k wants to merge 1 commit into
react:mainfrom
talha7k:fix/soften-view-component-props-assert
Open

talha7k wants to merge 1 commit into
react:mainfrom
talha7k:fix/soften-view-component-props-assert

Conversation

@talha7k

@talha7k talha7k commented Oct 16, 2026

Copy link
Copy Markdown

Summary

Third-party Fabric component views that reset _props to base ViewProps in prepareForRecycle (observed with react-native-maps' RNMapsGoogleMapView) can receive updateProps with base ViewProps on the deep-link mount path (RN 0.88 + new arch). The current RCTAssert aborts the whole app on this diagnostic-only invariant (SIGABRT via NSInternalInconsistencyException).

The static_casts immediately below are to const ViewProps & and are valid for base ViewProps, so mounting can continue safely. This changes the assert to an RCTLogError so the condition remains visible in logs while the app survives.

Repro

expo-router deep link directly to a screen containing a Google Map while a recycled map view is being re-prepared. App aborts with:

NSInternalInconsistencyException: '`RCTViewComponentView` subclasses
(and `RNMapsGoogleMapView` particularly) must setup `_props` instance
variable with a default value in the constructor.'

Crash logs show -[RCTViewComponentView updateProps:oldProps:]. In-session navigation to the same screen works; the abort is specific to the deep-link mount transaction.

A companion fix that guards RNMapsGoogleMapView.updateProps against the null/base-props input is upstreamed to react-native-maps: react-native-maps/react-native-maps#6036

Changelog

[iOS] [Fixed] Soften the _props subclass assert in RCTViewComponentView.updateProps to an error log, preventing app aborts when third-party component views reset _props during recycle.

…nentView.updateProps

Third-party Fabric component views that reset `_props` to base ViewProps in
`prepareForRecycle` (observed with react-native-maps' `RNMapsGoogleMapView`)
can receive `updateProps` with base `ViewProps` on the deep-link mount path
(RN 0.88 + new arch). The current RCTAssert aborts the whole app on this
diagnostic-only invariant (SIGABRT via NSInternalInconsistencyException),
taking down production and dev sessions over a recoverable condition.

The static_casts immediately below are to `const ViewProps &` and are valid
for base ViewProps, so mounting can continue safely. This changes the assert
to an RCTLogError so the condition is still visible in logs while the app
survives.

Repro: expo-router deep link directly to a screen containing a Google Map
while a recycled map view is being re-prepared; app aborts with
NSInternalInconsistencyException `...must setup `_props`...` (crash logs
show -[RCTViewComponentView updateProps:oldProps:]).

Changelog: [iOS] [Fixed] Soften the _props subclass assert in
RCTViewComponentView.updateProps to an error log
@meta-cla

meta-cla Bot commented Oct 16, 2026

Copy link
Copy Markdown

Hi @talha7k!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@github-actions

Copy link
Copy Markdown

Warning

Missing Test Plan

Please add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.

Caution

Missing Changelog

Please add a Changelog to your PR description. See Changelog format

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant