Android bootstrap socket crashed when PC offline

I would like to run tests with a standalone PC, no network connections, but I’m getting an error.
Same tests work with only enabling wifi.

Envt:
using latest appium server, python client library, ubuntu 14.04.
client and server on same PC
Android handset (galaxy S5 6.0.1) connected over USB

When PC is on wifi, my tests run fine.

When I disable wifi, I get this error on appium server:
[debug] [ADB] Creating ADB subprocess with args: -P, 5037, -s, e2c9ba3c, shell, uiautomator, runtest, AppiumBootstrap.jar, -c, io.appium.android.bootstrap.Bootstrap, -e, pkg, com.example.android.apis, -e, disableAndroidWatchers, false, -e, acceptSslCerts, false
[debug] [UiAutomator] Moving to state ‘online’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Loading json…
Error: Android bootstrap socket crashed: Error: getaddrinfo EAI_AGAIN undefined:4724
at Socket. (lib/bootstrap.js:87:21)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at connectErrorNT (net.js:1015:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

python script fails here:
self.driver = webdriver.Remote(‘http://localhost:4723/wd/hub’, desired_caps)
URLError: <urlopen error [Errno 111] Connection refused>

any suggestions?

I encountered the same problem and found that only when the computer is in the “networking” state, it will appear this problem.If the computer in the offline or online ,this problem will not appear. hope this helps.

Same problem here. I dont think https://github.com/appium/appium/issues/6666 should be closed.

Its very easy to replicate, just removing the network connection and launch one test (am in Windows now).

@jlipps

For Linux: To resolve “Android bootstrap socket crashed” issue, check the following

  1. Make sure you have the entry for localhost in /etc/hosts
  2. Node through which appium is launched will resolve the localhost through nscd deamon. So nscd deamon might not been installed in your linux.