Skip to content

Conversation

@antonis
Copy link
Member

@antonis antonis commented Jan 25, 2024

Related PRs:
WordPress-Android PR: wordpress-mobile/WordPress-Android#20046
Gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#6575

What?

The introduced change prevents the EditPostActivity.onSaveInstanceState method of the Android app from saving the React Native view hierarchy.

Why?

This PR attempts to resolve the TransactionTooLargeException Android crash occurring due to the large view data on large post (see wordpress-mobile/WordPress-Android#9685).

How?

The change applied prevents the EditPostActivity.onSaveInstanceState method from saving the view hierarchy below ReactRootView resulting in a consistently small Bundle regardless of the post size.
For comparison this is the Bundle of a post before and with the fix applied on this PR

Testing Instructions

See wordpress-mobile/WordPress-Android#20046

@antonis antonis added [Type] Bug An existing feature does not function as intended Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Jan 25, 2024
@antonis antonis added the [Status] In Progress Tracking issues with work in progress label Jan 25, 2024
@antonis antonis changed the title [Mobile] Disables saving react root view from parent [RNMobile] Disables saving react root view from parent Jan 26, 2024
@antonis antonis added this to the Gutenberg 17.7 milestone Jan 26, 2024
@antonis antonis requested a review from geriux January 26, 2024 15:35
@antonis antonis marked this pull request as ready for review January 26, 2024 15:35
@antonis antonis removed the [Status] In Progress Tracking issues with work in progress label Jan 26, 2024
Copy link
Member

@geriux geriux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I was able to reproduce the crash following these steps and then confirmed it stopped crashing with these changes 🎉

I didn't see any undesired side-effects.

@antonis antonis merged commit f4f0b0c into trunk Jan 30, 2024
@antonis antonis deleted the fix/android-disable-reactview-saving branch January 30, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants