{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/10786","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/10786/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/10786/comments","events_url":"https://api.github.com/repos/appium/appium/issues/10786/events","html_url":"https://github.com/appium/appium/issues/10786","id":328012386,"node_id":"MDU6SXNzdWUzMjgwMTIzODY=","number":10786,"title":"Socket Hangup error when i use Swipe/Touch Action methods[Appium iOS simulator running through Webdriver agent]","user":{"login":"varun2810","id":32065024,"node_id":"MDQ6VXNlcjMyMDY1MDI0","avatar_url":"https://avatars0.githubusercontent.com/u/32065024?v=4","gravatar_id":"","url":"https://api.github.com/users/varun2810","html_url":"https://github.com/varun2810","followers_url":"https://api.github.com/users/varun2810/followers","following_url":"https://api.github.com/users/varun2810/following{/other_user}","gists_url":"https://api.github.com/users/varun2810/gists{/gist_id}","starred_url":"https://api.github.com/users/varun2810/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varun2810/subscriptions","organizations_url":"https://api.github.com/users/varun2810/orgs","repos_url":"https://api.github.com/users/varun2810/repos","events_url":"https://api.github.com/users/varun2810/events{/privacy}","received_events_url":"https://api.github.com/users/varun2810/received_events","type":"User","site_admin":false},"labels":[{"id":474876872,"node_id":"MDU6TGFiZWw0NzQ4NzY4NzI=","url":"https://api.github.com/repos/appium/appium/labels/NeedsInfo","name":"NeedsInfo","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-31T06:41:10Z","updated_at":"2018-07-05T13:58:34Z","closed_at":"2018-06-04T09:30:24Z","author_association":"NONE","body":"## The problem\r\n\r\nI'm using appium latest version. And i'm running automation in iOS simulator 11.1. Everything works fine but when i use swipe/Touch action methods . It is stopping showing Socket hang up error.\r\n\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: Appium v 1.7.2\r\n* Last Appium version that did not exhibit the issue (if applicable): It works well in android.Previously i haven't used appium for iOS automation \r\n* Desktop OS/version used to run Appium : Desktop version 1.5.0\r\n* Node.js version (unless using Appium.app|exe): 9.11.3\r\n* Mobile platform/version under test: iOS 11.1\r\n* Real device or emulator/simulator: Simulator\r\n* Appium CLI or Appium.app|exe: Appium.app\r\n\r\n## Details\r\n\r\ni cleared the webdriver agent and i'm installing fresh wda in every run. When i use driver. swipe methods / Touch action methods. It shows the error as socket hang up. Could not proxy error.\r\n\r\nI have also seen the issue referred in #7063 & #10579 , but still i'm facing that issue.\r\n\r\nKindly please help me out. i cant able to proceed further in this. How to swipe the screen in latest appium with Webdriver agent.\r\n\r\n## Link to Appium logs\r\n\r\nhttps://gist.github.com/varun2810/210c177e33b073fb65faae2c09f1933e\r\n\r\n\r\n## Code To Reproduce Issue [ Good To Have ]\r\n[Code sample 1 - using touch action]\r\n#1 MobileElement el = driver.findElement(By.xpath(\"//XCUIElementTypeButton[@name=\\\"imageBtn\\\"]\"));\r\n\t\t\t\t\t\tTouchAction actions = new TouchAction(driver);\r\n\t\t\t\t\t\tactions.press(el).waitAction(3000).moveTo(588, 147).release().perform();\r\n\r\n[Code sample 2 -- using driver.swipe method]\r\n#2  size = driver.manage().window().getSize();\r\n\t\t\t\t\t\t  System.out.println(size);\r\n\t\t\t\t\t\t   \r\n\t\t\t\t\t\t  //Find swipe start and end point from screen's with and height.\r\n\t\t\t\t\t\t  //Find starty point which is at bottom side of screen.\r\n\t\t\t\t\t\t  int starty = (int) (size.height * 0.80);\r\n\t\t\t\t\t\t  //Find endy point which is at top side of screen.\r\n\t\t\t\t\t\t  int endy = (int) (size.height * 0.20);\r\n\t\t\t\t\t\t  //Find horizontal point where you wants to swipe. It is in middle of screen width.\r\n\t\t\t\t\t\t  int startx = size.width / 2;\r\n\t\t\t\t\t\t  System.out.println(\"starty = \" + starty + \" ,endy = \" + endy + \" , startx = \" + startx);\r\n\r\n\t\t\t\t\t\t  //Swipe from Top to Bottom.\r\n\t\t\t\t\t\t  driver.swipe(startx, endy, startx, starty, 3000);\r\n\t\t\t\t\t\t  Thread.sleep(2000)\r\n\r\n\r\nIn case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.\r\n"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/402730963","html_url":"https://github.com/appium/appium/issues/10786#issuecomment-402730963","issue_url":"https://api.github.com/repos/appium/appium/issues/10786","id":402730963,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjczMDk2Mw==","user":{"login":"vytran9599","id":36210075,"node_id":"MDQ6VXNlcjM2MjEwMDc1","avatar_url":"https://avatars1.githubusercontent.com/u/36210075?v=4","gravatar_id":"","url":"https://api.github.com/users/vytran9599","html_url":"https://github.com/vytran9599","followers_url":"https://api.github.com/users/vytran9599/followers","following_url":"https://api.github.com/users/vytran9599/following{/other_user}","gists_url":"https://api.github.com/users/vytran9599/gists{/gist_id}","starred_url":"https://api.github.com/users/vytran9599/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vytran9599/subscriptions","organizations_url":"https://api.github.com/users/vytran9599/orgs","repos_url":"https://api.github.com/users/vytran9599/repos","events_url":"https://api.github.com/users/vytran9599/events{/privacy}","received_events_url":"https://api.github.com/users/vytran9599/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T13:58:34Z","updated_at":"2018-07-05T13:58:34Z","author_association":"NONE","body":"@mykola-mokhnach Hi, I am having the same issue. However, I am testing a web app on iOS simulator and is using mobile gestures such as: self.driver.execute_script('mobile: tap', {'x': '100', 'y': '500'}. It is saying error socket hang up. "}}
{"actor":{"display_login":"vytran9599"}}