Open MarceloRab opened 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.
@jumperchen
Unfortunately it has the same result. Doesn't make the connection. 😥
Could it be due to the lack of key, cert.pem?
@MarceloRab It could be more like a configuration issue, rather than the library issue.
@jumperchen
unfortunately, 😥, I couldn't find an example of Flutter web with socket client and server in production. Using https.
This could help, and it works for me on self signing certificate at LocalHost.
I ended up moving my project to Firebase with streams.
socket.io: ^4.7.4
The local environment runs normally, but an error occurs after deploying to render.
flutter: 3.19.3 socket_io_client: ^2.0.3+1
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.
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.