-
Notifications
You must be signed in to change notification settings - Fork 190
Not able to connect to nodeJS server on localHost #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Which version are you using? (both client and server) |
@LucasMorais10 I try with your example in my env. with Android simulator and it works well.
|
Hi @jumperchen, thanks for the answer. Here are the versions for my env:
I updated socket_io_client to 0.9.8 and still getting the same error. Do you think it could be something wrong on my network? |
@LucasMorais10 Did you use it in your Android Studio? or in a real mobile device? |
It is a real android device. Both pc and android device are connected to the same router. I also tried to disable all firewall on server side, but didn't help anyway. I can ping between them and access the server on the Android web browser. I don't see why i can't connect with the flutter client :/ |
Any Update on this? Getting the same problem |
@theguywithideas can you provide an example to demonstrate the issue you met? |
make sure you add this |
@jumperchen @aakash9518 I was able to find the problem in my code and correct it. Thanks for the prompt replies though. |
@theguywithideas What was the issue cause I'm having the same problem? |
@aquibbaig the problem that I faced was because of the way this package is accepting the endpoint of socket.io. In my case it was https://subdomain.domain.com/socketio initially and the connection to that endpoint was getting rejected. I later found out that the library expects the url in the format https://subdomain.domain.com only. The /socketio part after that is being considered as a namespace and that's why my connection was getting established. I just changed my socketio server domain to https://someothersubdomain.domain.com and got rid of /socketio part and it got connected to the default namespace. Not sure if you are facing the same problem or not. I think they should mention this in docs. |
Thanks for your quick update. I was actually facing a CORS issue! |
Im having this problem, but my localserver is https. The error is: Any tips on how to use it with self signed cert? |
FYI: dart-lang/sdk#34284 |
Hi, i'm trying to stabilish a connection between a nodeJS server and a flutter app but I always receive connect_error on client side. If I try to connect by the browser, it's successful, so i think the problem is on client side.
My nodeJS server:
Client side is implemented on InitState as follows:
The client keeps showing the output "connect_error: timeout".
Anybody can help? Thanks in advance.
The text was updated successfully, but these errors were encountered: