dart-lang / web_socket_channel

StreamChannel wrappers for WebSockets.
https://pub.dev/packages/web_socket_channel
BSD 3-Clause "New" or "Revised" License
419 stars 109 forks source link

Failed host lookup: 'www.xyz.com' (OS Error: No address associated with hostname, errno = 7) #279

Closed gbfarah closed 1 year ago

gbfarah commented 1 year ago

We are getting this issue on Android device even though it is connected to internet and the server is up....

when calling several times over a 5 min period the above error is encountered

var channel = IOWebSocketChannel.connect(Uri.parse(url), connectTimeout: const Duration(seconds: 3));

What is strange is that on the same device and the same time when opening the URL in chrome there are no issues

Anyone else getting this issue

kemalinnowise commented 1 year ago

I got the same issue, any updates ? In my case I imitate situation when user might lost connection. After connection is coming back I got similar error and cannot connect till I close app and open again

natebosch commented 1 year ago

This issue is not actionable in this repository. Questions about using networking in flutter are better answered by the flutter team, or in places like stack overflow.

If you do think there is a bug in this library (for examplesome bad behavior happens when you use this package, but not when you use WebSocket from dart:io) please file an issue with a complete reproduction case.