Spurious "Draft is being edited in other window" errors

Many users on our forums (including staff and myself) have reported receiving this error message for no clear reason in the last several days. This error message appears occasionally when composing posts, even though no other windows are open. One of the buttons needs to be pressed to continue, and can result in losing typed post content. I tried deleting all drafts and using safe mode, but it still occurred. It’s happened in Chrome, Firefox, and Opera that I’m aware of. We have 2.8.0.beta10 [5ff0b86b57] installed. I noticed fix #15390 involves drafts, is it possible there’s some connection?

3 Likes

Please upgrade to the latest version by visiting /admin/upgrade or rebuilding your Docker container. This bug has been fixed a few days ago.

3 Likes

Understood, thanks for that!

2 Likes

@gerhard - this is still occurring for many of our users. The popup seems to come up for no reason, with the users only having one active session open.

We’re running 2.9.0.beta3.

Anything we can do to fix this?

Thank you!

Ditto. This error is occurring for many of my users as well. I am running 2.9.0.beta5.

I’m currently seeing this on my site (3.2.0.beta2-dev – 76e5a939d4) – as well as on other Discourse forums I participate in. At first I assumed I had another forgotten tab open somewhere, but it turns out to be happening when I definitely have only one active session/tab.

2 Likes

Do you have an exact repro?

1 Like

I also see this a few times a day but don’t have a specific repro.

Next time it happens I’ll see if I can reconstruct what I was doing.

2 Likes

It happened to me just now and I remembered and attempted to reproduce what I was doing… both times it happened due to me hitting Edit on the wrong post, closing the composer, and then editing the right one.

Here’s my attempt to reproduce it:

I found some steps to reproduce the error (Not every time, but almost)

  1. Click the pencil to edit a post (can be a wiki post but also a normal post you can edit)
  2. Don’t edit the post but wait (and maybe scroll, click and mark.
    I’m not totally sure what exactly is needed)
  3. Minimize the composer, so it disappears, because nothing was changed.
  4. Click the pencil again to edit the post

draft edited3
draft edited5

4 Likes

Today I had the impression that a slow internet connection triggers this bug.

1 Like

This has been happening a lot on our site lately. We’re on 3.3.0.beta2-dev (07dc6efdc9).

It happened to me just now. I entered a topic and clicked the blue Reply button below the last post in the topic. I started typing and almost immediately got the “Draft is being edited…” error pop-up. I do not have any other browser windows/tabs accessing Discourse.

This problem started about two weeks ago, after an update.

I’m on a 1 gig fiber connection in Silicon Valley. Less than 5% utilization. I have sub 3 ms latency to Google. I doubt bandwidth is the problem.

EDIT: I found one problem. A lot of legitimate user requests are being denied with a 429 because they’re being labeled as “bot.”

We’re running a standalone Docker container install, meaning everything in the same container. We have an Nginx reverse proxy in front of Discourse. We’ve been running like this for 7 years. From /var/discourse/shared/standalone/log/var-log/nginx/error.log:

2024/05/08 15:42:10 [error] 72#72: *10714323 limiting requests, excess: 100.328 by zone "bot", client: unix:, server: _, request: "GET /unread.json HTTP/1.1", host: "forums.jag-lovers.com", referrer: "https://forums.jag-lovers.com/"

That was not a bot, that was me (note the timestamp):

NNN.175.134.186 - - [08/May/2024:15:42:10 +0000] "GET /unread.json HTTP/2.0" 429 564 "https://forums.jag-lovers.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"

EDIT 2: This has been resolved. Turns out there were a number of bots hammering our site and those bots were not listed under the Site settings → slow down crawler user agents setting.

The worst offender was by far Amazonbot, which was hitting us multiple times per second. As soon as I added it, and a few others (PetalBot, YandexBot) to the slow down crawler setting, the errors started going away.

This is happening on a site I’m an admin of as well every few minutes. We’re on 3.4.0.beta3-dev (ab7547eb7a).