question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: socket hang up" in iOS tests

See original GitHub issue

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:

  1. 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
  2. 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
  3. 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:

  1. appium -p 4723 --webdriveragent-port 8100
  2. 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:closed
  • Created 4 years ago
  • Comments:24

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Aug 5, 2019

No I mean the one which is collected if showIOSLog cap is set to true

0reactions
youran1024commented, Oct 19, 2019

When xcodebuild process is killed then WDA process is terminated as well, this is expected. Although, it is not clear why it is killed.

I understand. Thanks. May be it will be fixed with new xcode and ios13

when i restart the computer ,the problem is resolved。 good luck

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found