Android emulator fails to connect host on different box

58 views
Skip to first unread message

Barton Hammond

unread,
Oct 6, 2020, 12:37:00 PM10/6/20
to Flutter Development (flutter-dev)
Hi Flutter Community.
My Flutter app runs fine w/ iOS.  My server is running on different ip (192.168.1.44).  When I try running on Android Emulator it fails to connect to that remote server.  I have the Android Manifest include `<uses-permission android:name="android.permission.INTERNET"/>`.    I've tried Wipe Data in the Android VDM.  I've tried Cold Start also.  At a loss what to do...

Souvik Dutta Chowdhury

unread,
Oct 6, 2020, 11:22:38 PM10/6/20
to Barton Hammond, Flutter Development (flutter-dev)
Check if your emulator can connect to the internet itself.

On Tue, 6 Oct 2020, 10:07 pm Barton Hammond, <barton...@gmail.com> wrote:
Hi Flutter Community.
My Flutter app runs fine w/ iOS.  My server is running on different ip (192.168.1.44).  When I try running on Android Emulator it fails to connect to that remote server.  I have the Android Manifest include `<uses-permission android:name="android.permission.INTERNET"/>`.    I've tried Wipe Data in the Android VDM.  I've tried Cold Start also.  At a loss what to do...

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/c4c5f6b6-f733-4e0b-b665-5b8b086ec78cn%40googlegroups.com.

Barton Hammond

unread,
Oct 7, 2020, 9:33:03 AM10/7/20
to Flutter Development (flutter-dev)
Yes, good idea.  I verified I have access to a different server from the flutter app.  When the `graphql_flutter` call (the one I'm having troubles with) fails,  the client logs that to this other server.  So I believe something is wrong w/ the calls via `graphql_flutter`.  I inspected the results object and now see this `SocketException (SocketException: OS Error: Connection refused, errno = 111, address = example.com, port = 55784)`. The port is incorrect.  I need to find where that port is getting set.  

Barton Hammond

unread,
Oct 7, 2020, 10:36:13 AM10/7/20
to Flutter Development (flutter-dev)
I've determined that it's the SSL connection that is failing.  I am running Nginx w/ SSL in front of my GraphQL Server.  When I turn off the SSL, the Android emulator works just fine.  I'll now focus on getting SSL working w/ Android.
Reply all
Reply to author
Forward
0 new messages