appium: Socket hang up on iOS

The problem

Execute Appium tests causing ‘socket hang up’ issue and then timeout for every device I’ve tried

Environment

  • Appium version (or git revision) that exhibits the issue: 1.20.0
  • Last Appium version that did not exhibit the issue (if applicable): 1.18
  • Desktop OS/version used to run Appium: MacOS Big Sur 11.0.1
  • Node.js version (unless using Appium.app|exe): 12.16.1
  • Npm or Yarn package manager: npm
  • Mobile platform/version under test: iPhone XR 14.2
  • Real device or emulator/simulator: Real Device
  • Appium CLI or Appium.app|exe: CLI

Details

Went through setup iOS completely and able to install WDA on the device. Upon executing the tests, the Appium CLI keeps showing ‘socket hang up’ error without launching the application and then timed out.

Details logs:

2021-01-13 10:22:47:042 - [WD Proxy] socket hang up
2021-01-13 10:22:48:063 - [WD Proxy] socket hang up
2021-01-13 10:22:49:074 - [WD Proxy] socket hang up
2021-01-13 10:22:50:085 - [WD Proxy] socket hang up
2021-01-13 10:22:51:093 - [WD Proxy] socket hang up
2021-01-13 10:22:52:100 - [WD Proxy] socket hang up
2021-01-13 10:22:53:111 - [WD Proxy] socket hang up
2021-01-13 10:22:54:118 - [WD Proxy] socket hang up
2021-01-13 10:22:55:124 - [WD Proxy] socket hang up
2021-01-13 10:26:56:157 - [WD Proxy] Error: timeout of 240000ms exceeded
2021-01-13 10:26:56:158 - [WD Proxy]     at createError (/usr/local/lib/node_modules/appium/node_modules/axios/lib/core/createError.js:16:15)
2021-01-13 10:26:56:158 - [WD Proxy]     at RedirectableRequest.handleRequestTimeout (/usr/local/lib/node_modules/appium/node_modules/axios/lib/adapters/http.js:280:16)
2021-01-13 10:26:56:158 - [WD Proxy]     at Object.onceWrapper (events.js:417:28)
2021-01-13 10:26:56:159 - [WD Proxy]     at RedirectableRequest.emit (events.js:311:20)
2021-01-13 10:26:56:159 - [WD Proxy]     at Timeout._onTimeout (/usr/local/lib/node_modules/appium/node_modules/follow-redirects/index.js:166:13)
2021-01-13 10:26:56:159 - [WD Proxy]     at listOnTimeout (internal/timers.js:549:17)
2021-01-13 10:26:56:159 - [WD Proxy]     at processTimers (internal/timers.js:492:7)

Tried with many iOS devices and still observe the same issue

Link to Appium logs

https://gist.github.com/zarashima/0f84895b8fd48c303fc7c2f016fc1783

Code To Reproduce Issue [ Good To Have ]

My desired capabilities:

    desiredCapabilities.setCapability("platformName", "iOS");
      desiredCapabilities.setCapability("platformVersion", deviceVersion);
      desiredCapabilities.setCapability("deviceName", deviceName);
      desiredCapabilities.setCapability("udid", deviceId);
      desiredCapabilities.setCapability("wdaLocalPort", systemPort);
      desiredCapabilities.setCapability("xcodeOrgId",  "orgID);
      desiredCapabilities.setCapability("xcodeSigningId", "orgSigningID);
      desiredCapabilities.setCapability("automationName", "XCUITest");
      desiredCapabilities.setCapability("fullReset", true);
      desiredCapabilities.setCapability("noReset", false);
      desiredCapabilities.setCapability("sendKeyStrategy", "grouped");
      desiredCapabilities.setCapability("maxTypingFrequency", 60);
      desiredCapabilities.setCapability("newCommandTimeout", 360);
      desiredCapabilities.setCapability("showXcodeLog", true);
      desiredCapabilities.setCapability("showIOSLog", true);
      desiredCapabilities.setCapability("includeSafariInWebviews", true);
      desiredCapabilities.setCapability("shouldUseSingletonTestManager", true);

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Ah I know why. I used bundleId parameter in my desired capabilities. When I removed it my application is started successfully