{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/4462","labels_url":"https://api.github.com/repos/appium/appium/issues/4462/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/4462/comments","events_url":"https://api.github.com/repos/appium/appium/issues/4462/events","html_url":"https://github.com/appium/appium/issues/4462","id":56009401,"number":4462,"title":"1.3.5-beta execute async not working","user":{"login":"braghome","id":1514698,"avatar_url":"https://avatars.githubusercontent.com/u/1514698?v=3","gravatar_id":"","url":"https://api.github.com/users/braghome","html_url":"https://github.com/braghome","followers_url":"https://api.github.com/users/braghome/followers","following_url":"https://api.github.com/users/braghome/following{/other_user}","gists_url":"https://api.github.com/users/braghome/gists{/gist_id}","starred_url":"https://api.github.com/users/braghome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braghome/subscriptions","organizations_url":"https://api.github.com/users/braghome/orgs","repos_url":"https://api.github.com/users/braghome/repos","events_url":"https://api.github.com/users/braghome/events{/privacy}","received_events_url":"https://api.github.com/users/braghome/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appium/appium/labels/OnGoing","name":"OnGoing","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"sebv","id":418288,"avatar_url":"https://avatars.githubusercontent.com/u/418288?v=3","gravatar_id":"","url":"https://api.github.com/users/sebv","html_url":"https://github.com/sebv","followers_url":"https://api.github.com/users/sebv/followers","following_url":"https://api.github.com/users/sebv/following{/other_user}","gists_url":"https://api.github.com/users/sebv/gists{/gist_id}","starred_url":"https://api.github.com/users/sebv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebv/subscriptions","organizations_url":"https://api.github.com/users/sebv/orgs","repos_url":"https://api.github.com/users/sebv/repos","events_url":"https://api.github.com/users/sebv/events{/privacy}","received_events_url":"https://api.github.com/users/sebv/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-30T09:01:16Z","updated_at":"2015-03-09T18:11:48Z","closed_at":null,"body":"https://gist.github.com/braghome/ebc165c14dc0aa67adc2\r\nI have tested the actual script on our rendr.js based web app console works fine. But need to execute this script on Appium as this will be needed so I can run the tests on sauce without failure.\r\n\r\n```\r\nvar isLoaded = false;\r\n\r\nfunction waitForApp(callback) {\r\n\t\r\n\tif ((typeof trulia != 'object') || !trulia.App) {\r\n\t\twindow.setTimeout(waitForApp.bind(this, callback), 100);\r\n\t\treturn;\r\n\t}\r\n\r\n\ttrulia.App.on('postPageRender', function() {\r\n\t\ttypeof callback == 'function'\r\n\t\t\t\t&& callback(isLoaded);\r\n\t});\r\n}\r\nundefined\r\nwaitForApp(function(isLoaded) {\r\n\tif (typeof isLoaded == 'boolean') { \r\n\t\tisLoaded = true; \r\n\t}\r\n\tconsole.log(isLoaded);\r\n});\r\nundefined\r\nVM54:6 true\r\n```"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/77909820","html_url":"https://github.com/appium/appium/issues/4462#issuecomment-77909820","issue_url":"https://api.github.com/repos/appium/appium/issues/4462","id":77909820,"user":{"login":"sebv","id":418288,"avatar_url":"https://avatars.githubusercontent.com/u/418288?v=3","gravatar_id":"","url":"https://api.github.com/users/sebv","html_url":"https://github.com/sebv","followers_url":"https://api.github.com/users/sebv/followers","following_url":"https://api.github.com/users/sebv/following{/other_user}","gists_url":"https://api.github.com/users/sebv/gists{/gist_id}","starred_url":"https://api.github.com/users/sebv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebv/subscriptions","organizations_url":"https://api.github.com/users/sebv/orgs","repos_url":"https://api.github.com/users/sebv/repos","events_url":"https://api.github.com/users/sebv/events{/privacy}","received_events_url":"https://api.github.com/users/sebv/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T18:11:48Z","updated_at":"2015-03-09T18:11:48Z","body":"Better answer is to try to set the async script timeout."}}