Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCTFatalException: Unhandled JS Exception: TypeError: Cannot read property 'width' of undefinedThis error is located at: ...: Unhandled JS Exception: TypeError: Cannot read property 'width' of undefined #6100

Closed
guarani opened this issue Aug 23, 2023 · 9 comments · Fixed by WordPress/gutenberg#54035
Assignees

Comments

@guarani
Copy link
Contributor

guarani commented Aug 23, 2023

Sentry Url: https://sentry.io/share/issue/8881d8c712dc4bd4aa81dfb007c09d3d/
User Count: 1
Count: 2
First Release: 23.0.0.4
First Seen: 2023-08-22T00:31:12Z
Last Seen: 2023-08-22T00:46:46Z
24 Hours: 2
30 Days: 2
LogID: 28B7AFF1-6C7D-46E1-9FBC-DF742E7174C2

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

This error is located at:
  ...: Unhandled JS Exception: TypeError: Cannot read property 'width' of undefined
  File "null", line null, in RCTFatal
  File "null", line null, in -[RCTExceptionsManager reportFatal:stack:exceptionId:extraDataAsJSON:]
  File "null", line null, in -[RCTExceptionsManager reportException:]
  File "null", line null, in -[RCTModuleMethod invokeWithBridge:module:arguments:]
  File "null", line null, in facebook::react::invokeInner
  File "null", line null, in facebook::react::RCTNativeModule::invoke
...
(12 additional frame(s) were not displayed)
@guarani
Copy link
Contributor Author

guarani commented Aug 23, 2023

👋 @SiobhyB, this has just two crashes but is a new issue in JPiOS 22.3. However, Sentry is dropping some events due to quota issues, so all Sentry events now might be under-reported right now.

This error message, TypeError: Cannot read property 'width' of undefined, looks similar to JETPACK-ANDROID-7XY. However, the Android issue appears to be grouping a lot of different errors, wordpress-mobile/WordPress-Android#18750 (comment).

I created this issue here instead of in the WPiOS repo since this seems to be a cross-platform issue, but let me know if I should report it in the WPiOS repo instead.

Should I assign you to this? While the crash triage guideline (internal ref PCYsg-vRg-p2) calls for it, I'm not sure if there's a threshold for it. Your name came to mind since I see you're leading a crash-fixing effort on Gutenberg Mobile.

@SiobhyB SiobhyB self-assigned this Aug 23, 2023
@SiobhyB
Copy link
Contributor

SiobhyB commented Aug 23, 2023

@guarani, thank you for flagging! I'll prioritise looking into this today.

@SiobhyB
Copy link
Contributor

SiobhyB commented Aug 23, 2023

Symbolicated stack trace:

This error is located at:
    in Unknown
    in Unknown
    in RCTView
    in Unknown
    in RCTV..., stack:
/workdir/gutenberg/packages/edit-post/src/store/reducer.js:127:blockInserterPanel
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:3535:renderWithHooks
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7755:beginWork$1
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7307:performUnitOfWork
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7301:workLoopConcurrent
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7292:renderRootSync
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6977:performSyncWorkOnRoot
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:2148:flushSyncCallbacks
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6652:ensureRootIsScheduled
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:3771:mountState
/workdir/gutenberg/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:3760:checkIfSnapshotChanged
/workdir/gutenberg/packages/data/src/controls.js:127:<anonymous>
/workdir/gutenberg/packages/data/src/controls.js:131:<anonymous>
null:null:null
/workdir/gutenberg/packages/data/src/redux-store/index.js:24:<global>
/workdir/gutenberg/packages/data/src/redux-store/index.js:227:storeDescriptor.instantiate
null:null:null
/workdir/gutenberg/node_modules/redux/lib/redux.js:670:<anonymous>
null:null:null
/workdir/gutenberg/packages/compose/src/higher-order/with-safe-timeout/index.tsx:13:<global>
/workdir/gutenberg/packages/data/src/redux-store/index.js:6:<global>
null:null:null
/workdir/gutenberg/packages/compose/src/higher-order/with-state/index.js:22:withState
/workdir/gutenberg/node_modules/redux/lib/redux.js:670:<anonymous>
null:null:null
/workdir/gutenberg/packages/compose/src/higher-order/with-safe-timeout/index.tsx:13:<global>
/workdir/gutenberg/packages/deprecated/src/index.js:12:<global>
/workdir/gutenberg/packages/block-library/src/embed/wp-embed-preview.native.js:56:useMemo$argument_0
/workdir/gutenberg/node_modules/yjs/dist/yjs.cjs:1533:integrateStructs
/workdir/gutenberg/node_modules/react-native-webview/lib/WebViewShared.js:58:defaultRenderError
/workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:318:enqueueNativeCall
/workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:18:<global>
/workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:127:invokeCallbackAndReturnFlushedQueue
/workdir/gutenberg/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:15:<global>

@guarani
Copy link
Contributor Author

guarani commented Aug 24, 2023

👋 Is the Requires Triage label needed anymore? @geriux, I see @SiobhyB is out this week, so looping you in in case you can take a look at this.

@geriux geriux assigned geriux and unassigned SiobhyB Aug 24, 2023
@geriux
Copy link
Contributor

geriux commented Aug 24, 2023

👋 Is the Requires Triage label needed anymore? @geriux, I see @SiobhyB is out this week, so looping you in in case you can take a look at this.

Hey @guarani 👋 I've removed the Requires Triage and assigned myself to the issue since @SiobhyB will be out this week.

@geriux
Copy link
Contributor

geriux commented Aug 29, 2023

I've been investigating this issue and so far I haven't found a way to reproduce it, it has only happened to 3 users so far.

I also checked on Android and I'm not seeing this issue in the events for 23.0.

I will keep monitoring it throughout the adoption of the latest release on iOS.

@geriux
Copy link
Contributor

geriux commented Aug 29, 2023

Update: Just found a way to reproduce, I'll check the code and work on a fix.

@geriux
Copy link
Contributor

geriux commented Aug 29, 2023

The fix is up and waiting for review.

@guarani
Copy link
Contributor Author

guarani commented Aug 30, 2023

Nice work tracking this down @geriux! ❤️

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

Successfully merging a pull request may close this issue.

3 participants