Gutenberg: Autosaving never ends

Created on 22 Aug 2018  ·  45Comments  ·  Source: WordPress/gutenberg

Describe the bug
Autosave feature will decide to start saving the article, then won't stop and I can't publish or come out of the article because it's still in the process of saving. If I close the window and go back,it will have saved the text, but not images. Though Blocks for images and galleries are there along with corresponding caption texts.

To Reproduce
Steps to reproduce the behavior:

  1. Just use Gutenberg and start a new post
  2. Article will start to autosave
  3. See error

Expected behavior
I want to be able to save when I want to, not when the system decides to.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome

Additional context

  • Version 3.6.2
Needs Testing [Feature] Saving [Type] Bug

Most helpful comment

You may paste this code on your theme's functions.php

add_filter( 'block_editor_settings', 'jp_block_editor_settings', 10, 2 );

function jp_block_editor_settings( $editor_settings, $post ) {
    $editor_settings['autosaveInterval'] = 2000; //number of second [default value is 10]

    return $editor_settings;
}

All 45 comments

May I ask what web host you are using and whether you have a reliable internet connection? (Just want to note these things as a first step in case they are relevant.)

I am unable to get autosaving to break in testing so far. Does this problem only happen for you when uploading images and galleries? May I ask how many blocks you typically have in a post and how many images total you typically add when you see this problem happen?

Hi,

my webhost is Bluehost and I do have a reliable connection, but I admit it seems to be very slow at the moment. Normally I run at 16Mbps but it's currently 4Mbps according to a Ping test.

As an example I clicked on an article with around 20 blocks, 1600 words and anything up to 40 images - which I appreciate is a lot but had been resized down to 2000x1333px - and it was still frozen in autosave 5 hours later. Classic Editor never had that problem. I've had to disable it for now as I have too much work to do and it's slowing me down far too much but I will reactivate it if you need me to test anything.
Many thanks

Thank you for the extra info. I think this might be mainly media related. For the images, do you typically drag and drop all 40 in to the post in one go?

Creating a post with 40 images at ~2000x1333px each is a good thing to note for testing and I'll add the Needs Testing label for that.

Hello, I insert some as single images as it's a magazine so I scatter them to compliment the writing. Some I upload as galleries. I upload them all onto the Media Gallery at once but I place them sporadically so it's not all working at the same time.
I admit, I normally use save for web but because I had so many pictures, I created an action in Photoshop to resize them by batch process so they weren't compressed in the same way save for web does.

I experience this issue as well.
It is not related to images. As this screenshot shows, it happens the first time it tries to autosave. As also shown in the screenshot, the request to "index.php?rest_route=/wp/v2/posts/4/autosaves" just keeps pending
screenshot_2018-10-05_09-50-41

screenshot_2018-10-05_09-56-47

It happens every single time I try to create a post

I just opened up a similar report, but it was text with me the that was lost. Unlike another commenter, I cannot get it to reproduce. It happened after I had been away from machine and the post for an hour or so and meant I lost several paragraphs (I tried to hit ctrl/cmd-v to save after highlighting the whole post before refreshing the page, but that did not work. My internet is fairly reliable and fast, but the wi-fi (Rogers in Canada) auto switches between the 5G and regular connection depending partly upon who else is in the house and what kind of bandwidth they are using. It may be that I was switched between the 5G and regular connection when I returned to the post. At that point, the autosaving feature as stuck, but I did not notice until I had composed two or three more paragraphs, which I then lost, as well as the last paragraph or so from the previous session.

I get this a lot, never added images only text. I am also with Bluehost but the Bluehost plugin is disabled. I have a fast connection 50mbps but Bluehost + wordpress is crushingly slow all chrome console reads complain of bad network, I figured bluehost was just a bad match with wordpress so thought of moving but then see Wordpress recommend bluehost as best experience. If I try and generate a preview of the page this also hangs with the W logo constantly redrawing itself. You have to copy past the entire post then load a new page and then come back and paste in the latest edit to rescue it. It justs flips between flashing saving and flashing autosaving in top right.
word

I got autosave stuck while on a poor connection - there was no way to cancel it and as a result, I lost content when I had to reload the page.

PLEASE ALLOW DISABLING AUTOSAVE, IT'S IMPOSSIBLE TO WORK! I'm pulling my hair off coz autosave interrupts the main purpose of editor: TO EDIT TEXT.

You may paste this code on your theme's functions.php

add_filter( 'block_editor_settings', 'jp_block_editor_settings', 10, 2 );

function jp_block_editor_settings( $editor_settings, $post ) {
    $editor_settings['autosaveInterval'] = 2000; //number of second [default value is 10]

    return $editor_settings;
}

Woohoo! Thanks jaypeeperos, that's kinda lifesaving. Damn Gutnbrg...

I have similar issue with Autosave and found this thread. Using latest Firefox, and host provider is Bluehost. Connection should not be an issue for me as I'm on fiber with super fast speeds.

While I work in the editor, autosave kicks in and it just gets stuck there. I can't get out of it. Then I have to refresh the screen and lose the work. This sucks. So I resort to copying the page code before going for a bail out.

There maybe browser, theme, plugin, server issue to cause this. Thing is, autosave is not a feature I need or want - more problem the help. I can save the work myself when I want to. All I wish is there's an easy setting to turn this unnecessary feature off for good.

Thanks.

Well, I may be a little biased, because of all Gutenberg bugs. However - if I understand this problem correctly - Gutenberg needs to stay reliable even if connection is not. Always assume that conditions and environment may change. Handling lost connection looks like first thing when developing autosave function.

I can confirm this issue. Probably related to lost Wi-Fi connection. For example when I'm writing something and close laptop lid for a moment.

What I expect is behaviour like:

  • timeouting autosave when connection is lost
  • showing save error or not - doesn't matter
  • but giving a way to retry saving would be great

It's especially frustrating, as if autosave is stuck, there is no way to save content manually.

Just want to add I'm also having this problem. I have a 200mbps fibre optic connection to the office and am connected to the router via Gigabit Ethernet. The host server is located in the same country (UK). It's impossible to use. Thanks for posting the code to disable it.

I have this exact same issue and am also on BlueHost.

The classic editor used to save in two parts, the tick and then a spinner. It would save on the tick, but the spinner always took longer for some reason.

With Gutenberg the process is still in two parts, but way longer on each part. The first part is the two-tone bar, which takes a while.

Secondly the flashing cloud that takes absolutely forever.

I only have say 8 blocks and one cover image. Regardless of what I have saving the problem is the same.

This happens to me all the time too. I have to back out of the post then fingers crossed that latest version is in autosave.

Gutenberg v6.0.0 I am continually encountering this problem. (Latest Chrome on Win10) It is happening all the time. The evidence points towards a bug, as after reloading the editor page I can immediately update or save as draft with no issues -- so no problem with the connection to the server.

The following work-around has worked for me should you get caught by this problem.

  1. Switch to code mode
  2. Copy all the post's code (Ctrl A, Ctrl C)
  3. Reload the page
  4. Delete the 'old' code (Ctrl A, Del)
  5. Paste the copied code (Ctrl V)
  6. Update/Save as draft as appropriate.

Failed to copy the code before you deleted everything? Your previous text should be in the post's revision history.

I'm now going to install @jaypeeperos suggested fix to block the autosave.

Update: [text removed as I erroneously stated that @jaypeeperos fix didn't work. It does.]

In the screenshot at https://github.com/WordPress/gutenberg/issues/9220#issuecomment-441370531 it says

Failed to load resource, the server responded with a status of 403 (Forbidden)

This indicates something on the server side is not allowing the code that runs the autosave to go through but it isn't clear yet why that may be happening in only some cases (as not everyone is experiencing the same problem).

Is everyone here seeing the same types of messages if you check your browser console at the time the problem is happening?

@designsimply

I ran some more tests -- But first, hat off to @jaypeeperos I must have been mistaken when I earlier stated the code to disable the auto-update didn't work. I had to disable the disable-auto-update code for the auto-update to work. Apologies to @jaypeeperos

Here are the errors I get with Autosave enabled:

wp-auto-update-error

I reloaded the page and it saved fine when I hit update. However, the console was showing the following errors:

wp-update-ok-errors

I hope that is of some assistance in finding the problem

Thanks for checking the browser console for errors! Those 403 Forbidden errors are pretty general and not super helpful to reveal the source of the trouble for your case. 😕

@gsallman does the problem happen for you without the Gutenberg plugin installed?

For others, it would be helpful to know if this case is limited to Windows 10 only and if you are all seeing exactly the same error messages in the console at the time of the failed autosaves.

While the cause of the problem is being investigated and sorted out, a user setting in the admin to disable this function is badly needed. This is a prime example of users being forced to have a none important function that's supposed to help them, and so far it's just causing more problems than helps. Why do we need to hack the code to make something work better for us?

✋🏼 I'm a Windows 10 user. I do all my content creating with Firefox Developer edition.

I'm also on Win10, using Firefox Portable Edition, v. 68. I have trouble imagining why the OS would matter for a problem like this, but stranger things have happened...

The next time the problem occurs, I'll check my console and report back, but I'm working on non-web projects at the moment, so not spending much time in WP.

I am experiencing the same problem on wordpress.com's free version, using the classic editor.

I'm running into the same issue. Is there a setting to disable autosave yet?

I am on WP 5.2.2

Autosaving is an important feature, so if at all possible we should try to solve (or identify) the root cause of the problem instead of adding an option to disable.

For these cases, it would be good to try to nail down any common factors from everyone experiencing the problem, such as:

  • Browser and OS version
  • WordPress version
  • Hosting provider
  • Screenshot of console errors from right after the problem happens (if possible!)

I do love autosave and would rather have it work than turn it off.

  • Browser and OS version: Firefox developer edition and Windows 10
  • WordPress version: Always the newest stable release.
  • Hosting provider: Dreamhost & WPEngine
  • Console Errors: I will revise this post the next time this happens with a screenshot.

Thank you!

Really? I consider Autosaving a user enhancement feature, not a critical function to the system. So it doesn't have to be one way or the other to argue over - you can't argue personal preference. What's being important for you does not necessarily apply to everyone else.

Why can't we just have a simple solution - Autosaving is turned on by default, and users have the option to turn it off (easily) if they want to for whatever weird reason may it be. At least this is a much quicker and feasible solution to implement until you guys sort out what's causing Autosaving not to work consistently. The main problem of Autosaving is that it does not work consistently in various setups - who knows, server, browser, security, etc. And when it doesn't work, it's a pain in the neck to deal with - problems outweigh benefits.

Thanks for listening.

-

Autosaving is an important feature, so if at all possible we should try to solve (or identify) the root cause of the problem instead of adding an option to disable.

For these cases, it would be good to try to nail down any common factors from everyone experiencing the problem, such as:

  • Browser and OS version
  • WordPress version
  • Hosting provider
  • Screenshot of console errors from right after the problem happens (if possible!)

I notice that when leaving the editor mode open for a while with no activities (let's say I've been working on a page and have to step out for a lunch break,) and come back to continue editing the page again, the next time when I hit the Save button, I get the eternal "Updating..." status (see screenshot). This happens quite a few times.

This means that auto save works fine with the setup I have. Sometimes it decides not to work because, in this case, I left the editor open for too long. So again, not working consistently is the problem, at least in my case.
Screen Shot 2019-10-26 at 1 19 18 AM

This seems to potentially not be an issue now. I am not totally sure as it was reported a while ago. For now, I am going to close this but we can reopen if people are still experiencing this.

I was still experiencing it, but maybe it's fixed with the new release. Hopefully :-)

I still experience this regularly. My work-around is to copy the content I'm trying to save, open a different browser, paste and cross my fingers. Its a nightmare, Windows 10 Firefox and Chome, MacOS Firefox and Chrome.

Hi all,

I am facing this issue randomly. Unfortunately, I just lost 2.000 word today :(

I am using ubuntu 18.04 on DO and my wp and gutenberg version are updated to last version. My browser is Safari 13.0.2 and I am using macOS Catalina. I do not have any console log to post but as far as I see it gives a 403 error with a error in nuance in cookie. Hope this helps and I will send the exact console log if it is happen again. Thanks!

Hi,

I faced this issue again, Autosave feature does not work and because of this I can't save my work. What I can do is copy the whole content refresh the page and hope I did not lost anything, paste my content again redo all the formatting.

There are hundreds of console log and all of them is same. 403 error.

{
"code": "rest_cookie_invalid_nonce",
"message": "Çerez nonce verisi geçersiz",
"data": {
"status": 403
}
}

@karmatosed I know you closed this issue and sorry to ping you but there are 3 people who reports that this is still an issue. Could you kindly open it and check it again?

Thanks,

I don't have the issue with the autosave but with the regular saving. When I click in the save button it often stays "saving", request never ends, and tab becomes unresponsive.

I don't have the issue with the autosave but with the regular saving. When I click in the save button it often stays "saving", request never ends, and tab becomes unresponsive.

I have this same problem. Do you have Woocommerce plugin installed?

Autosave and regular save are failing for me right now. Deleted my post and recreated, same issue. Reinstalled Wordpress 5.4.2, still same issue. My hosts is hostgator and no issues with my internet.

The save just sits there flashing and publish is grayed out.

In my experience, this is usually caused when there is an intermittent drop in internet connection or when you have been automatically logged-out after perceived inactivity.

On 11 Jun 2020, at 10:06, Turan Sadri notifications@github.com wrote:

I don't have the issue with the autosave but with the regular saving. When I click in the save button it often stays "saving", request never ends, and tab becomes unresponsive.

I have this same problem. Do you have Woocommerce plugin installed?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9220#issuecomment-642516958, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN4LCBUQ25C2MZPQMXNTKTRWCNB3ANCNFSM4FQ3LISA.

Almost experiencing the same issue here, but instead with a status code of 500. Video of the issue: https://www.youtube.com/watch?v=RUOapedxkYk

This issue is still prevalent for me on multiple client machines, but I've found that it occurs less often on Chromium-based browsers (more more often on Firefox). Running the latest version of WordPress on an up-to-date Raspberry Pi.

Almost experiencing the same issue here, but instead with a status code of 500. Video of the issue: https://www.youtube.com/watch?v=RUOapedxkYk

It turned out to be another plugin called SiteTree (https://en-gb.wordpress.org/plugins/sitetree/) causing this 500 error which didn't return any useful error messages. What a pain it was to figure that one out...

I would suggest reopening this issue as this is still a problem even with WordPress 5.5. Several times a day while typing a post in Gutenberg, the "Autosave" will kick off and pulse infinitely and never complete. I'm on a stable WiFi connection.

I can manage the issue by never opening two tabs in the same browser to my Wordpress site. Any two tabs will screw things up, so if, for example, you want to have one tab editing a post, with another tab previewing it, Save (not just auto-save) will hang forever. Similarily two Wordpress Admin tabs will mess up the Save functionality.

The work around is to have two completely different browsers open -- I use Chrome to preview, and Firefox to edit.

Was this page helpful?
0 / 5 - 0 ratings