Tramontana-for-Javascript icon indicating copy to clipboard operation
Tramontana-for-Javascript copied to clipboard

No websocket initiation in p5.js web editor

Open trych opened this issue 4 years ago • 4 comments

When I try to setup the tramontana basic example sketch in the p5.js web editor, I get this error message:

Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS. (: line 11)

I am using Chrome. Is there any way I can work around this? Thanks!

trych avatar Dec 15 '19 21:12 trych

Is there a reason you need the p5 web editor? Have you tried to run this locally https://tramontana.xyz/tramontanajavascriptgettingstarted_2_2 ?

dackdel avatar Dec 16 '19 09:12 dackdel

It would be really nice, if it worked in the p5.js web editor as this is by far the easiest and quickest way to set up a sketch and seems to have become a standard amongst p5.js users in recent months. I teach a creative coding class, where we use the p5.js web editor exclusively.

Having said that, I tried to run this locally on my mac now and it still does not work. In the console, it gives me this error:

WebSocket connection to 'ws://192.168.178.56:9092/' failed: WebSocket is closed before the connection is established.

trych avatar Jan 04 '20 17:01 trych

Tramontana does not currently support secure WebSockets (wss protocol), so it can't be used from a webpage loaded via HTTPS like the p5.js web editor.

Regarding your last issue, it might be that the IP address is not correct or is not reachable by your machine, e.g. if the phone and your Mac are connected to two different routers.

egueli avatar Jan 07 '20 21:01 egueli

Tramontana does not currently support secure WebSockets (wss protocol), so it can't be used from a webpage loaded via HTTPS like the p5.js web editor.

Ok, so this is out of the question then, alright.

Regarding your last issue, it might be that the IP address is not correct or is not reachable by your machine, e.g. if the phone and your Mac are connected to two different routers.

No, I triple checked the ID and there is just one router they are connected to. Any other ideas?

trych avatar Jan 07 '20 21:01 trych