Open ollyde opened 2 years ago
Is this library still maintained?
I see many of the releases are many months ago. Still no support for V4 unless you use the Beta 2.0.0-beta.4-nullsafety.0
If it's not maintained can we get a deprecated flag on it so it pushes others to make alternative libraries :-)
I agree. Although the 2.0.0-beta.4-nullsafety.0
version works, there are some nuances which cause errors for example issues during reconnecting the socket etc.
AFAIK one of the main issues with websockets is that the server and client sides should be compatible with each other. So currently the only working version (for me atleast) is this beta one. Would really love a new and maintained version.
@RukshanJS it's been very solid for us, on all platforms (Web, Android, iOS, MacOS, and Windows) using it on production feels a bit risky though.
Yes the main functionality is working but sometimes for example when internet reconnects, the socket connection does not kick in again (works on android emulator not on a physical device hence I assumed a problem with the package)... I guess I will have to do some debugging then. 🙃
I find that if you call disconnect, destroy or dispose it never works again, instead we just do this
_socket?.clearListeners();
Then remake it.
I'm starting to worry about Flutter's retention in the future. And over the past 14 months, the Socket Io Client Beta version has not made any progress.
@huydq88 nah Flutter is booming, just this library needs some love
I find that if you call disconnect, destroy or dispose it never works again, instead we just do this
_socket?.clearListeners();
Then remake it.
Just wanted to thank you for this. This certainly helped clear out the excess listeners but still the reconnecting thing is not working as expected on a physical device. It just throws the SocketException
and does not reconnect to old socket - unless I start a new socket connection. (but works fine as expected on emulator - no SocketException
there).
Since this thread is for another discussion I'll try to debug and post a separate issue if this persists.
UPDATE - found related issue => #218
@RukshanJS we're using it on many phyiscal devices, Android, iOS, MacOS Apps, Windows Apps, Web (lots of browses) and it reconnects just fine, perhaps it's a serverside issue?
@jumperchen any thoughts?
@RukshanJS we're using it on many phyiscal devices, Android, iOS, MacOS Apps, Windows Apps, Web (lots of browses) and it reconnects just fine, perhaps it's a serverside issue?
😃 is that so? My backend is NestJS and using the latest versions of the packages @nestjs/platform-socket.io@8.4.7 and @nestjs/websockets@8.4.7. I think they use socket.io@4.5.1 under the hood. I wonder what causes it to throw that SocketException
in Flutter, only on the physical device. Tested several times to make sure as well. I'll update here for sure if I make any progress. Appreciate your support.
@RukshanJS I had issues with some of the socket packages that were a bridge to socket-io. I was using a Apollo GraphQL, scrapped their built in adaptor and used the raw socket-io with a redis adaptor for scalability.
@RukshanJS I had issues with some of the socket packages that were a bridge to socket-io. I was using a Apollo GraphQL, scrapped their built in adaptor and used the raw socket-io with a redis adaptor for scalability.
Oh maybe I should give it a try. Thanks for the tip 😃
I am planning to start chat functionality to my app and was searching for socketIo support package... I found this but doesn't seems like it maintained from long time... Any other package suggestions? or is it possible to connect server without any package?? 🤔
@rmControls could just use web-sockets, sure it requires a little more code and re-connection logic but it's possible and you get more control over bugs and connectivity.
@ollydixon My socket reconnection issue is now fixed. I did some code cleaning on Flutter client and that must've fixed some listeners or instances of the socket (have to check it more). Now the reconnection is working on physical device as well as expected. So... it seems the package is ok like you said. Cheers!
@RukshanJS if possible, can you please share the sample code which is working for you??
@jumperchen just released a new version: https://github.com/rikulo/socket.io-client-dart/commit/e629e191657f482d155ee1574de5ca3f920b9d17
@GabrielBB great thanks.
We really need union types 😂🙈 dynamic is dangerous.
@RukshanJS if possible, can you please share the sample code which is working for you??
Hi, really sorry couldn't get back to you earlier. I have hosted the full source code (with NestJS backend + Flutter frontend) which was a tutorial project that I did - https://github.com/RukshanJS/websockets-nestjs-flutter
In addition, I have written a complete tutorial that worked for me using this package. It is a three part series but if you want only the Flutter implementation, you can read the part 3 - https://dev.to/rukshanjs/part-33-how-to-create-a-server-side-timer-using-websockets-with-socketio-nestjs-and-flutter-10am or watch the part 3 on my YouTube channel https://youtu.be/kx7LQNNmTX4.
Very probable that you have found a working code by now... thought to share anyways..
@RukshanJS thank you... that still helps....
Is this library still maintained?
I see many of the releases are many months ago. Still no support for V4 unless you use the Beta 2.0.0-beta.4-nullsafety.0
If it's not maintained can we get a deprecated flag on it so it pushes others to make alternative libraries :-)