Gutenberg: Block Directory: Error upon install of plugin, mixed signals

Created on 28 Jun 2020  路  5Comments  路  Source: WordPress/gutenberg

Describe the bug
I searched in the inserter for "Waves" and it found a plugin in the plugin directory. When I clicked on the button to install, nothing happened. So, I clicked the Installation button again and received an error message that the directory already exists on the site. Looking on the page of installed plugins, I found the Waves plugins installed an activated. When I went back to the post, and search again for "Waves" the block appeared for the "slash' command and I could add it to the post.

That's all in the normal user interface.
Troubleshooting this step by step, I found an error message in the browser console:
"index.js?ver=a7f027f7a7f6565d71c3f8ba71ca024b:2 Uncaught (in promise) TypeError: Cannot read property 'attributes' of undefined
at Ue (index.js?ver=a7f027f7a7f6565d71c3f8ba71ca024b:2)
at index.js?ver=469e83bef01283896f71b169cff22cb6:11
at index.js?ver=ca12930a65044581a2b86a7ea6c10225:1"

To reproduce
Steps to reproduce the behavior:

  1. Go to Inserter
  2. Search for "Waves"
  3. Click on install
  4. See error

Expected behavior
I expected to see a notice that the installation completed or not completed.
With the installation the search of the inserter should have updated and offer the installed block to be added to the post.

Screenshots
Here is the video of the steps

Editor version:

  • WordPress version: 5.4.2
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? "gutenberg plugin"
  • If the Gutenberg plugin is installed, which version is it? 8.4

Desktop (please complete the following information):

  • OS: 10.14.6
  • Browser Chrome
  • Version 83.0.4103.106

Additional context
Using Local by Flywheel v. 3.3

Needs Testing [Feature] Block Directory

Most helpful comment

@bph Good find. I also noticed this and started working on a PR to solve it. https://github.com/WordPress/gutenberg/pull/23439

We need a better way to load the plugin code and we are working on some pieces that definitely provide more stability. You can follow along https://github.com/WordPress/gutenberg/pull/21244. In the meantime we may see a few blocks in this weird state. I think the first step is to show better error messaging. If you have the time, check out the PR and get involved!

All 5 comments

After some more tests, this behavior seems to be connected to the block's code. It seems to interfere with the installation flow. After the plugin was installed, I used the block in a different post and the same error message showed up in the browser console.

When I searched for "Beauty" an installed the "Beauty Box" plugin, no errors occurred. And the search, install use process was seamless.

@bph Good find. I also noticed this and started working on a PR to solve it. https://github.com/WordPress/gutenberg/pull/23439

We need a better way to load the plugin code and we are working on some pieces that definitely provide more stability. You can follow along https://github.com/WordPress/gutenberg/pull/21244. In the meantime we may see a few blocks in this weird state. I think the first step is to show better error messaging. If you have the time, check out the PR and get involved!

I'll keep an eye on the PR when it lands in master for further testing. Thank you! You already caught it :-) I only searched the issue for duplicates, not PRs. Should we close this issue as it's already in the works?

@bph as you suggested, I'm going to close this out in favor of the work being done to fix this (especially since the PR references the same waves block) :D If anyone wants to re-open, feel free to do so.

I only searched the issue for duplicates, not PRs.

@bph I should have written a ticket, bad form on my part.
I owe you time. I'll find a way to get it back to you. 馃檪

Thanks.

Was this page helpful?
0 / 5 - 0 ratings