Skip to content

Unhandled JS Exception: TypeError: Cannot read property 'toString' of undefinedThis error is located at:...: Unhandled JS Exception: TypeError: Cannot read property 'toString' of undefined #22432

Closed
WordPress/gutenberg
#58088

Description

@sentry

Sentry Issue: JETPACK-IOS-1871

RCTFatalException: Unhandled JS Exception: TypeError: Cannot read property 'toString' of undefined

This error is located at:
    in I
    in Unknown
    in WithPreferredColorScheme(Component)
    in Unknown
    in WithSelect(WithPreferredColorScheme(Co...: Unhandled JS Exception: TypeError: Cannot read property 'toString' of undefined

This error is located at:
    in I
    in Unknown
    in WithPreferredColorScheme(Component)
 ..., stack:
value@1:3164976
Ua@1:408091
Li@1:414741
Ii@1:414343
ki@1:411424
xt@1:376438
Ce@1:427728
Ne@1:369581
Me@1:369854
receiveTouches@1:422564
value@1:171281
anonymous@1:169781
value@1:170727
value@1:169739

  ?, in RCTFatal
  ?, in -[RCTExceptionsManager reportFatal:stack:exceptionId:extraDataAsJSON:]
  ?, in -[RCTExceptionsManager reportException:]
  ?, in -[RCTModuleMethod invokeWithBridge:module:arguments:]
  ?, in facebook::react::invokeInner
...
(13 additional frame(s) were not displayed)

Activity

  1. added
    Gutenberg
    on Jan 22, 2024
  2. SiobhyB commented on Jan 22, 2024

    @SiobhyB
    Contributor

    Making a note of the symbolicated stack trace for this crash:

    This error is located at:
        in I
        in Unknown
        in WithPreferredColorScheme(Component)
     ..., stack:
    /workdir/gutenberg/packages/block-editor/src/components/rich-text/native/index.native.js:831:RichText#componentDidUpdate
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6499:commitLayoutEffects
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7412:commitRootImpl
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7354:commitRoot
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6992:performSyncWorkOnRoot
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:2145:flushSyncCallbacks
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:8462:batchedUpdatesImpl
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1106:batchedUpdates
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1137:_receiveRootNodeIDEvent
    /workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1209:ReactNativePrivateInterface.RCTEventEmitter.register$argument_0.receiveTouches
    /workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:427:__callFunction
    /workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:__guard$argument_0
    /workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:__guard
    /workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:callFunctionReturnFlushedQueue
    

    I believe it was introduced along with the changes in WordPress/gutenberg#57028 and am further investigating steps to reproduce.

  3. sentry commented on Jan 23, 2024

    @sentry
    Author

    Sentry issue: WORDPRESS-IOS-478V

  4. guarani commented on Jan 29, 2024

    @guarani
    Contributor

    👋 @SiobhyB, Sentry marked this issue as a regression in 24.1 (see events). I see these events are for @salimbraksa and @twstokes. One explanation could be that this happened before the hotfix was merged into the beta. If so, I think marking it resolved in Sentry again for 24.1 makes sense.

  5. SiobhyB commented on Jan 30, 2024

    @SiobhyB
    Contributor

    @guarani, I see the events in Sentry are for the 24.1 beta, but that doesn't currently include the fix. I know Tanner at least reported that the crash was resolved when he tested with 24.0.1 (ref: p1706117596731019/1706113554.934549-slack-C46UQ92RE), which includes the fix that will eventually be incorporated into the 24.1 beta. So, I believe the crash can be marked as resolved. I'll keep following along in case this comes up again when the 24.1 beta is updated.

  6. guarani commented on Jan 30, 2024

    @guarani
    Contributor

    Cool! I marked it as resolved and asked in p8Qyks-8lN-p2#comment-3417 what the timeline is for merging the hotfix back into the beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GutenbergPosting/Editing[Type] Crash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions