"Sorry, an error has occurred." for some users when posting

I’m getting an error message on my forum whenever I create a post or private message. It’s happening to some users but not all. The post goes through but the modal shows up. The editor springs back up, empty, but once I close it, the post has been created.

Has anyone experienced this or know what it might be?

Here’s the modal:

The only network request is a POST to /posts, and the response looks fine. The response is a 200 status code.

This is the error in the browser console:

13:57:31.681 c@https://forum.example.com/theme-javascripts/319b78ccb2c844f6b37730b62c1e9a2498e69811.js?__ws=forum.example.com:5:88
e.default</<@https://forum.example.com/theme-javascripts/319b78ccb2c844f6b37730b62c1e9a2498e69811.js?__ws=forum.example.com:6:307
m@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:62455
trigger@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:155859
createPost@https://forum.example.com/assets/chunk.c050e176156cd4d89bfc.d41d8cd9.js:141768:24
async*1035/save/<@https://forum.example.com/assets/chunk.c050e176156cd4d89bfc.d41d8cd9.js:141575:62
_@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:412774
w/<@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:413200
invoke@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:358136
flush@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:357213
flush@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:358976
_end@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:364059
B/this._boundAutorunEnd@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:360483
promise callback*n/<@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:355561
flush@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:217160
_scheduleAutorun@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:366259
_ensureInstance@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:366146
ensureInstance@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:363710
scheduleRevalidate@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:40579
dirtyTag@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:347472
T@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:347962
j@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:68699
D@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:68906
Ae@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:77423
Ce@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:77213
set@https://forum.example.com/assets/vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:11:169787
save@https://forum.example.com/assets/chunk.c050e176156cd4d89bfc.d41d8cd9.js:166992:14
saveAction@https://forum.example.com/assets/chunk.c050e176156cd4d89bfc.d41d8cd9.js:166839:10
_triggerAction@https://forum.example.com/assets/chunk.c050e176156cd4d89bfc.d41d8cd9.js:24264:23
click@https://forum.example.com/assets/chunk.c050e176156cd4d89bfc.d41d8cd9.js:24231:17
ajax-error.js:8

I’ve tried Firefox and Safari on Mac. Disabled ad-blockers, turned off VPN. It works on my phone (Safari, with the same VPN).

At least two other people experience it with Chrome on Windows, but another person doesn’t experience it with Chrome on Windows.

The forum has been rebuilt and updated a couple of times since the problem first appeared.

I found it. There was some analytics code like this:

function sendClickyEvent(href, title, type) {
    if (clicky && clicky.log) {
        clicky.log(href, title, type);
    }
}

It should be window.clicky to avoid an error, but I just wrapped all the analytics code in try/catch blocks to be sure.

It was crashing when posting for users who didn’t load the analytics, because it was trying to send an event to log the creation of the new post.

1 Like

My users get this when uploading a video , it’s behind cloudflare tunnel. Tested with 20-50MB video

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.