Error: Android bootstrap socket crashed: Error: connect ECONNREFUSED ::1:4724

hi, anyone help? when i run the test sample, it throw exception like below, thank you for helping!

[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/home/niko/Development/android-sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“getprop”,“persist.sys.language”]
[debug] [ADB] Current device property ‘persist.sys.language’: en
[debug] [ADB] No strings.xml for language ‘en’, getting default strings.xml
[debug] [ADB] Reading strings from converted strings.json
[debug] [ADB] Running ‘/home/niko/Development/android-sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“push”,"/tmp/com.kalengo.loan/strings.json","/data/local/tmp"]
[debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running ‘/home/niko/Development/android-sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“forward”,“tcp:4724”,“tcp:4724”]
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state ‘starting’
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: ‘AppiumBootstrap.jar’
[debug] [ADB] Running ‘/home/niko/Development/android-sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“push”,"/home/niko/.nvm/versions/node/v7.1.0/lib/node_modules/appium/node_modules/appium-android-bootstrap/bootstrap/bin/AppiumBootstrap.jar","/data/local/tmp/"]
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/home/niko/Development/android-sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“ps”]
[debug] [ADB] Attempting to kill process 2326
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/home/niko/Development/android-sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“kill”,2326]
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“uiautomator”,“runtest”,“AppiumBootstrap.jar”,"-c",“io.appium.android.bootstrap.Bootstrap”,"-e",“pkg”,“com.kalengo.loan”,"-e",“disableAndroidWatchers”,false,"-e",“acceptSslCerts”,false]
[debug] [UiAutomator] Moving to state ‘online’
Error: Android bootstrap socket crashed: Error: connect ECONNREFUSED ::1:4724
at Socket. (…/…/lib/bootstrap.js:87:21)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Have you upgraded SDK Manager???

yes, android sdk tools 25.2.4, android sdk platform-tools 25.0.3, sdk build-tools 25.0.2, android support repository 41. is it right?

Reboot the system once `and re-try

lol, it doesn’t work

i had the same issue , can you please share me your APK file if possible I will try on my android automation framework

Try with real device

can’t work in real device

got any solution for this?

Please upgrade Java_Client , Selenium to latest version and try.
or
Change the capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, “Appium”);