Https site connecting to wireless Phidget (websocket) error

Supporting Browser-based Javascript and Node.js
Post Reply
djvb
Fresh meat
Posts: 2
Joined: Tue Jan 19, 2021 9:09 am
Contact:

Https site connecting to wireless Phidget (websocket) error

Post by djvb »

I cannot seem to connect to the phidget webservice (locally) from my website (https) in the chrome browser (kiosk mode).

Im getting the following error:

Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS

Anyonen got tips for me?
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Https site connecting to wireless Phidget (websocket) error

Post by mparadis »

The only other time I've seen a user report this error is when they had breakpoints set somewhere in their Javascript that they'd forgotten to clear.
djvb
Fresh meat
Posts: 2
Joined: Tue Jan 19, 2021 9:09 am
Contact:

Re: Https site connecting to wireless Phidget (websocket) error

Post by djvb »

No breakpoints set :-)
Problem is that using (insecure) websockets in a secure website triggers this error. And i have to use a secure (https) website (pwa).

(I’m using the plain javascript implementation)
User avatar
Patrick
Lead Developer
Posts: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Https site connecting to wireless Phidget (websocket) error

Post by Patrick »

Yes, the network server does not support secure websockets (wss). You will probably needs to set up your webserver to proxy secure websocket connections to the network server.

-Patrick
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 13 guests