Is Websocket Secure (wss) supported?

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:

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);
};

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?

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.

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:

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.

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?

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!

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.

I confirmed we can do a fetch request over https!