AirtestProject / AirtestProject/Poco

Constant rpctimeout errors after upgrading to Unity 2019

Offen
#214 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
2k
Forks
341
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Describe the bug**
"RpcTimeoutError" and "socket connection broken" were errors that happened from time to time but since it was very occasionally, I didn't search for a fix. However, after upgrading my project to Unity 2019, these became a lot more frequent to the point where I am unable to run a 10min test without it breaking due to a "RpcTimeoutError."

Example below:

```
======================================================================
ERROR: runTest (airtest.cli.runner.AirtestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/airtest/cli/runner.py", line 69, in runTest
six.reraise(*sys.exc_info())
File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/dist-packages/airtest/cli/runner.py", line 65, in runTest
exec(compile(code.encode("utf-8"), pyfilepath, 'exec'), self.scope)
File "/project/Airtest/Tutorial.air/Tutorial.py", line 115, in
OverlayExit(build='Voice Chat') # Unlock voice chat
File "/project/Airtest/functions.air/functions.py", line 698, in OverlayExit
while not poco('ChestButton').exists():
File "/usr/local/lib/python3.6/dist-packages/poco/proxy.py", line 72, in wrapped
return func(proxy, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/poco/proxy.py", line 774, in exists
return self.attr('visible')
File "/usr/local/lib/python3.6/dist-packages/poco/proxy.py", line 39, in wrapped
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/poco/proxy.py", line 734, in attr
nodes = self._do_query(multiple=False)
File "/usr/local/lib/python3.6/dist-packages/poco/proxy.py", line 872, in _do_query
self._nodes = self.poco.agent.hierarchy.select(self.query, multiple)
File "/usr/local/lib/python3.6/dist-packages/poco/freezeui/hierarchy.py", line 90, in select
return self.selector.select(query, multiple)
File "/usr/local/lib/python3.6/dist-packages/poco/sdk/Selector.py", line 78, in select
return self.selectImpl(cond, multiple, self.getRoot(), 9999, True, True)
File "/usr/local/lib/python3.6/dist-packages/poco/sdk/Selector.py", line 71, in getRoot
return self.dumper.getRoot()
File "/usr/local/lib/python3.6/dist-packages/poco/freezeui/hierarchy.py", line 35, in getRoot
root = Node(self.dumpHierarchy())
File "/usr/local/lib/python3.6/dist-packages/poco/utils/simplerpc/utils.py", line 13, in new_func
ret, err = cb.wait(timeout=30)
File "/usr/local/lib/python3.6/dist-packages/poco/utils/simplerpc/simplerpc.py", line 78, in wait
raise RpcTimeoutError(self)
poco.utils.simplerpc.simplerpc.RpcTimeoutError: (rid=dce49a28-de7e-478a-81e0-3aad3fca14be) (connection="tcp://172.17.0.1:13510")
----------------------------------------------------------------------
Ran 1 test in 589.428s

FAILED (errors=1)
```

**python version:** `python2.7.15` (but I tried with different ones)

**poco version:** `1.0.76`

**Smartphone:**
- Device: pocophone f1, motog6 plus, oneplus6
- OS: Android 9, Android 8, Android 9

**Additional context**
I reckon these connectivity issues might have been introduced by the new Unity but I still took the liberty to submit an issue here in hopes that someone has insight about this kind of errors. Overall, Airtest and the poco integration work really well, you guys did a great job -- it's only these connectivity issues that are disabling me to use your software in its full capacity.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.