Original error: Error: socket hang up

This issue started after I upgraded my appium version to 1.8.1, I never got this issue in appium version 1.8.0
and now this happening after every single test case. :frowning:

Appium version - 1.8.1

2018-08-14 18:42:46.413 TRACE Capabilities
{app: /Users/navneet.kumar/rel...,
appPackage: jp.co.xxxxx.sdk.xxxx...,
automationName: uiautomator2,
deviceName: ZX1G42BKJT,
newCommandTimeout: 300,
platformName: ANDROID,
platformVersion: 7.0,
recreateChromeDriverSessions: true}

Aug 14, 2018 6:43:32 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '400' -> incorrect JSON status mapping for 'unknown error' (500 expected)
2018-08-14 18:43:32.878 ERROR Error occurred while creating sessison, cause :Could not proxy command to remote server. Original error: Error: socket hang up
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: 'P33261', ip: 'fe80:0:0:0:18cc:8fe:fb58:4b99%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_161'
Driver info: driver.version: AndroidDriver
remote stacktrace: ProxyRequestError: Could not proxy command to remote server. Original error: Error: socket hang up
at JWProxy.proxy$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:152:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous> 2018-08-14 18:43:32.902 INFO

Device logs

11563 11707 I appium : channel read invoked!
11563 11707 I appium : channel read: DELETE /wd/hub/session/7ad9ca48-52f9-40f7-ad8f-abce31acf023
11563 11707 I appium : Delete session command
11563 11707 D appium : Stopping toast notification listener.
19668 27749 W AppOps : Bad call: specified package io.appium.uiautomator2.server.test under uid 10865 but it is really 10866
19668 27749 W AppOps : java.lang.RuntimeException: here
19668 27749 W AppOps : at com.android.server.AppOpsService.getOpsRawLocked(AppOpsService.java:1257)
19668 27749 W AppOps : at com.android.server.AppOpsService.getOpLocked(AppOpsService.java:1289)
19668 27749 W AppOps : at com.android.server.AppOpsService.finishOperation(AppOpsService.java:1136)
19668 27749 W AppOps : at com.android.server.power.Notifier.onWakeLockReleased(Notifier.java:250)
19668 27749 W AppOps : at com.android.server.power.PowerManagerService.notifyWakeLockReleasedLocked(PowerManagerService.java:1043)
19668 27749 W AppOps : at com.android.server.power.PowerManagerService.removeWakeLockLocked(PowerManagerService.java:966)
19668 27749 W AppOps : at com.android.server.power.PowerManagerService.releaseWakeLockInternal(PowerManagerService.java:944)
19668 27749 W AppOps : at com.android.server.power.PowerManagerService.-wrap22(PowerManagerService.java)
19668 27749 W AppOps : at com.android.server.power.PowerManagerService$BinderService.releaseWakeLock(PowerManagerService.java:3229)
19668 27749 W AppOps : at android.os.IPowerManager$Stub.onTransact(IPowerManager.java:94)
19668 27749 W AppOps : at android.os.Binder.execTransact(Binder.java:565)
11563 11707 I appium : Stopping uiautomator2 io.appium.uiautomator2.http io.appium.uiautomator2.server
11563 11707 I appium : AppiumResponse: {"sessionId":"7ad9ca48-52f9-40f7-ad8f-abce31acf023","status":0,"value":"Session deleted"}

Similar kind of issue am also Facing can any one share the possible fixes? what need to done?

I am also facing same issue. Anyone have solution

Is there any fix for this?! please
Suddenly every and I mean every test of mine is giving me Error: socket hang up

This is incredible, it used to work yesterday, did some changes to reporting and now I cannot even run a test