socket.io-client-dart icon indicating copy to clipboard operation
socket.io-client-dart copied to clipboard

domain https errore for flutter web

Open m2faridi opened this issue 3 years ago • 4 comments

hi i have problem in domain https cloudflare

If my site domain is http, the socket will be connected But if the domain is https, the socket will not be connected I connect the socket with ip This problem exists in the web version flutter for me

m2faridi avatar Jan 17 '22 17:01 m2faridi

Can you attach some more information? such as the version of socket.io client you're using and how you're connecting? and maybe the cloudflare endpoint you're using.

Advait1306 avatar Jan 24 '22 05:01 Advait1306

i use socket_io_client 1.0.2 and domain https cloudflare set in socket.io server const httpsServer = https.createServer({ "key" : fs.readFileSync( __dirname+"/PrivateKey.key", 'utf8' ), "cert": fs.readFileSync( __dirname+"/Certificate.pem", 'utf8' ), "ca" : fs.readFileSync( __dirname+"/ca.pem" , 'utf8') }); good in mobile ,desktop but flutter web not working

m2faridi avatar Jan 24 '22 10:01 m2faridi

i have. this error in developer tools chrome main.dart.js:126148 WebSocket connection to 'wss://example.com/socket.io/?EIO=3&transport=websocket' failed: WebSocket is closed before the connection is established.

m2faridi avatar Jan 24 '22 10:01 m2faridi

I have the same issue, any updates?

KarimMohamed20 avatar Feb 28 '22 02:02 KarimMohamed20