Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android emulator with proxy settings - Error FATAL:.//android/base/sockets/ Check failed: isValidFd(fd). fd 1404 max1024

need to run emulator with proxy settings , I am using the following command in command prompt to start emulator

emulator -avd AVD_for_3_7_WVGA_Nexus_One -http-proxy http://username:password@IP:Port

Without http-proxy switch it is working fine , where as using the http-proxy following error occured :

 FATAL:.//android/base/sockets/SocketWaiter.cpp:89:Check failed: isValidFd(fd). fd 1404 max1024
like image 443
Divesh Pal Avatar asked Oct 21 '14 10:10

Divesh Pal


People also ask

How do I find the IP address of my Android phone emulator?

Just to clarify: from within your app, you can simply refer to the emulator as 'localhost' or 127.0. 0.1. Web traffic is routed through your development machine, so the emulator's external IP is whatever IP has been assigned to that machine by your provider.


3 Answers

I'm experiencing the exact same issue.

Luckily there is a workaround and I can say it's working (at least in my case): adding the -no-audio parameter to the command:

emulator -avd <device_name> -no-audio -http-proxy http://<username:password@>IP:Port

edit: even if it's working for you, please star the bug to get it fixed!

like image 166
ph0b Avatar answered Oct 06 '22 07:10

ph0b


For some reason Android Emulator doesn't like IP address as the proxy. If you are using Fiddler use localhost:8888:

emulator.exe -avd Nexus_5_API_21_x86 -no-audio -http-proxy localhost:8888

Don't forget -no-audio parameter too.

like image 6
Pavel Chuchuva Avatar answered Oct 06 '22 05:10

Pavel Chuchuva


Adding "-http-proxy none" (without quotes) in Run configuration also fixes this issue as shown in image attached. Please note this is one way of fixing this issue. Your app may not be able to connect to internet via proxy later on.

enter image description here

like image 2
Vinay Kadalagi Avatar answered Oct 06 '22 07:10

Vinay Kadalagi