[Gutenberg] Add error boundary components and exception logging#22655
Conversation
|
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr22655-eff477f | |
| Version | 24.4 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | eff477f | |
| App Center Build | WPiOS - One-Offs #9120 |
|
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr22655-eff477f | |
| Version | 24.4 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | eff477f | |
| App Center Build | jetpack-installable-builds #8163 |
| upload_gutenberg_sourcemaps( | ||
| sentry_project_slug: SENTRY_PROJECT_SLUG_WORDPRESS, | ||
| release_version: release_version_current, | ||
| build_version: build_code_current, | ||
| app_identifier: WORDPRESS_BUNDLE_IDENTIFIER | ||
| ) |
There was a problem hiding this comment.
This source map will be used for the App Store builds (beta and production) of the WordPress app.
| upload_gutenberg_sourcemaps( | ||
| sentry_project_slug: SENTRY_PROJECT_SLUG_JETPACK, | ||
| release_version: release_version_current, | ||
| build_version: build_code_current, | ||
| app_identifier: JETPACK_BUNDLE_IDENTIFIER | ||
| ) |
There was a problem hiding this comment.
This source map will be used for the App Store builds (beta and production) of the Jetpack app.
| upload_gutenberg_sourcemaps( | ||
| sentry_project_slug: SENTRY_PROJECT_SLUG_WORDPRESS, | ||
| release_version: release_version_current_internal, | ||
| build_version: build_code_current_internal, | ||
| app_identifier: 'org.wordpress.internal' | ||
| ) |
There was a problem hiding this comment.
This source map will be used for the internal builds of the WordPress app. As far as I checked, this version is seems no longer used.
| upload_gutenberg_sourcemaps( | ||
| sentry_project_slug: sentry_project_slug, | ||
| release_version: release_version_current, | ||
| build_version: build_number, | ||
| app_identifier: app_identifier | ||
| ) |
There was a problem hiding this comment.
This source map will be used for the alpha builds (i.e. installable builds in PRs). The app is determined by the app_identifier parameter.
| # The bundle and source map files are the same for all architectures. | ||
| gutenberg_bundle = File.join(PROJECT_ROOT_FOLDER, "Pods/Gutenberg/Frameworks/Gutenberg.xcframework/ios-arm64/Gutenberg.framework") |
There was a problem hiding this comment.
As specified in the inline comment, the bundle and source map files are included for each architecture. However, both files are the same, as the JavaScript code isn't affected by the architecture. Hence, we can use the files from any of the architectures.
| # Update the matching .inputs.xcfilelist when changing these | ||
| XCFRAMEWORK_BUNDLE_ROOT="$PODS_XCFRAMEWORKS_BUILD_DIR/Gutenberg/Gutenberg.framework" | ||
| PODS_BUNDLE_ROOT="$PODS_ROOT/Gutenberg/bundle/ios" | ||
| LOCAL_BUNDLE="$PODS_ROOT/../../gutenberg-mobile/bundle/ios" |
There was a problem hiding this comment.
When testing a production version of the JS bundle in local builds, I noticed we don't have a quick way to use a local bundle. For this reason, I added a third option to fetch the bundle by pointing to a local path.
There was a problem hiding this comment.
The option to fetch the bundle form $PODS_ROOT/Gutenberg/bundle/ios seems to be deprecated as the library is provided with the XCFramework. We could remove it.
# Conflicts: # Gutenberg/config.yml # Podfile.lock
jhnstn
left a comment
There was a problem hiding this comment.
The test build worked from wordpress-mobile/gutenberg-mobile#6654) worked as expected.
Looks like there are some linting issues but otherwise looks good to go.
Nice work @fluiddot !
The only remaining |


Related PRs:
This PR enables the error boundary at the editor and block level. It also connects Gutenberg Mobile to the Crash logging service in order to log JavaScript exceptions.
Additionally, it uploads to Sentry the JavaScript source map included in the GBM XCFramework.
To test:
Follow testing instructions from wordpress-mobile/gutenberg-mobile#6655.
Regression Notes
Potential unintended areas of impact
None on the user-facing side as this PR mainly implements a new RN bridge function. However, it also adds a step in the build process that if fails might disrupt the release process.
What I did to test those areas of impact (or what existing automated tests I relied on)
I manually tested the build process for alpha builds. I didn't cover beta and app store builds, but the only error I foresee that it might introduce is tagging the source map files with a wrong release version. We'll work with Apps Infra team closely in the release where these changes are introduced to validate the source map files are properly uploaded.
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.Testing checklist: