Gutenberg: Editor: Unexpected error when creating new post

Created on 3 Apr 2019  路  8Comments  路  Source: WordPress/gutenberg

Describe the bug

When I create a new post, and then move my mouse to the first, empty, Paragraph block to start typing body text, I experience an error in the editor, like this:

I'm unable to proceed with the post, even after clicking on the button to attempt a recovery. This is the error log:

zn@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/editor.min.js:55:45248
this.wp.editor</Gn</o<@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/editor.min.js:55:46071
this.wp.editor</Gn<@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/editor.min.js:55:45906
u@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/editor.min.js:12:3427
g/n</</<@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/data.min.js:1:6379
this.wp.editor</zi<@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/editor.min.js:55:109194
n@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/data.min.js:1:13036
r@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/data.min.js:1:13298
zf@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:69:258
Mf@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:87:4
ph@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:98:474
eg@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:125:307
fg@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:126:168
wc@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:138:237
fa@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:137:115
lg@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:148:342
re@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:23:322
Xb@https://c0.wp.com/c/5.1.1/wp-includes/js/dist/vendor/react-dom.min.js:40:304

To Reproduce

Steps to reproduce the behavior:

  1. Add a new post
  2. Regardless of whether I add a post title, I move my mouse to the first Paragraph block
  3. See error "The editor has encountered an unexpected error"
  4. Activating the Gutenberg plugin (initially v5.3.0, but also v5.4.0) restores normal functionality

Expected behavior

When I create a new post, I expect to be able to move my mouse to the first Paragraph block, and click on it to begin typing.

Screenshots

See the issue summary for a demonstration of the error.

Desktop (please complete the following information):

  • OS: macOS 10.14.4
  • Browser: Firefox Developer Edition
  • Version: v67.0b6

Additional context

I installed the Health Check plugin on the site, entered Troubleshooting mode, and then opened a new post. As soon as I moved my mouse to the body text field (a Paragraph block by default), the error occurred. When it did, this error was recorded in my browser console log:

TypeError: "e.preferences.insertUsage is undefined"
    zn https://pauljacobson.me/wp-includes/js/dist/editor.min.js?ver=9.0.11:55
    o https://pauljacobson.me/wp-includes/js/dist/editor.min.js?ver=9.0.11:55
    Gn https://pauljacobson.me/wp-includes/js/dist/editor.min.js?ver=9.0.11:55
    u https://pauljacobson.me/wp-includes/js/dist/editor.min.js?ver=9.0.11:12
    n https://pauljacobson.me/wp-includes/js/dist/data.min.js?ver=4.2.1:1
    zi https://pauljacobson.me/wp-includes/js/dist/editor.min.js?ver=9.0.11:55
    n https://pauljacobson.me/wp-includes/js/dist/data.min.js?ver=4.2.1:1
    r https://pauljacobson.me/wp-includes/js/dist/data.min.js?ver=4.2.1:1
    zf https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:69
    Mf https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:87
    ph https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:98
    eg https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:125
    fg https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:126
    wc https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:138
    fa https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:137
    lg https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:148
    re https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:23
    Xb https://pauljacobson.me/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:40
react-dom.min.js:104:253

Debug information from the Health Check plugin:

  • Version: 5.1.1
  • Language: en_GB
  • Permalink structure: /%year%/%monthnum%/%day%/%postname%/
  • Is this site using HTTPS?: Yes
  • Can anyone register on this site?: No
  • Default comment status: open
  • Is this a multisite?: No
  • User Count: 2
  • Communication with WordPress.org: WordPress.org is reachable
  • Create loopback requests: The loopback request to your site completed successfully.

Drop-ins:

  • advanced-cache.php: Advanced caching plugin.
  • object-cache.php: External object cache.

Active theme:

  • Name: Twenty Nineteen
  • Version: 1.3
  • Author: WordPress Team
  • Author website: https://en-gb.wordpress.org/
  • Parent theme: Not a child theme
  • Supported theme features: automatic-feed-links, title-tag, post-thumbnails, menus, html5, custom-logo, customize-selective-refresh-widgets, wp-block-styles, align-wide, editor-styles, editor-style, editor-font-sizes, editor-color-palette, responsive-embeds, infinite-scroll, jetpack-responsive-videos, jetpack-geo-location, jetpack-content-options, amp, widgets

Most helpful comment

Hi @youknowriad Thanks for the suggestion. I ran localStorage.clear(); in my browser console, and still experienced the error. Just to check I'm doing this correctly, I just type in localStorage.clear(); in my browser console, and hit return?

If that's correct, it doesn't resolve the issue for me.

All 8 comments

Thanks for the issue, we had an issue in Gutenberg 5.3 when you downgrade gutenberg (deactivate the plugin), it should be fixed now but for people who experienced it, you might have to clear the localstorage yourself.

see #14580

Hi @youknowriad Thanks for the suggestion. I ran localStorage.clear(); in my browser console, and still experienced the error. Just to check I'm doing this correctly, I just type in localStorage.clear(); in my browser console, and hit return?

If that's correct, it doesn't resolve the issue for me.

That's correct but you should do it when you're on the admin of your WP site.

Thanks @youknowriad, I did that too. Didn't seem to work for me there either. I'll test it again, and update this thread.

Ok, got it. I had to run this from the main WP Admin page. I did that, and it seems to have worked. Thanks!

Thanks for this! I was getting the same error when opening a post draft that was created in the "classic editor" (using the plugin) for editing in Gutenberg (without the plugin).

After running localStorage.clear(); from the main WP Admin page, I was able to successfully open and edit my existing post as expected. Thanks again!

Same issue but it happens before even getting to the new post screen.
* Update *
Fixed it by running localStorage.clear();

t@https://www.***.com/wp-includes/js/dist/edit-post.min.js?ver=3.3.5:12:7318 Yf@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:67:42 qg@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:92:302 hi@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:104:285 Qg@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:144:217 Rg@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:145:76 Sc@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:158:109 Z@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:156:492 Kc@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:155:52 ya@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:153:159 enqueueSetState@https://www.***.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:202:409 t.prototype.setState@https://www.***.com/wp-includes/js/dist/vendor/react.min.js?ver=16.8.4:20:433 value@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:16219 value/this.unsubscribe<@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:16397 n/<@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:11659 n@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:11632 m/y</<@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:8807 v@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:29557 b/</<@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:5879 O/</</<@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:6307 a/</</<@https://www.***.com/wp-includes/js/dist/redux-routine.min.js?ver=3.2.0:1:9567 dispatch@https://www.***.com/wp-includes/js/dist/data.min.js?ver=4.4.0:1:32017 i/<@https://www.***.com/wp-includes/js/dist/redux-routine.min.js?ver=3.2.0:1:9218 e/<@https://www.***.com/wp-includes/js/dist/redux-routine.min.js?ver=3.2.0:1:5434 e@https://www.***.com/wp-includes/js/dist/redux-routine.min.js?ver=3.2.0:1:5410 o/<@https://www.***.com/wp-includes/js/dist/redux-routine.min.js?ver=3.2.0:1:5363 j/</<@https://www.***.com/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2:31132 j/<@https://www.***.com/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2:31264 f@https://www.***.com/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:1:21556

Still having this issue when editing any pages/articles. I'm using firefox 68.

TypeError: "t.title is undefined" c http://10.156.16.200/wp-includes/js/dist/editor.min.js?ver=9.2.6:17 wrapNative http://10.156.16.200/wp-content/plugins/spicebox/inc/js/prototype.forms.js?ver=5.2.2:170 To http://10.156.16.200/wp-includes/js/dist/editor.min.js?ver=9.2.6:17 Td http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:82 be http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:91 hi http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:104 Qg http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:144 Rg http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:145 Sc http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:158 Z http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:156 Kc http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:155 ya http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:153 enqueueSetState http://10.156.16.200/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:202 setState http://10.156.16.200/wp-includes/js/dist/vendor/react.min.js?ver=16.8.4:20 value http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 bind http://10.156.16.200/wp-content/plugins/spicebox/inc/js/prototype.forms.js?ver=5.2.2:54 unsubscribe http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 n http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 n http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 y http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 v http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 b http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 O http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 a Redux dispatch http://10.156.16.200/wp-includes/js/dist/data.min.js?ver=4.4.0:1 Redux 2 wrapNative http://10.156.16.200/wp-content/plugins/spicebox/inc/js/prototype.forms.js?ver=5.2.2:170 Redux 2 j http://10.156.16.200/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2 j http://10.156.16.200/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2 f http://10.156.16.200/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:1 react-dom.min.js:117:150
but
localStorage.clear(); undefined
works just for a few seconds. Any other workaround ?

best regards,
Edouard

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasmussen picture jasmussen  路  3Comments

wpalchemist picture wpalchemist  路  3Comments

jasmussen picture jasmussen  路  3Comments

BE-Webdesign picture BE-Webdesign  路  3Comments

aaronjorbin picture aaronjorbin  路  3Comments