appium: "Error: socket hang up" in iOS tests
The problem
Hi all! I try to update appium from 1.9.1 to 1.14.0. We have 35 tests. After update, my tests sometimes failed (6-10 random tests from 35). Everytime I get error:
- From Visual Studio
An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: socket hang up
- I found it in appium logs
[XCUITest] xcodebuild exited with code 'null' and signal 'SIGKILL' [WD Proxy] Got an unexpected response: {"code":"ECONNRESET"} [W3C (98e37bd1)] Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: socket hang up
- And this one from simulator logs everytime
Aug 1 12:19:13 macmini-3 com.apple.CoreSimulator.SimDevice.999E28FA-88CE-4E3D-9D05-499EFDE3A5DD[30232] (UIKitApplication:com.apple.test.WebDriverAgentRunner-Runner[0x48b5][30254][30748]): Service exited with abnormal code: 74
It’s may happens in random place in test. When the test starts it deletes old simulator and creates new one on mac-mini with last macOS Mojave. At the same time, I have two running tests. Each appium I run with other ports:
- appium -p 4723 --webdriveragent-port 8100
- appium -p 4730 --webdriveragent-port 8105
Environment
- Appium version (or git revision) that exhibits the issue: 1.14.0
- Last Appium version that did not exhibit the issue (if applicable): 1.9.1
- Desktop OS/version used to run Appium: macOS Mojave 10.14.6
- Node.js version (unless using Appium.app|exe): 10.16.0
- Npm or Yarn package manager: npm 6.10.1
- Mobile platform/version under test: iOS 12.4
- Real device or emulator/simulator: simulator
- Appium CLI or Appium.app|exe: Appium CLI
- Xcode: 10.3
- Xcode-select version 2354
Details
My Capabilities:
appiumOptions.AddAdditionalCapability(MobileCapabilityType.PlatformVersion, "12.4");
appiumOptions.AddAdditionalCapability(MobileCapabilityType.App, _deviceSettings.BuildUrl);
appiumOptions.AddAdditionalCapability(MobileCapabilityType.NewCommandTimeout, 900);
appiumOptions.AddAdditionalCapability("wdaLaunchTimeout", 360000);
appiumOptions.AddAdditionalCapability("wdaConnectionTimeout", 360000);
appiumOptions.AddAdditionalCapability("reduceMotion", true);
appiumOptions.AddAdditionalCapability("skipLogCapture", true);
appiumOptions.AddAdditionalCapability("iosInstallPause", 8000);`
appiumOptions.AddAdditionalCapability(MobileCapabilityType.DeviceName, _deviceSettings.Hostname);
appiumOptions.AddAdditionalCapability("wdaLocalPort", _deviceSettings.Port);
I’ve tried to remove/change
appiumOptions.AddAdditionalCapability("wdaLaunchTimeout", 360000);
appiumOptions.AddAdditionalCapability("wdaConnectionTimeout", 360000);
appiumOptions.AddAdditionalCapability("iosInstallPause", 8000);
appiumOptions.AddAdditionalCapability(MobileCapabilityType.NewCommandTimeout, 900);
but it is not helps me.
Link to Appium logs
Appium logs: https://gist.github.com/insidiaGithub/c652b3b96be4403d7a4f3489a5276055 Simulator logs: https://gist.github.com/insidiaGithub/e29c52e28e0d56986c583bdd53d353e9
Code To Reproduce Issue [ Good To Have ]
Random failed on random places
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24
No I mean the one which is collected if
showIOSLog
cap is set to true