Uxp use socket to communicate with external programs issue

When using the ‘helper’ and ‘uxp’ components in the ‘AdobeDocs/uxp-photoshop-plugin-samples/desktop-helper-sample’ project on Windows, they both establish connections without any issues. However, upon closing the ‘helper,’ you may encounter the following error message.

Uncaught Error: The web socket is already closed. uxp://uxp-internal/domjs_scripts.js:2

To re-establish the connection, you’ll need to restart Photoshop. Are there any experts out there who can offer guidance on resolving this issue?

It works fine when connected on a Mac, only on Windows is where the issue arises.

Thanks for reporting the issue.
I’ve tested the issue and confirmed that it occurs on Windows.
WebSocket.close() should not throw an exception if it’s already CLOSED or CLOSING.
(See 3 from WebSockets Standard)
It’s an UXP issue. I’ve created a bug ticket for the issue.

cc @Sujai

1 Like

@mykim Thank you for your assistance