Whenever I try to do an http call after about 20 seconds I get in the console the following error:
E/flutter ( 8274): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter ( 8274): SocketException: Failed host lookup: 'flutter-project-xxxxx.firebaseio.com' (OS Error: No address associated with hostname, errno = 7)
This error happens for every method and every route I call through the app http package.
I'm developing a flutter app on Windows, using an AVD virtual device from Android Studio.
Versions:
http: ^0.12.0+1
flutter: 1.0
Cases:
From home or though tethering from my phone:
connectivity works fine on every part of the virtual device
From my work network (behind the firewall):
Only with Android Web View, I can browse the internet without any problem (i can even call the same url, I use in the code and it works).
I get a connection error when using any other application (Chrome, Google Play, ecc...) in the virtual device, and specifically the "SocketException", when testing my app.
What is the difference between the calls coming from that app?
Is there a way to route my app calls the same way as the ones in the webview?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…