Disables saving react root view from parent#20046
Conversation
|
| App Name | Jetpack |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr20046-66cea78 | |
| Commit | 66cea78 | |
| Direct Download | jetpack-prototype-build-pr20046-66cea78.apk |
|
| App Name | WordPress |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr20046-66cea78 | |
| Commit | 66cea78 | |
| Direct Download | wordpress-prototype-build-pr20046-66cea78.apk |
|
Hey there @antonis 👋 I'm trying to reproduce the crash in the production app but I'm not able to with the testing devices I have, maybe I'm missing a step? I opened a large post and changed the orientation a few times. I tested with:
I'm using a post that has 339 blocks, 8923 words, and 551131 characters, maybe it needs to be larger? Let me know if I'm missing something, thank you! |
|
Thank you for taking the time to have a look at this @geriux 🙇
I have trouble reproducing this consistently myself. I'll construct some test data and steps that reproduce the crash more often and get back to you. |
|
Hey @geriux 👋 My understanding due to the frequency of this crash is that it should occur a lot simpler on some device setups or with the "right" content 🤷♂️ |
geriux
left a comment
There was a problem hiding this comment.
LGTM! Friendly reminder we need to release an alpha tag in Gutenberg Mobile once the other PRs have been merged. Let me know if I can help with that, thank you!
|
Thank you for reviewing this and the dependency PRs @geriux 🙇
Thank you for the heads up! I'll start the merge process and ping you for help if needed 😅 |
# Conflicts: # build.gradle
|
Found 1 violations: The PR caused the following dependency changes: \--- project :libs:editor
- \--- org.wordpress.gutenberg-mobile:react-native-gutenberg-bridge:v1.112.0-alpha4
- +--- com.facebook.fresco:animated-gif:2.0.0
- | +--- com.parse.bolts:bolts-tasks:1.4.0
- | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.4 (*)
- | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | \--- com.facebook.fresco:animated-base:2.0.0
- | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0 (*)
- | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
- | +--- com.facebook.fresco:animated-drawable:2.0.0
- | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
- | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0 (*)
- | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | \--- com.parse.bolts:bolts-tasks:1.4.0
- +--- com.google.android.material:material:1.2.1 -> 1.9.0 (*)
- +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-6
- | +--- com.google.android.exoplayer:exoplayer:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
- | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | | | \--- com.google.guava:guava:27.1-android
- | | | | +--- com.google.guava:failureaccess:1.0.1
- | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
- | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
- | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
- | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | | \--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
- | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | | \--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.3.0 (*)
- | | \--- androidx.media:media:1.2.1 (*)
- | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | +--- androidx.core:core:1.1.0 -> 1.10.0 (*)
- | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
- | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
- | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
- | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.11.0 (*)
- | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.11.0 (*)
- +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-4
- +--- org.wordpress.react-native-libraries.v4:react-native-get-random-values:1.4.0
- +--- org.wordpress.react-native-libraries.v4:react-native-safe-area-context:4.6.3
- | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.9.10 (*)
- +--- org.wordpress.react-native-libraries.v4:react-native-screens:3.22.0
- | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 -> 1.9.10 (*)
- | +--- androidx.appcompat:appcompat:1.4.1 -> 1.6.1 (*)
- | +--- androidx.fragment:fragment:1.3.6 -> 1.6.2 (*)
- | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
- | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
- | +--- com.google.android.material:material:1.1.0 -> 1.9.0 (*)
- | \--- androidx.core:core-ktx:1.5.0 -> 1.10.0 (*)
- +--- org.wordpress.react-native-libraries.v4:react-native-svg:13.9.0
- +--- org.wordpress.react-native-libraries.v4:react-native-webview:11.26.1
- | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.10 (*)
- | \--- androidx.webkit:webkit:1.4.0 -> 1.7.0 (*)
- +--- org.wordpress.react-native-libraries.v4:react-native-masked-view:0.2.9
- +--- org.wordpress.react-native-libraries.v4:react-native-clipboard:1.11.2
- +--- org.wordpress.react-native-libraries.v4:react-native-fast-image:8.5.11
- | +--- com.github.bumptech.glide:glide:4.12.0 -> 4.15.1
- | | +--- com.github.bumptech.glide:gifdecoder:4.15.1
- | | | \--- androidx.annotation:annotation:1.3.0 -> 1.6.0 (*)
- | | +--- com.github.bumptech.glide:disklrucache:4.15.1
- | | +--- com.github.bumptech.glide:annotations:4.15.1
- | | +--- androidx.fragment:fragment:1.3.6 -> 1.6.2 (*)
- | | +--- androidx.vectordrawable:vectordrawable-animated:1.1.0 (*)
- | | +--- androidx.exifinterface:exifinterface:1.3.3 -> 1.3.6 (*)
- | | \--- androidx.tracing:tracing:1.0.0 -> 1.1.0 (*)
- | \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
- | +--- com.github.bumptech.glide:glide:4.12.0 -> 4.15.1 (*)
- | +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.11.0 (*)
- | \--- androidx.annotation:annotation:1.0.0 -> 1.6.0 (*)
- +--- org.wordpress.react-native-libraries.v4:react-native-reanimated:2.17.0
- +--- org.wordpress.react-native-libraries.v4:react-native-gesture-handler:2.10.2
- | +--- org.wordpress.react-native-libraries.v4:react-native-reanimated:2.17.0
- | +--- androidx.appcompat:appcompat:1.4.1 -> 1.6.1 (*)
- | +--- androidx.core:core-ktx:1.6.0 -> 1.10.0 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.9.10 (*)
- +--- org.wordpress.react-native-libraries.v4:react-native-linear-gradient:2.7.3
- +--- org.wordpress.gutenberg-mobile:react-native-aztec:v1.112.0-alpha4
- | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
- | +--- androidx.gridlayout:gridlayout:1.0.0
- | | +--- androidx.core:core:1.0.0 -> 1.10.0 (*)
- | | \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
- | +--- androidx.cardview:cardview:1.0.0 (*)
- | +--- androidx.appcompat:appcompat:1.2.0 -> 1.6.1 (*)
- | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.3.0 (*)
- | +--- org.wordpress:aztec:v1.9.0 -> v2.0 (*)
- | +--- org.wordpress.aztec:wordpress-shortcodes:v1.9.0 -> v2.0 (*)
- | +--- org.wordpress.aztec:wordpress-comments:v1.9.0 -> v2.0 (*)
- | +--- org.wordpress.aztec:glide-loader:v1.9.0
- | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
- | | +--- org.wordpress:aztec:v1.9.0 -> v2.0 (*)
- | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.15.1 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
- \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
+ \--- org.wordpress.gutenberg-mobile:react-native-gutenberg-bridge:v1.112.0-alpha5
+ +--- com.facebook.fresco:animated-gif:2.0.0
+ | +--- com.parse.bolts:bolts-tasks:1.4.0
+ | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.4 (*)
+ | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | \--- com.facebook.fresco:animated-base:2.0.0
+ | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0 (*)
+ | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+ | +--- com.facebook.fresco:animated-drawable:2.0.0
+ | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+ | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0 (*)
+ | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | \--- com.parse.bolts:bolts-tasks:1.4.0
+ +--- com.google.android.material:material:1.2.1 -> 1.9.0 (*)
+ +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-6
+ | +--- com.google.android.exoplayer:exoplayer:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
+ | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | | | \--- com.google.guava:guava:27.1-android
+ | | | | +--- com.google.guava:failureaccess:1.0.1
+ | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+ | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
+ | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | | \--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
+ | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | | \--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.3.0 (*)
+ | | \--- androidx.media:media:1.2.1 (*)
+ | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | +--- androidx.core:core:1.1.0 -> 1.10.0 (*)
+ | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
+ | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+ | | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+ | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.11.0 (*)
+ | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.11.0 (*)
+ +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-4
+ +--- org.wordpress.react-native-libraries.v4:react-native-get-random-values:1.4.0
+ +--- org.wordpress.react-native-libraries.v4:react-native-safe-area-context:4.6.3
+ | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.9.10 (*)
+ +--- org.wordpress.react-native-libraries.v4:react-native-screens:3.22.0
+ | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 -> 1.9.10 (*)
+ | +--- androidx.appcompat:appcompat:1.4.1 -> 1.6.1 (*)
+ | +--- androidx.fragment:fragment:1.3.6 -> 1.6.2 (*)
+ | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
+ | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
+ | +--- com.google.android.material:material:1.1.0 -> 1.9.0 (*)
+ | \--- androidx.core:core-ktx:1.5.0 -> 1.10.0 (*)
+ +--- org.wordpress.react-native-libraries.v4:react-native-svg:13.9.0
+ +--- org.wordpress.react-native-libraries.v4:react-native-webview:11.26.1
+ | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.10 (*)
+ | \--- androidx.webkit:webkit:1.4.0 -> 1.7.0 (*)
+ +--- org.wordpress.react-native-libraries.v4:react-native-masked-view:0.2.9
+ +--- org.wordpress.react-native-libraries.v4:react-native-clipboard:1.11.2
+ +--- org.wordpress.react-native-libraries.v4:react-native-fast-image:8.5.11
+ | +--- com.github.bumptech.glide:glide:4.12.0 -> 4.15.1
+ | | +--- com.github.bumptech.glide:gifdecoder:4.15.1
+ | | | \--- androidx.annotation:annotation:1.3.0 -> 1.6.0 (*)
+ | | +--- com.github.bumptech.glide:disklrucache:4.15.1
+ | | +--- com.github.bumptech.glide:annotations:4.15.1
+ | | +--- androidx.fragment:fragment:1.3.6 -> 1.6.2 (*)
+ | | +--- androidx.vectordrawable:vectordrawable-animated:1.1.0 (*)
+ | | +--- androidx.exifinterface:exifinterface:1.3.3 -> 1.3.6 (*)
+ | | \--- androidx.tracing:tracing:1.0.0 -> 1.1.0 (*)
+ | \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
+ | +--- com.github.bumptech.glide:glide:4.12.0 -> 4.15.1 (*)
+ | +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.11.0 (*)
+ | \--- androidx.annotation:annotation:1.0.0 -> 1.6.0 (*)
+ +--- org.wordpress.react-native-libraries.v4:react-native-reanimated:2.17.0
+ +--- org.wordpress.react-native-libraries.v4:react-native-gesture-handler:2.10.2
+ | +--- org.wordpress.react-native-libraries.v4:react-native-reanimated:2.17.0
+ | +--- androidx.appcompat:appcompat:1.4.1 -> 1.6.1 (*)
+ | +--- androidx.core:core-ktx:1.6.0 -> 1.10.0 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.9.10 (*)
+ +--- org.wordpress.react-native-libraries.v4:react-native-linear-gradient:2.7.3
+ +--- org.wordpress.gutenberg-mobile:react-native-aztec:v1.112.0-alpha5
+ | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
+ | +--- androidx.gridlayout:gridlayout:1.0.0
+ | | +--- androidx.core:core:1.0.0 -> 1.10.0 (*)
+ | | \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
+ | +--- androidx.cardview:cardview:1.0.0 (*)
+ | +--- androidx.appcompat:appcompat:1.2.0 -> 1.6.1 (*)
+ | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.3.0 (*)
+ | +--- org.wordpress:aztec:v1.9.0 -> v2.0 (*)
+ | +--- org.wordpress.aztec:wordpress-shortcodes:v1.9.0 -> v2.0 (*)
+ | +--- org.wordpress.aztec:wordpress-comments:v1.9.0 -> v2.0 (*)
+ | +--- org.wordpress.aztec:glide-loader:v1.9.0
+ | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
+ | | +--- org.wordpress:aztec:v1.9.0 -> v2.0 (*)
+ | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.15.1 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
+ \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
Please review and act accordingly
|


Partially/Fixes #9685
Related PRs:
Gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#6575
Gutenberg PR: WordPress/gutenberg#58266
Description
This PR attempts to resolve the
TransactionTooLargeExceptionoccurring due to the large view data on large post (internal ref: p9ugOq-4my-p2#comment-7997) by disabling saving the react native view hierarchy.The crash is reproduced in big posts that result in a big
Bundledue to the largeandroid:viewHierarchyStateandandroidx.lifecycle.BundlableSavedStateRegistry.key. An example crash stack trace is the following:The fix applied prevents the EditPostActivity.onSaveInstanceState method from saving the view hierarchy below ReactRootView resulting in a consistently small
Bundleregardless of the post size.For comparison this is the Bundle of a post before and with the fix applied on this PR. The https://github.com/guardian/toolargetool can also be used to compare the Bundle sizes before and after (handy patch toolargetool.patch)
To Test:
(*)Steps to create a new post that reproduces the crash
The following steps reproduced the crash consistently on the latest version of the app on my Pixel 5 / Android 14 (recording):
production.toolargecrash.mp4
Notes
🧪 Though I've tested the fix for side effect I consider it safer to land on the next version (not the beta) to be tested extensively along the gutenberg-mobile library.
⚠️ Do not merge before wordpress-mobile/gutenberg-mobile#6575 and WordPress/gutenberg#58266 that this PR is based on.
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
RELEASE-NOTES.txtif necessary.UI Changes Testing Checklist: