"Error: socket hang up" in iOS tests
See original GitHub issueThe 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:24
Top Results From Across the Web
Original error: socket hang up - Stack Overflow
I have android tests which are running through jenkins on appium docker image, but everytime causes this error: Original error: Could not ...
Read more >Automation / Mobile / Troubleshooting Appium - Infinum
Original error: Could not proxy command to the remote server. Original error: socket hang up. This error often happens when the device is ......
Read more >APNs socket hang up error. | Apple Developer Forums
From 2018/02/09, socket hang up occasionally happens when connecting to APNs. It is still occasionally still. The connection method to APNs is TLS...
Read more >Could not proxy command to remote server. Original error
I am trying to set up appium for an iOS app in my organization and the ... Original error: Error: socket hang up-Appium...
Read more >"Could not proxy command to the remote server. Original error ...
Original error : socket hang up "More videos:how to . ... How a manual tester can learn automation testing https://youtu.be/nhqrvr3x9pI How to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No I mean the one which is collected if
showIOSLog
cap is set to truewhen i restart the computer ,the problem is resolved。 good luck