rikulo / socket.io-client-dart

socket.io-client-dart: Dartlang port of socket.io-client https://github.com/socketio/socket.io-client
https://quire.io
MIT License
675 stars 185 forks source link

Error Timeout #366

Open MarceloRab opened 9 months ago

MarceloRab commented 9 months ago

I've been trying for 8 hours and nothing. 😒. Web app on localHost and Android works perfectly.

Only on flutter web (Chrome) and with server it doesn't work..❗

Fluttter Web Site = > https://.... (Vercel) Server = > https://... (Render)

My versions. Flutter 3.19.0 Dart 3.3.0 socket_io_client 2.0.3+1

All these measures did not work.

1) Downgrade Socket.io node from 4.7.4 => 4.6.2. 👉 Doesn't work

2) Flutter = >

IO.io(socketUrl, <String, dynamic>{ 'autoConnect': false, 'transports': ['websocket'], 'rejectUnauthorized': false, 'withCredentials': false, });

👉 Doesn't work

3) Node Server = >

this.io = new socketIo.Server(this.server, { colors: { origin: [ ''my_cors", //"*", ], credentials: false,

👉 Doesn't work

Error thrown ▶ timeout in all states.

jumperchen commented 9 months ago

Could you please try this v3.0.0-beta.0, and see if it solves your problem? Fyi, from the previous test on v3.0.0-beta.0, it worked well on Node Server v4.7.4 version with Dart Web.

MarceloRab commented 9 months ago

@jumperchen

Unfortunately it has the same result. Doesn't make the connection. 😥

Could it be due to the lack of key, cert.pem?

jumperchen commented 9 months ago

@MarceloRab It could be more like a configuration issue, rather than the library issue.

MarceloRab commented 9 months ago

@jumperchen

unfortunately, 😥, I couldn't find an example of Flutter web with socket client and server in production. Using https.

jumperchen commented 9 months ago

This could help, and it works for me on self signing certificate at LocalHost.

MarceloRab commented 8 months ago

I ended up moving my project to Firebase with streams.

kjxbyz commented 8 months ago

node

socket.io: ^4.7.4

flutter

The local environment runs normally, but an error occurs after deploying to render.

flutter: 3.19.3 socket_io_client: ^2.0.3+1

2024-03-10 19 47 15

next

It work normal.

next: ^14.1.3 socket.io-client: ^4.7.4

[EDIT]

socket_io_client is upgraded to 3.0.0-beta.1, the flutter code works normally.