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

React warning when navigating between templates index and template screens in the Site Editor #37571

Closed
tellthemachines opened this issue Dec 22, 2021 · 2 comments
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended

Comments

@tellthemachines
Copy link
Contributor

Description

When switching between the templates index and various templates in the Site Editor, the following warning appears in the console:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
    at Items (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:11909:5)
    at BlockListItems
    at BlockContextProvider (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:9975:5)
    at UncontrolledInnerBlocks (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:24669:5)
    at div
    at GroupEdit (http://localhost:8888/wp-content/plugins/gutenberg/build/block-library/index.min.js?ver=08946c36892a0c5956f1ef3ece66476d:17637:5)
    at Edit (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:10645:5)
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:39877:11
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:40085:96
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:41662:105
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:44329:116
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:42132:102
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:43371:11
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-library/index.min.js?ver=08946c36892a0c5956f1ef3ece66476d:38253:5
    at http://localhost:8888/wp-content/plugins/gutenberg/build/edit-post/index.min.js?ver=346c8bb5d3d0fa51a7237483939ed242:8086:7
    at http://localhost:8888/wp-content/plugins/gutenberg/build/data/index.min.js?ver=37cee40df377d47ae5f591bf76a3d37d:1895:82
    at http://localhost:8888/wp-content/plugins/gutenberg/build/data/index.min.js?ver=37cee40df377d47ae5f591bf76a3d37d:2016:77
    at <anonymous> (http://localhost:8888/wp-content/plugins/gutenberg/build/compose/index.min.js?ver=57c5ad56207b3cb409dcfb54994cf1e4:2277:10)
    at FilteredComponentRenderer (http://localhost:8888/wp-content/plugins/gutenberg/build/components/index.min.js?ver=46c12e161c55d5bd0649ba57585881a5:70552:9)
    at BlockEdit (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:10714:5)
    at div
    at BlockCrashBoundary (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:11162:5)
    at BlockListBlock (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:11556:5)
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:39927:5
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:40419:5
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:41499:5
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:42847:88
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:44342:51
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:42176:99
    at http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:43390:5
    at FilteredComponentRenderer (http://localhost:8888/wp-content/plugins/gutenberg/build/components/index.min.js?ver=46c12e161c55d5bd0649ba57585881a5:70552:9)
    at http://localhost:8888/wp-content/plugins/gutenberg/build/compose/index.min.js?ver=57c5ad56207b3cb409dcfb54994cf1e4:2225:8
    at http://localhost:8888/wp-content/plugins/gutenberg/build/data/index.min.js?ver=37cee40df377d47ae5f591bf76a3d37d:1895:82
    at http://localhost:8888/wp-content/plugins/gutenberg/build/data/index.min.js?ver=37cee40df377d47ae5f591bf76a3d37d:2016:77
    at <anonymous> (http://localhost:8888/wp-content/plugins/gutenberg/build/compose/index.min.js?ver=57c5ad56207b3cb409dcfb54994cf1e4:2269:12)
    at Items (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:11909:5)
    at BlockListItems
    at BlockContextProvider (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a9563508:9975:5)
    at UncontrolledInnerBlocks (http://localhost:8888/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=17e0e3cbf54f0fe79f85d3a1a95

Step-by-step reproduction instructions

  1. Go to the Site Editor;
  2. Open the left hand sidebar and navigate to Templates index;
  3. Navigate to one of the templates;
  4. Go back and forth between index and templates until error shows in console.

Screenshots, screen recording, code snippet

No response

Environment info

Latest Gutenberg trunk running on WP 5.9-beta4-52408.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@tellthemachines tellthemachines added [Type] Bug An existing feature does not function as intended [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Dec 22, 2021
@Mamaduka
Copy link
Member

Mamaduka commented Jan 5, 2022

I'm removing this issue from WP 5.9 project board since we're already in the RC phase.

We can probably ignore most of the "Can't perform a React state update on an unmounted component" warnings. React 18 is removing them - reactwg/react-18#82. But I think it would be nice to fix this anyways.

@youknowriad
Copy link
Contributor

I haven't been able to reproduce this issue recently. It might have been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants