Repository navigation
Conversation
…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
|
Hi @talha7k! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
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. |
Summary
Third-party Fabric component views that reset
_propsto base ViewProps inprepareForRecycle(observed with react-native-maps'RNMapsGoogleMapView) can receiveupdatePropswith baseViewPropson the deep-link mount path (RN 0.88 + new arch). The currentRCTAssertaborts the whole app on this diagnostic-only invariant (SIGABRT viaNSInternalInconsistencyException).The
static_casts immediately below are toconst ViewProps &and are valid for base ViewProps, so mounting can continue safely. This changes the assert to anRCTLogErrorso 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:
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.updatePropsagainst the null/base-props input is upstreamed to react-native-maps: react-native-maps/react-native-maps#6036Changelog
[iOS] [Fixed] Soften the
_propssubclass assert inRCTViewComponentView.updatePropsto an error log, preventing app aborts when third-party component views reset_propsduring recycle.