{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/8499","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/8499/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/8499/comments","events_url":"https://api.github.com/repos/appium/appium/issues/8499/events","html_url":"https://github.com/appium/appium/issues/8499","id":230286643,"number":8499,"title":"[iOS] Error received while executing atom: Can't find variable","user":{"login":"rong4188","id":10201833,"avatar_url":"https://avatars1.githubusercontent.com/u/10201833?v=4","gravatar_id":"","url":"https://api.github.com/users/rong4188","html_url":"https://github.com/rong4188","followers_url":"https://api.github.com/users/rong4188/followers","following_url":"https://api.github.com/users/rong4188/following{/other_user}","gists_url":"https://api.github.com/users/rong4188/gists{/gist_id}","starred_url":"https://api.github.com/users/rong4188/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rong4188/subscriptions","organizations_url":"https://api.github.com/users/rong4188/orgs","repos_url":"https://api.github.com/users/rong4188/repos","events_url":"https://api.github.com/users/rong4188/events{/privacy}","received_events_url":"https://api.github.com/users/rong4188/received_events","type":"User","site_admin":false},"labels":[{"id":427212191,"url":"https://api.github.com/repos/appium/appium/labels/XCUITest","name":"XCUITest","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-05-22T05:14:53Z","updated_at":"2017-07-21T17:51:32Z","closed_at":null,"body":"## The problem\r\n[iOS] Error received while executing atom: Can't find variable\r\nit occasionally happens under webview context when I am trying to test my hybrid app. \r\n\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: 1.6.3\r\n* Last Appium version that did not exhibit the issue (if applicable):\r\n* Desktop OS/version used to run Appium:  macOS Sierra - Version 10.12.1\r\n* Node.js version (unless using Appium.app|exe): 3.10.10\r\n* Mobile platform/version under test: iOS 10 (iPAD air)\r\n* Real device or emulator/simulator: Real device\r\n* Appium CLI or Appium.app|exe: CLI\r\n\r\n## Details\r\n\r\n[iOS] Error received while executing atom: Can't find variable\r\n\r\n\r\n## Link to Appium logs\r\n\r\nhttps://gist.github.com/rong4188/728964c6471509be8fd08c4df72494f6\r\n\r\n## Code To Reproduce Issue [ Good To Have ]\r\n  It happens when I call setStartAddress() function.\r\n\r\n    public void setStartAddress(String address) {\r\n        waitForPageLoad(10);\r\n        sleep(5);\r\n        if(!(isWindows() || isWebviewContext())) return;\r\n        runScript(\"return (!!SFTouch) && (!!$);\", 10);// wait until SFTouch and jQuery is loaded\r\n        runScript(\"SFTouch.setStartAddress('\" + address + \"'); return true\");\r\n        sleep(5);\r\n    }\r\n\r\n    public Object runScript(final String script, final long timeoutInSeconds) {\r\n        Object result;\r\n        try {\r\n            WebDriverWait wait = new WebDriverWait(m_driver, timeoutInSeconds);\r\n            result = wait.until((Function<WebDriver, Object>) webDriver -> {\r\n                RemoteWebDriver rd = (RemoteWebDriver) webDriver;\r\n                Object r;\r\n                r = rd.executeScript(script);\r\n                return r;\r\n            });\r\n        } catch (Exception ignored) {\r\n            result = null;\r\n        }\r\n\r\n        return result;\r\n    }\r\n"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/317068542","html_url":"https://github.com/appium/appium/issues/8499#issuecomment-317068542","issue_url":"https://api.github.com/repos/appium/appium/issues/8499","id":317068542,"user":{"login":"dpgraham","id":852574,"avatar_url":"https://avatars2.githubusercontent.com/u/852574?v=4","gravatar_id":"","url":"https://api.github.com/users/dpgraham","html_url":"https://github.com/dpgraham","followers_url":"https://api.github.com/users/dpgraham/followers","following_url":"https://api.github.com/users/dpgraham/following{/other_user}","gists_url":"https://api.github.com/users/dpgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/dpgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpgraham/subscriptions","organizations_url":"https://api.github.com/users/dpgraham/orgs","repos_url":"https://api.github.com/users/dpgraham/repos","events_url":"https://api.github.com/users/dpgraham/events{/privacy}","received_events_url":"https://api.github.com/users/dpgraham/received_events","type":"User","site_admin":false},"created_at":"2017-07-21T17:51:32Z","updated_at":"2017-07-21T17:51:32Z","body":"Does this issue still persist?"}}
{"actor":{"display_login":"dpgraham"}}