Socket hangup error on ios real device
See original GitHub issueThe problem
While clicking a element, getting the page source or sometimes with finding an element. The socket is hanging up and causing the tests to fail.
Environment
- Appium version (or git revision) that exhibits the issue: appium --version 1.13.0
- Last Appium version that did not exhibit the issue (if applicable): appium 1.10.x
- Desktop OS/version used to run Appium: 1.13 (I am not seeing this issue on appium desktop version)
- Node.js version (unless using Appium.app|exe): 6.9.0
- Npm or Yarn package manager: npm
- Mobile platform/version under test: ios/11.4.1
- Real device or emulator/simulator: Real device (iphone7)
- Appium CLI or Appium.app|exe: appium client
Details
appium : 1.13 Macos : 10.14 libimobiledevice : head xcode : 10.2.1 python : 3.7.3 Real Device: iphone7 (11.4)
Link to Appium logs
Create a GIST which is a paste of your full Appium logs, and link them here. https://gist.github.com/sharecommute/7c51b34d2d0227f008248853dd1532d8
Noticable Errors: [WD Proxy] Got an unexpected response: {“code”:“ECONNRESET”} [debug] [W3C (7554bc26)] Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: socket hang up [debug] [W3C (7554bc26)] at doJwpProxy (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:547:13) [debug] [W3C (7554bc26)] at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:308:9) [HTTP] <-- POST /wd/hub/session/7554bc26-9adf-4f0b-9cef-
Code To Reproduce Issue [ Good To Have ]
In python, i used
- self.driver.find_element_by_ios_predicate(<element>) (intermittent)
- self.driver.click_element(<element>) (intermittent)
- self.driver.page_source ( this is for sure causing the socket hang up)
Note: Getting the page source manually using the Desktop app is not getting any socket hang up, i can copy the page source and paste it into a editor.
Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/appium and from the sample-code
directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:13
Top GitHub Comments
Hi, I am also facing the same problem - except that the same device worked fine on one machine but didn’t work on another.
Discovered that the problem was that one machine was ahead in commits for usbmuxd. I replaced it with my old version and I didn’t have this problem anymore.
Perhaps you could give it a shot in trying to replace usbmuxd with an attached older commit. If you used brew to install, you can run
brew info usbmuxd
to find the install location and just replace it manually. You also might need to change the name of the subfolder with the to match the git SHA which brew is using. (Kind of a dirty solution for now but we’ll work it out later if it works for you too)Sorry i’m kinda new to this so if there’s a better way of doing this please let me know haha.
usbmuxd.zip
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.