Socket hang up on iOS
See original GitHub issueThe 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);
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Socket hang up with new iOS 15.4 trying to get screenshots
The problem. Once updated iOS from 15.2 to 15.4 on real devices, the get screenshot function doesn't work anymore.
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 >NodeJS - What does "socket hang up" actually mean?
It means that socket does not send connection end event within the timeout period. If you are getting the request for cheerio via...
Read more >Getting server error( socket hang up ) - Appium Discuss
Hi All, I am getting the below error while I am running the script in emulator ( Real device was fine ) Unable...
Read more >HTTP Request "Error: socket hang up" - Node-RED Forum
I researched as far as I can, and found a discussion on stackoverflow, indicating that the hang up error occurs when a 'connection...
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
Ah I know why. I used
bundleId
parameter in my desired capabilities. When I removed it my application is started successfullyLike with
bundleId
installed application I did in https://github.com/appium/appium/issues/15016#issuecomment-759260137 ?Then, probably XCTest framework internal had an issue in your environment… You could try another WebDriverAgent version, but I don’t think the issue
Failed to launch app: The operation couldn’t be compl...
will fix.