UI doesn’t update after multiple post edits

I’ve noticed this many times but it’s inconsistent.

When I create a reply post, publish it. Then go back immediately and edit and hit save. Then do the same again, sometimes the UI won’t show the latest edits. The edits are saved on the server because when I refresh the page it does show up but the issue is that it doesn’t always show up until the page is refreshed. This happens for a new reply post and when it’s edited multiple times within 2-3 minutes before the post registers the edited revision tag.

I’m seeing this happen after upgrading to version 3.1.0 (currently running 3.1.2, 1 GB RAM and 1 Unicorn) when using Chrome Browser (Win 10) and iPhone Safari (iOS 17.0.3). It’s happening fairly often which is why I’m reporting it.

This didn’t happen earlier. Only 2 changes since it started happening:

  1. Updates discourse to 3.x
  2. Reduced the number of Unicrons to 1 from 2
2 Likes

One easy reproduce for this is for a staff/TL4 to edit both the title and content of a topic, only one of the two edits will be shown (typically the post edit), and the other is indicated, but cant been seen.

2 Likes

Thanks for the report… :slight_smile:
Can you record a short video showing this behavior by chance?

If you look at chrome dev tools are there a bunch of errors there, requests that are not 200 ?

In the chrome dev tool console I see this, it appears to be a 429 (I don’t know what the 404 is for) :

content-script.js:1 cornhusk, shared-service, error: TypeError: Failed to construct 'URL': Invalid URLInvalid url: 
extractOriginPath @ content-script.js:1
Show 1 more frame
Show less
content-script.js:1 cornhusk, shared-service, error: TypeError: Failed to construct 'URL': Invalid URLInvalid url: 
extractOriginPath @ content-script.js:1
Show 1 more frame
Show less
video.google.com/get_player?docid=1wQ5F_aEDhPpC8sW7ZTrAhbNVrSOAXsXr&ps=docs&partnerid=30&cc_load_policy=1:1 
        
        
       Failed to load resource: the server responded with a status of 404 ()
content-script.js:1 cornhusk, shared-service, error: TypeError: Failed to construct 'URL': Invalid URLInvalid url: 
extractOriginPath @ content-script.js:1
Show 1 more frame
Show less
content-script.js:1 cornhusk, shared-service, error: TypeError: Failed to construct 'URL': Invalid URLInvalid url: 
extractOriginPath @ content-script.js:1
Show 1 more frame
Show less
content-script.js:1 cornhusk, shared-service, error: TypeError: Failed to construct 'URL': Invalid URLInvalid url: 
extractOriginPath @ content-script.js:1
Show 1 more frame
Show less
content-script.js:1 cornhusk, shared-service, error: TypeError: Failed to construct 'URL': Invalid URLInvalid url: 
extractOriginPath @ content-script.js:1
fingerprintPage @ content-script.js:1
observeCheckoutMutations @ content-script.js:1
Show 3 more frames
Show less
content-script.js:1 cornhusk, shared-service, error: TypeError: Failed to construct 'URL': Invalid URLInvalid url: 
extractOriginPath @ content-script.js:1
fingerprintPage @ content-script.js:1
observeCheckoutMutations @ content-script.js:1
Show 3 more frames
Show less
jquery.js:9930 
        
        
       POST https://xxxx.com/message-bus/2089d5dd986440908b29e8064c58d208/poll 429 (Too Many Requests)
send @ jquery.js:9930
ajax @ jquery.js:9511
s @ message-bus.js:22
n.baseUrl.n.ajax @ message-bus.js:88
k @ chunk.660.3ca404a8b6b50dfefca7.js:2
n @ chunk.660.3ca404a8b6b50dfefca7.js:2
(anonymous) @ chunk.660.3ca404a8b6b50dfefca7.js:2
setTimeout (async)
complete @ chunk.660.3ca404a8b6b50dfefca7.js:2
e.complete @ message-bus.js:17
l @ jquery.js:3213
fireWith @ jquery.js:3343
E @ jquery.js:9632
abort @ jquery.js:9332
unsubscribe @ chunk.660.3ca404a8b6b50dfefca7.js:2
unsubscribe @ presence.js:179
_unsubscribe @ presence.js:397
unsubscribe @ presence.js:101
_setupChannel @ composer-presence-display.js:81
_setupChannels @ composer-presence-display.js:93
b @ index.js:207
l @ index.js:423
p.invoke @ queue.ts:201
p.flush @ queue.ts:98
h.flush @ deferred-action-queues.ts:75
$._end @ index.ts:616
_boundAutorunEnd @ index.ts:257
Promise.then (async)
n @ platform.ts:28
flush @ index.js:41
$._scheduleAutorun @ index.ts:803
$._end @ index.ts:623
_boundAutorunEnd @ index.ts:257
Promise.then (async)
n @ platform.ts:28
flush @ index.js:41
$._scheduleAutorun @ index.ts:803
$._end @ index.ts:623
_boundAutorunEnd @ index.ts:257
Promise.then (async)
n @ platform.ts:28
flush @ index.js:41
$._scheduleAutorun @ index.ts:803
$._end @ index.ts:623
_boundAutorunEnd @ index.ts:257
Promise.then (async)
n @ platform.ts:28
flush @ index.js:41
$._scheduleAutorun @ index.ts:803
$._end @ index.ts:623
_boundAutorunEnd @ index.ts:257
Promise.then (async)
n @ platform.ts:28
flush @ index.js:41
$._scheduleAutorun @ index.ts:803
$._ensureInstance @ index.ts:791
$.ensureInstance @ index.ts:579
scheduleRevalidate @ index.js:5390
dirtyTag @ validator.js:411
R @ validator.js:486
F @ index.js:497
z @ index.js:533
De @ index.js:1409
Te @ index.js:1385
set @ observable.js:175
save @ composer.js:707
saveAction @ composer.js:554
_triggerAction @ d-button.js:178
click @ d-button.js:144
jquery.js:9930 
        
        
       POST https://xxxx.com/message-bus/2089d5dd986440908b29e8064c58d208/poll?dlp=t 429 (Too Many Requests)
send @ jquery.js:9930
ajax @ jquery.js:9511
s @ message-bus.js:22
n.baseUrl.n.ajax @ message-bus.js:88
k @ chunk.660.3ca404a8b6b50dfefca7.js:2
n @ chunk.660.3ca404a8b6b50dfefca7.js:2
(anonymous) @ chunk.660.3ca404a8b6b50dfefca7.js:2
setTimeout (async)
complete @ chunk.660.3ca404a8b6b50dfefca7.js:2
e.complete @ message-bus.js:17
l @ jquery.js:3213
fireWith @ jquery.js:3343
E @ jquery.js:9632
(anonymous) @ jquery.js:9878
load (async)
send @ jquery.js:9897
ajax @ jquery.js:9511
s @ message-bus.js:22
n.baseUrl.n.ajax @ message-bus.js:88
k @ chunk.660.3ca404a8b6b50dfefca7.js:2
n @ chunk.660.3ca404a8b6b50dfefca7.js:2
document.addEventListener.e.onVisibilityChange @ chunk.660.3ca404a8b6b50dfefca7.js:2
callback @ message-bus.js:49
d @ user-presence.js:90
p @ user-presence.js:103
m @ user-presence.js:110
22:1 Error handling response: TypeError: Cannot read properties of undefined (reading 'isCheckout')
    at chrome-extension://clmkdohmabikagpnhjmgacbclihgmdje/content-script.js:1:5043
22:1 Unchecked runtime.lastError: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

This means you are operating too fast and need to slow down. This is a protection mechanism to prevent someone from flooding your forum with scripts. Many web applications will tell you when you operate too quickly and then reject your operation.

3 Likes

I gathered that from the 429. If you see the video sample above does it look fast? The forum should be able to tell the difference between rapidly creating posts from the same account/ip v/s a user editing a post about 5 seconds later.

Plus: And I’m not seeing any issues editing this post every 5 seconds or so. This is my 5th edit now within a minute.

6th: so something changed after the 3.1.x upgrade because it was as working fine before. Or does the 429 threshold depend on the number of unicorns?

Does the 429 have anything to do with the number of unicorns configured (1 vs more)? I don’t see this issue on this site but consistently on my site.

So doesn’t it affect this site? I can make edits every few second to my post here without any issues whatsoever (I’ve tried editing upto 8 times within a few seconds of each other), but on my site it seems to be a problem (even with just 2 edits).

1 Like