{"action":"created","issue":{"url":"https://api.github.com/repos/openatx/uiautomator2/issues/112","repository_url":"https://api.github.com/repos/openatx/uiautomator2","labels_url":"https://api.github.com/repos/openatx/uiautomator2/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/openatx/uiautomator2/issues/112/comments","events_url":"https://api.github.com/repos/openatx/uiautomator2/issues/112/events","html_url":"https://github.com/openatx/uiautomator2/issues/112","id":326152242,"node_id":"MDU6SXNzdWUzMjYxNTIyNDI=","number":112,"title":"init doesn't start service as reliable as d.connect, attempts to start on already started phones","user":{"login":"gamesguru","id":30691680,"node_id":"MDQ6VXNlcjMwNjkxNjgw","avatar_url":"https://avatars1.githubusercontent.com/u/30691680?v=4","gravatar_id":"","url":"https://api.github.com/users/gamesguru","html_url":"https://github.com/gamesguru","followers_url":"https://api.github.com/users/gamesguru/followers","following_url":"https://api.github.com/users/gamesguru/following{/other_user}","gists_url":"https://api.github.com/users/gamesguru/gists{/gist_id}","starred_url":"https://api.github.com/users/gamesguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamesguru/subscriptions","organizations_url":"https://api.github.com/users/gamesguru/orgs","repos_url":"https://api.github.com/users/gamesguru/repos","events_url":"https://api.github.com/users/gamesguru/events{/privacy}","received_events_url":"https://api.github.com/users/gamesguru/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-05-24T14:38:10Z","updated_at":"2018-06-18T15:10:08Z","closed_at":"2018-06-13T00:12:17Z","author_association":"NONE","body":"Is the 'python -m uiautomator2 init' meant to start connect the daemon on multiple devices, or just do install?  It's not doing it all the time.  We should be connect manually?  That works better.\r\n\r\nIt also attempts to run init on phones it has just recently done init and start daemon successfully on.\r\n\r\nAn easier way to stop the service would be cool too, usually continues running on phone after test has ended\r\n\r\nThanks for the great work"},"comment":{"url":"https://api.github.com/repos/openatx/uiautomator2/issues/comments/398087961","html_url":"https://github.com/openatx/uiautomator2/issues/112#issuecomment-398087961","issue_url":"https://api.github.com/repos/openatx/uiautomator2/issues/112","id":398087961,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODA4Nzk2MQ==","user":{"login":"gamesguru","id":30691680,"node_id":"MDQ6VXNlcjMwNjkxNjgw","avatar_url":"https://avatars1.githubusercontent.com/u/30691680?v=4","gravatar_id":"","url":"https://api.github.com/users/gamesguru","html_url":"https://github.com/gamesguru","followers_url":"https://api.github.com/users/gamesguru/followers","following_url":"https://api.github.com/users/gamesguru/following{/other_user}","gists_url":"https://api.github.com/users/gamesguru/gists{/gist_id}","starred_url":"https://api.github.com/users/gamesguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamesguru/subscriptions","organizations_url":"https://api.github.com/users/gamesguru/orgs","repos_url":"https://api.github.com/users/gamesguru/repos","events_url":"https://api.github.com/users/gamesguru/events{/privacy}","received_events_url":"https://api.github.com/users/gamesguru/received_events","type":"User","site_admin":false},"created_at":"2018-06-18T15:10:08Z","updated_at":"2018-06-18T15:10:08Z","author_association":"NONE","body":"It tries to connect to all devices even when I specify one.\r\n\r\nAlso, certain devices are giving me problems since a recent update.  I don't think enough time is given for them to connect.  The init command returns a non-success, but if I launch a python shell I can run manual commands, like unlock, click, press.  Here is the error, just one device plugged in for convenience.\r\n\r\n> 2018-06-18 11:07:13,964 - __main__.py:269 - INFO - Detect pluged devices: ['03509a46588500000000']\r\n> 2018-06-18 11:07:13,964 - __main__.py:286 - INFO - Device(03509a46588500000000) initialing ...\r\n> 2018-06-18 11:07:15,010 - __main__.py:113 - INFO - install minicap\r\n> 2018-06-18 11:07:15,561 - __main__.py:120 - INFO - install minitouch\r\n> 2018-06-18 11:07:16,437 - __main__.py:137 - INFO - apk(1.1.0) already installed, skip\r\n> 2018-06-18 11:07:16,636 - __main__.py:175 - INFO - atx-agent(0.3.3) already installed, skip\r\n> 2018-06-18 11:07:17,107 - __main__.py:212 - INFO - launch atx-agent daemon\r\n> Traceback (most recent call last):\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\connectionpool.py\", line 387, in _make_request\r\n>     six.raise_from(e, None)\r\n>   File \"<string>\", line 2, in raise_from\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\connectionpool.py\", line 383, in _make_request\r\n>     httplib_response = conn.getresponse()\r\n>   File \"C:\\Python36\\lib\\http\\client.py\", line 1331, in getresponse\r\n>     response.begin()\r\n>   File \"C:\\Python36\\lib\\http\\client.py\", line 297, in begin\r\n>     version, status, reason = self._read_status()\r\n>   File \"C:\\Python36\\lib\\http\\client.py\", line 258, in _read_status\r\n>     line = str(self.fp.readline(_MAXLINE + 1), \"iso-8859-1\")\r\n>   File \"C:\\Python36\\lib\\socket.py\", line 586, in readinto\r\n>     return self._sock.recv_into(b)\r\n> socket.timeout: timed out\r\n> \r\n> During handling of the above exception, another exception occurred:\r\n> \r\n> Traceback (most recent call last):\r\n>   File \"C:\\Python36\\lib\\site-packages\\requests\\adapters.py\", line 440, in send\r\n>     timeout=timeout\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\connectionpool.py\", line 639, in urlopen\r\n>     _stacktrace=sys.exc_info()[2])\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\util\\retry.py\", line 357, in increment\r\n>     raise six.reraise(type(error), error, _stacktrace)\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\packages\\six.py\", line 686, in reraise\r\n>     raise value\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\connectionpool.py\", line 601, in urlopen\r\n>     chunked=chunked)\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\connectionpool.py\", line 389, in _make_request\r\n>     self._raise_timeout(err=e, url=url, timeout_value=read_timeout)\r\n>   File \"C:\\Python36\\lib\\site-packages\\urllib3\\connectionpool.py\", line 309, in _raise_timeout\r\n>     raise ReadTimeoutError(self, url, \"Read timed out. (read timeout=%s)\" % timeout_value)\r\n> urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=58737): Read timed out. (read timeout=3)\r\n> \r\n> During handling of the above exception, another exception occurred:\r\n> \r\n> Traceback (most recent call last):\r\n>   File \"C:\\Python36\\lib\\runpy.py\", line 193, in _run_module_as_main\r\n>     \"__main__\", mod_spec)\r\n>   File \"C:\\Python36\\lib\\runpy.py\", line 85, in _run_code\r\n>     exec(code, run_globals)\r\n>   File \"C:\\Python36\\lib\\site-packages\\uiautomator2\\__main__.py\", line 356, in <module>\r\n>     main()\r\n>   File \"C:\\Python36\\lib\\site-packages\\uiautomator2\\__main__.py\", line 352, in main\r\n>     fire.Fire(MyFire)\r\n>   File \"C:\\Python36\\lib\\site-packages\\fire\\core.py\", line 127, in Fire\r\n>     component_trace = _Fire(component, args, context, name)\r\n>   File \"C:\\Python36\\lib\\site-packages\\fire\\core.py\", line 366, in _Fire\r\n>     component, remaining_args)\r\n>   File \"C:\\Python36\\lib\\site-packages\\fire\\core.py\", line 542, in _CallCallable\r\n>     result = fn(*varargs, **kwargs)\r\n>   File \"C:\\Python36\\lib\\site-packages\\uiautomator2\\__main__.py\", line 273, in init\r\n>     ignore_apk_check)\r\n>   File \"C:\\Python36\\lib\\site-packages\\uiautomator2\\__main__.py\", line 295, in _init_with_serial\r\n>     ins.launch_and_check()\r\n>   File \"C:\\Python36\\lib\\site-packages\\uiautomator2\\__main__.py\", line 225, in launch_and_check\r\n>     'http://localhost:%d/version' % lport, timeout=3)\r\n>   File \"C:\\Python36\\lib\\site-packages\\requests\\api.py\", line 72, in get\r\n>     return request('get', url, params=params, **kwargs)\r\n>   File \"C:\\Python36\\lib\\site-packages\\requests\\api.py\", line 58, in request\r\n>     return session.request(method=method, url=url, **kwargs)\r\n>   File \"C:\\Python36\\lib\\site-packages\\requests\\sessions.py\", line 508, in request\r\n>     resp = self.send(prep, **send_kwargs)\r\n>   File \"C:\\Python36\\lib\\site-packages\\requests\\sessions.py\", line 618, in send\r\n>     r = adapter.send(request, **kwargs)\r\n>   File \"C:\\Python36\\lib\\site-packages\\requests\\adapters.py\", line 521, in send\r\n>     raise ReadTimeout(e, request=request)\r\n> requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=58737): Read timed out. (read timeout=3)"}}
{"actor":{"display_login":"gamesguru"}}