You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch to HTML mode and copy the following HTML code:
<!-- wp:jetpack/paywall /-->
Switch back to Visual mode.
Save the page.
Close the editor and open the page again.
Observe the crash.
Sentry event
RCTFatalException: Unhandled JS Exception: TypeError: Cannot read property 'getEditWrapperProps' of undefined
This error is located at:
in Unknown
in IfCondition(Component)
in WithDispatch(IfCondition(Component))
in Unknown
in Pure(...: Unhandled JS Exception: TypeError: Cannot read property 'getEditWrapperProps' of undefined
This error is located at:
in Unknown
in IfCondition(Component)
in WithD..., stack:
anonymous@1:3084941
Or@1:384619
Ma@1:425196
zi@1:411868
Ri@1:411770
Pi@1:411654
ki@1:409154
xt@1:374279
Ce@1:425569
Ne@1:367422
Me@1:367695
receiveEvent@1:420135
value@1:169131
anonymous@1:167631
value@1:168577
value@1:167589
?, in RCTFatal
?, in -[RCTExceptionsManager reportFatal:stack:exceptionId:extraDataAsJSON:]
?, in -[RCTExceptionsManager reportException:]
?, in -[RCTModuleMethod invokeWithBridge:module:arguments:]
?, in facebook::react::invokeInner
...
(14 additional frame(s) were not displayed)
The text was updated successfully, but these errors were encountered:
I was able to reproduce this on both platforms following the steps above, but it seems like a rare circumstance. I did not note any other sentry events that weren't from internal testing, but I could have missed them within the grouped Sentry issue.
I traced the exception back to this code in block.native.js, where blockType.getWrapperEditProps was being accessed when blockType did not exist. I then noted the web implementation adds logic to check if blockTypes exists before getting wrapperProps.
The fix proposed in WordPress/gutenberg#56846 prevents the crash and improves alignment with web behavior. I'm wondering if it's the best fix, however, as we haven't encountered this error with other blocks. It may have something to do with the <!-- wp:jetpack/paywall /--> block name, and these changes to unregister this block when the postType is a page: Automattic/jetpack@014b087. I tried investigating from the Jetpack side within the paywall block, but did not note anything that would resolve the crash.
@fluiddot@geriux I requested review on the PR if you have any suggestions.
Sentry Issue: JETPACK-IOS-16B9
Symbolicated stack trace
Steps to reproduce it
Sentry event
The text was updated successfully, but these errors were encountered: