# Is Websocket Secure (wss) supported?

**URL:** <https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422>\
**Category:** UXP Plugin API\
**Tags:** javascript\
**Created:** [January 11, 2021, 7:19pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422 "2021-01-11T19:19:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [January 11, 2021, 7:19pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/1 "2021-01-11T19:19:57Z")

</div>

Hi!

I’m seeing some strange behavior whenever I open a websocket with wss in the URI instead of ws. It instantly returns an error on open, and refuses to connect. With a standard websocket, it connects just fine.

Any ideas what’s happening or if there’s a feature I’m not taking advantage of?

If not, is this a bug?

Change the websocket url below to “ws://echo.websocket.org” to see a working version.

For this demo, I added this code to the UI kitchen sink to test. Here’s the error object it returns:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/5/5d8e58a8e34ccb877dd9ea87a02758d557f49fe5.png)

```auto
let ws = new WebSocket("wss://echo.websocket.org");

ws.onopen = function (e) {
	console.log('Open: ',e);
};

ws.onmessage = function (e) {
	console.log("From Server:" + e);
};

ws.onerror = function (e) {
	console.log('Error: ', e);
};

```

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [January 11, 2021, 9:02pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/2 "2021-01-11T21:02:48Z")

</div>

Yes; `wss` is supported. I just tried from a debugging session in Ps, and it worked fine. Perhaps the server was having problems? Or, possibly, you’re behind a proxy? If you log `e.message` when you get the error, what’s the response?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/9/91ae2ed95d36354f2511c61eeef62ca1c81896e8.png)

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [January 11, 2021, 9:28pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/3 "2021-01-11T21:28:25Z")

</div>

Well that’s strange…

No proxies here, and the error is an unusual object (screenshot below) with no message.  
I just tried again as well and same result. I had a colleague test this same code in his own playground, and he encountered the same error object.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/4/422c2c78e6821401d3e825fc49e122cd2b9eef4a.png)

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [January 11, 2021, 9:55pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/4 "2021-01-11T21:55:58Z")

</div>

Just to be super, triply sure:

I had another developer in Nevada and one in Cali attempt the same thing. They got the same result (screenshot below).

Is there a way we can get the version of our environment that might help track down if perhaps we’re behind on an update? (Or is it only the Photoshop version we’d need to help debug?)

Corrected screenshot to include e.reason and e.message:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/8/86f15a843130bcb4673de76930f9c8a71e532f10.png)

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [January 12, 2021, 5:18pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/5 "2021-01-12T17:18:23Z")

</div>

So, your screenshot looks like Windows – and on my Windows machine, I can confirm that the request is failing. I’m not sure why, though – may be something SSL related since the failure is so immediate with so little information.

You might try with your own websocket server to see if you get more information as to the failure. I’ll also forward this along internally, since there may be a bug on our end. This used to work fine, but it may be a regression.

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [January 12, 2021, 5:49pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/6 "2021-01-12T17:49:00Z")

</div>

Thanks Kerri! You’re correct. I’m on Windows.

I confirmed with our own websocket server as well and got the same result. Unfortunately, no additional information was available.

I also confirmed that this works on my Mac, so that definitely narrows it down to a Windows issue!

Any ideas where I might be able to get updated on if/when it’s getting fixed?

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [January 13, 2021, 12:30am UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/7 "2021-01-13T00:30:16Z")

</div>

Kerri, a little bit of information to pass along:

We traced the tcp activity at the server level where the websocket endpoint lives, to see if there was anything unusual going on.

As far as we can tell, the websocket handshake appears to be functioning as expected, and then something inside Ps breaks after, perhaps at the completion of the handshake on open.

Just wanted to provide a little more info to help debug!

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [January 13, 2021, 5:00pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/8 "2021-01-13T17:00:03Z")

</div>

Thanks!

It sounds like the initial handshake is working OK, but the transition to websocket protocol is breaking… strange! We do use boringSSL for Windows, so I wonder if there’s something going on in the SSL layer…

Can you make `fetch` HTTPS requests to the same server without issue? That might provide some leads.

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [January 14, 2021, 6:24pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/9 "2021-01-14T18:24:05Z")

</div>

I confirmed we can do a fetch request over https!

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [February 3, 2021, 2:10am UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/10 "2021-02-03T02:10:23Z")

</div>

Any chance someone looked into this bug?

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [February 11, 2021, 4:45pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/11 "2021-02-11T16:45:20Z")

</div>

Just a heads up, Kerri. Tested on the newest 22.2.0 and the same issue still exists.

Any chance it’s being checked out, or is it lost in the ether?

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [February 11, 2021, 5:04pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/12 "2021-02-11T17:04:35Z")

</div>

I’ve asked the team to take a look; will get back to you with any updates. I think I missed sending this to them the last time – my apologies.

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [February 11, 2021, 5:08pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/13 "2021-02-11T17:08:26Z")

</div>

Thanks Kerri! The help is much appreciated.

As soon as this is fixed I can release my new plugin to replace the old CEP stuff. 😃

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [March 10, 2021, 9:29pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/14 "2021-03-10T21:29:47Z")

</div>

Hey Kerri!  
Any news from the team on this bug? 🙂

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [March 12, 2021, 5:43pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/15 "2021-03-12T17:43:19Z")

</div>

I’ll check with the team.

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [March 31, 2021, 10:42pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/16 "2021-03-31T22:42:31Z")

</div>

Hey Kerri! Rollin’ the dice to see how lucky I might be for April!

Any luck? haha

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [April 6, 2021, 1:33am UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/17 "2021-04-06T01:33:25Z")

</div>

Ok – update!

We’ve figured out the root cause of the problem, and there’s nothing you can do on the server side to rectify it. The issue is that the certificate store isn’t getting loaded correctly, and so UXP closes the connection as if it found a certificate it couldn’t validate.

I’ve got the team looking into the fix. I’m hopeful it can be in place for the June release of Ps. Cross your fingers. 🙂

If you want to _test_ things out before the fix, there’s a workaround – get your hand on a cert.pem file (Mac or Linux should do) and copy it to C:\etc\ssl\cert.pem. Once done, your WSS connection will start working. This is not a solution for end users, but would unblock things enough to test the rest of the plugin.

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [April 6, 2021, 2:04am UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/18 "2021-04-06T02:04:59Z")

</div>

Kerri,

You are AWESOME. Thank you for following up and tracking this down!

Looking forward to that June update!

---

<div class="post-metadata">

**Author:** ![Rammy](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/rammy/32/674_2.png) [@Rammy](https://forums.creativeclouddeveloper.com/u/Rammy)\
**Post date:** [June 4, 2021, 2:56pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/19 "2021-06-04T14:56:30Z")

</div>

Two months of crossed fingers later… haha

So how’s it looking, Kerri?

Is June gonna be a victory month?!

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [June 4, 2021, 10:52pm UTC](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422/20 "2021-06-04T22:52:17Z")

</div>

It’s fixed as part of UXP 5.1. As to when Ps releases w/ this, that’s a harder question, since it’s up to them when they pick it. Not much longer to wait, though.

If you aren’t already, please join the prerelease. You’ll get a version that works there earlier than the general public. Note, though, that the prerelease is still on 5.0, so don’t get your hopes up just yet. 🙂

[Next page](https://forums.creativeclouddeveloper.com/t/is-websocket-secure-wss-supported/2422.md?page=2)
