atx-agent can not work
coola007 opened this issue · comments
Samantha Thompson commented
shell on summary note 8
#./atx-agent server -d
this show message:
INFO[0000] run atx-agent in background
panic: runtime error: slice bounds out of range [1:0] [recovered]
panic: runtime error: slice bounds out of range [1:0]
goroutine 1 [running]:
encoding/json.(*encodeState).marshal.func1(0x14aaafc)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:305 +0x8c
panic(0x524520, 0x1418650)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/runtime/panic.go:679 +0x194
reflect.(*rtype).String(0x514aa0, 0x32c9ac, 0x141864c)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/reflect/type.go:763 +0xac
reflect.(*rtype).Name(0x514aa0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/reflect/type.go:878 +0x28
encoding/json.typeFields(0x640568, 0x5414c0, 0x5414c0, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:1133 +0x398
encoding/json.cachedTypeFields(0x640568, 0x5414c0, 0x999328, 0xe9d32000, 0x4e0f40, 0x140ee40)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:1278 +0xbc
encoding/json.newStructEncoder(0x640568, 0x5414c0, 0x4e96b8)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:674 +0x24
encoding/json.newTypeEncoder(0x640568, 0x5414c0, 0x541401, 0x4e0f40)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:425 +0x2e8
encoding/json.typeEncoder(0x640568, 0x5414c0, 0x5414c0)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:381 +0x14c
encoding/json.newPtrEncoder(0x640568, 0x540340, 0x4e96b8)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:814 +0x38
encoding/json.newTypeEncoder(0x640568, 0x540340, 0x540301, 0x4e0f40)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:433 +0x284
encoding/json.typeEncoder(0x640568, 0x540340, 0x16)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:381 +0x14c
encoding/json.valueEncoder(0x540340, 0x1477420, 0x16, 0x7)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:355 +0x48
encoding/json.(*encodeState).reflectValue(0x14b54a0, 0x540340, 0x1477420, 0x16, 0x990100)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:337 +0x2c
encoding/json.(*encodeState).marshal(0x14b54a0, 0x540340, 0x1477420, 0x100, 0x0, 0x0)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/encode.go:309 +0xe4
encoding/json.(*Encoder).Encode(0x1449bb0, 0x540340, 0x1477420, 0x3, 0x4)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/json/stream.go:202 +0x58
github.com/sevlyar/go-daemon.(*Context).parent(0x1477420, 0x141e150, 0x0, 0x0)
/home/travis/gopath/pkg/mod/github.com/sevlyar/go-daemon@v0.1.4/daemon_unix.go:107 +0x26c
github.com/sevlyar/go-daemon.(*Context).reborn(0x1477420, 0x0, 0x0, 0x1a4)
/home/travis/gopath/pkg/mod/github.com/sevlyar/go-daemon@v0.1.4/daemon_unix.go:59 +0x80
github.com/sevlyar/go-daemon.(*Context).Reborn(...)
/home/travis/gopath/pkg/mod/github.com/sevlyar/go-daemon@v0.1.4/daemon.go:31
main.runDaemon(0x1456a80)
/home/travis/gopath/src/github.com/openatx/atx-agent/main.go:388 +0xa4
main.main()
/home/travis/gopath/src/github.com/openatx/atx-agent/main.go:595 +0x14ac
run python :
D:\>python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import uiautomator2 as u2
>>> d = u2.connect("xxxf3f037e")
>>> d.info
[W 220725 18:38:33 __init__:218] [pid:7092] atx-agent has something wrong, auto recovering
[D 220725 18:38:33 __init__:317] [pid:7092] [xxxf3f037e] device xxxf3f037e is online
[I 220725 18:38:34 init:156] uiautomator2 version: 2.16.18
[D 220725 18:38:34 init:167] Shell: ('/data/local/tmp/atx-agent', 'server', '--stop')
[D 220725 18:38:34 init:295] Real version: [0, 10, 0], Expect version: [0, 10, 0]
[D 220725 18:38:34 init:167] Shell: ('/data/local/tmp/atx-agent', 'server', '--nouia', '-d', '--addr', '127.0.0.1:7912')
[I 220725 18:38:34 init:350] Check atx-agent version
[D 220725 18:38:34 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:35 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:35 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:36 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:36 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:37 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:37 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:38 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:38 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
[D 220725 18:38:39 init:359] Forward: local:tcp:50713 -> remote:tcp:7912
Traceback (most recent call last):
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1322, in getresponse
response.begin()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 303, in begin
version, status, reason = self._read_status()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\util\retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\packages\six.py", line 734, in reraise
raise value.with_traceback(tb)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1322, in getresponse
response.begin()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 303, in begin
version, status, reason = self._read_status()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\__init__.py", line 444, in info
return self.jsonrpc.deviceInfo(http_timeout=10)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\__init__.py", line 475, in __call__
return self.server._jsonrpc_retry_call(self.method, params,
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\__init__.py", line 482, in _jsonrpc_retry_call
return self._jsonrpc_call(*args, **kwargs)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\__init__.py", line 508, in _jsonrpc_call
res = self.http.post("/jsonrpc/0",
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\__init__.py", line 223, in request
self.__client._prepare_atx_agent()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\__init__.py", line 324, in _prepare_atx_agent
self._setup_atx_agent()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\__init__.py", line 334, in _setup_atx_agent
_initer.setup_atx_agent()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\init.py", line 351, in setup_atx_agent
self.check_atx_agent_version()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\retry\api.py", line 73, in retry_decorator
return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\retry\api.py", line 33, in __retry_internal
return f()
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator2\init.py", line 360, in check_atx_agent_version
version = requests.get("http://%s:%d/version" %
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\dxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
`
so, what's wrong? please help me