Skip to content

WooCommerce Blocks: Adding the Cart block crashes the editor #57449

Closed
woocommerce/woocommerce-blocks
#6718
@AtrumGeost

Description

@AtrumGeost

Update from @JoshuaGoode

Please see internal notes p9F6qB-7LA-p2#comment-43978

Related
304-gh-Automattic/wpcomsh
#34655

Quick summary

When adding the WooCommerce Cart block I get this error:

TypeError: Cannot read properties of null (reading 'removeChild')
    at h.componentWillUnmount (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/amp/assets/js/amp-block-editor.js?ver=2ee98517d90b7670631d2afc67df7285:31:1273)
    at Rh (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react-dom.min.edd8b7a6.js:148:43)
    at Sh (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react-dom.min.edd8b7a6.js:151:394)
    at Qj (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react-dom.min.edd8b7a6.js:174:181)
    at unstable_runWithPriority (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react.min.755b0ae9.js:24:26)
    at Za (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react-dom.min.edd8b7a6.js:73:8)
    at eb (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react-dom.min.edd8b7a6.js:170:163)
    at gf (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react-dom.min.edd8b7a6.js:162:317)
    at https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react-dom.min.edd8b7a6.js:73:230
    at unstable_runWithPriority (https://woocrashcourse101463901178.wpcomstaging.com/wp-content/plugins/gutenberg/vendor/react.min.755b0ae9.js:24:26)

Steps to reproduce

  1. On an AT Site install WooCommerce blocks: https://woocommerce.com/products/woocommerce-gutenberg-products-block/
  2. Create a new page and add the WooCommerce Cart block
  3. Notice the error

I confirmed this doesn't happen on a WordPress.org site (Jurassic Ninja)

What you expected to happen

For the editor to display the Cart block

What actually happened

Got this message:

The editor has encountered an unexpected error.

Screen.Recording.2021-10-28.at.12.39.46.mov

Console error:

Screen Shot 2021-10-28 at 12 41 13

Context

I encountered this while doing the WooCommerce Crash Course

Operating System

macOS

Browser

Google Chrome/Chromium

Simple, Atomic or both?

Atomic

Theme-specific issue?

No response

Other notes

No response

Reproducibility

Consistent

Severity

Some (< 50%)

(WooCommerce Blocks are an experimental feature )

Available workarounds?

No response

Workaround details

No response

Metadata

Metadata

Assignees

Labels

JetpackWooCommerce[Feature] Post/Page EditorThe editor for editing posts and pages.[Pri] HighAddress as soon as possible after BLOCKER issues[Pri] NormalSchedule for the next available opportuinity.[Status] In Progress[Type] BugWhen a feature is broken and / or not performing as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions