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

**URL:** https://meta.discourse.org/t/sorry-an-error-has-occurred-for-some-users-when-posting/308482
**Category:** Support
**Created:** [May 17, 2024, 9:03pm UTC](https://meta.discourse.org/t/sorry-an-error-has-occurred-for-some-users-when-posting/308482 "2024-05-17T21:03:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [May 17, 2024, 9:03pm UTC](https://meta.discourse.org/t/sorry-an-error-has-occurred-for-some-users-when-posting/308482/1 "2024-05-17T21:03:51Z")

</div>

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:

 ![Discourse error message: Sorry, an error has occurred](https://global.discourse-cdn.com/meta/original/4X/f/6/3/f6374c9f8f13cde0c8dc17874a7f3805acb63524.png)

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:

```plaintext
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.

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [May 17, 2024, 9:32pm UTC](https://meta.discourse.org/t/sorry-an-error-has-occurred-for-some-users-when-posting/308482/2 "2024-05-17T21:32:09Z")

</div>

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

```plaintext
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.

---

<div class="post-metadata">

### Author: ![Genisis](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@Genisis](https://meta.discourse.org/u/Genisis)
#### Post date: [May 17, 2024, 11:44pm UTC](https://meta.discourse.org/t/sorry-an-error-has-occurred-for-some-users-when-posting/308482/3 "2024-05-17T23:44:37Z")

</div>

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

 ![IMG_1002](https://global.discourse-cdn.com/meta/original/4X/7/4/e/74ee0687594370f1c4b98ed6bf9d0a2b679fb25f.jpeg)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 16, 2024, 11:45pm UTC](https://meta.discourse.org/t/sorry-an-error-has-occurred-for-some-users-when-posting/308482/4 "2024-06-16T23:45:28Z")

</div>

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