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

Site Editor: Navigation block might break for an infinite loop #50277

Closed
Copons opened this issue Feb 19, 2021 · 6 comments
Closed

Site Editor: Navigation block might break for an infinite loop #50277

Copons opened this issue Feb 19, 2021 · 6 comments
Labels
[Goal] Full Site Editing Triaged To be used when issues have been triaged. [Type] Bug

Comments

@Copons
Copy link
Contributor

Copons commented Feb 19, 2021

The repro steps for this are weird, but I could reduce them all the way down to these, although the issue only happen sporadically.

Steps to reproduce the behavior

  1. Open the Site Editor on a site using Seedlet (although it might happen with other themes as well).
  2. Select the Navigation Block.
  3. Click on its icon to open the "Convert To" dropdown.
  4. Click anywhere else to deselect the block.

Or:

  1. Open the Site Editor on a site using Seedlet (although it might happen with other themes as well).
  2. Insert an image in the Site Logo block (either upload or from the media library).
  3. Select the Navigation Block.
  4. Click anywhere else to deselect it.

What I expected to happen

Nothing!

What actually happened

The block broke with the customary "This block has encountered an error and cannot be previewed." message.

A minified React error is thrown in the console. It links to the React error decoder with this message:

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

Screenshot / Video: If applicable, add screenshots to help explain your problem.

Screenshot 2021-02-19 at 15 15 57

Screenshot 2021-02-19 at 15 16 22

@Copons Copons added [Type] Bug [Pri] High Address as soon as possible after BLOCKER issues [Goal] Full Site Editing labels Feb 19, 2021
@vindl
Copy link
Member

vindl commented Feb 24, 2021

Should this go to core repo or was it Dotcom specific?

@Copons
Copy link
Contributor Author

Copons commented Feb 24, 2021

Should this go to core repo or was it Dotcom specific?

@vindl Dotcom specific 😭

@vindl
Copy link
Member

vindl commented Feb 24, 2021

@vindl Dotcom specific 😭

Dang. 😢

@Addison-Stavlo
Copy link
Contributor

I also reproduced this by clicking the "+" inside the navigation block to add a new item, then clicking somewhere else inside the template part to deselect it while the quick inserter popover was still present.

@Copons
Copy link
Contributor Author

Copons commented Mar 1, 2021

As it turns out, this looks extremely similar to WordPress/gutenberg#29391, so it might indeed be a Core issue.

The one major difference, is that the repro steps here don't trigger the error in Core.
Also, on WPCOM it's the Navigation block itself that crashes, wheres in Core is "just" a NavigationLink (or the entire Site Editor, but not the Post Editor 😅 ).

@inaikem inaikem added the Triaged To be used when issues have been triaged. label Mar 25, 2021
@vindl vindl removed the [Pri] High Address as soon as possible after BLOCKER issues label Apr 22, 2021
@Addison-Stavlo
Copy link
Contributor

this seems to have been resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Full Site Editing Triaged To be used when issues have been triaged. [Type] Bug
Projects
None yet
Development

No branches or pull requests

4 participants