# Websocket closed unexpectedly only on Windows/Mac

**URL:** <https://forum.mattermost.com/t/websocket-closed-unexpectedly-only-on-windows-mac/18991>\
**Category:** Uncategorized\
**Created:** [July 11, 2024, 12:23pm UTC](https://forum.mattermost.com/t/websocket-closed-unexpectedly-only-on-windows-mac/18991 "2024-07-11T12:23:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mymirror](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mymirror](https://forum.mattermost.com/u/mymirror)\
**Post date:** [July 11, 2024, 12:23pm UTC](https://forum.mattermost.com/t/websocket-closed-unexpectedly-only-on-windows-mac/18991/1 "2024-07-11T12:23:40Z")

</div>

Hello there!

I have a server with MM and the website which listens the MM’s websocket connection. It working perfectly on Ubuntu, but not working fully on Windows and Mac. On page reload I’m catching onClose event and got the message “connection unexpectedly closed”.

Does anybody knows what’s the reason of that behavior? I guess that the reason should be in the proxy settings of my website. But which exactly details should I recheck?

**UPD** : in much of cases I doesn’t receives any messages after on “onopen” event. And after that nothing happens. Just empty console and network.  
But in some cases it ends with “onclose” event.

---

<div class="post-metadata">

**Author:** ![john.oliver](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.oliver/32/6436_2.png) [@john.oliver](https://forum.mattermost.com/u/john.oliver)\
**Post date:** [July 11, 2024, 7:44pm UTC](https://forum.mattermost.com/t/websocket-closed-unexpectedly-only-on-windows-mac/18991/2 "2024-07-11T19:44:49Z")

</div>

Use a browser, open the Javascript console (Ctrl+Shift+J IIRC), and try again. See what those logs say. You can get logs from the app (kebab → View → Developer Tools) but I’m told a broser does a better job with those logs.

It might be an issue with CORS [Integrations configuration settings - Mattermost documentation](https://docs.mattermost.com/configure/integrations-configuration-settings.html#integrate-allowcorsfrom)

---

<div class="post-metadata">

**Author:** ![mymirror](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mymirror](https://forum.mattermost.com/u/mymirror)\
**Post date:** [July 12, 2024, 11:15am UTC](https://forum.mattermost.com/t/websocket-closed-unexpectedly-only-on-windows-mac/18991/3 "2024-07-12T11:15:13Z")

</div>

Hello, John!  
Thank you for your reply.

I’ve checked the console(Ctrl+Shift+J), but there are no new information here. It’s only successful message on “onOpen” event and nothing more. In the “network” browser tab in the mattermost websocket row I doesn’t see any messages in “messages” tab.

I guess that this is the my website server cause, but what exactly I can’t recognize.

---

<div class="post-metadata">

**Author:** ![john.oliver](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.oliver/32/6436_2.png) [@john.oliver](https://forum.mattermost.com/u/john.oliver)\
**Post date:** [July 12, 2024, 2:48pm UTC](https://forum.mattermost.com/t/websocket-closed-unexpectedly-only-on-windows-mac/18991/4 "2024-07-12T14:48:45Z")

</div>

You can also try asking in [Mattermost](https://community.mattermost.com/core/channels/developers)

Getting support is one of the many great things you get with a paid subscription!
