Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catched AdbError #857

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Catched AdbError #857

merged 3 commits into from
Mar 20, 2024

Conversation

SmartManoj
Copy link
Contributor

No description provided.

@SmartManoj SmartManoj changed the title Reconnect if offline Reconnect the device if offline Dec 20, 2022
@SmartManoj
Copy link
Contributor Author

SmartManoj commented Dec 20, 2022

What does this TMQ env mean?

@SmartManoj
Copy link
Contributor Author

[W 221220 11:39:42 __init__:218] [pid:196274] atx-agent has something wrong, auto recovering
[I 221220 11:39:42 __init__:357] [pid:196274] [192.168.186.155] wait-for-device, time left(3.0s)
127.0.0.1 - - [20/Dec/2022 11:39:42] code 400, message Bad request syntax ('CNXN\x01\x00\x00\x01\x00\x00\x10\x00ê\x00\x00\x00D[\x00\x00¼±§±host::features=shell_v2,cmd,stat_v2,ls_v2,fixed_push_mkdir,apex,abb,fixed_push_symlink_timestamp,abb_exec,remount_shell,track_app,sendrecv_v2,sendrecv_v2_brotli,sendrecv_v2_lz4,sendrecv_v2_zstd,sendrecv_v2_dry_run_send,openscreen_mdns')
127.0.0.1 - - [20/Dec/2022 11:39:42] "CNXNêD[¼±§±host::features=shell_v2,cmd,stat_v2,ls_v2,fixed_push_mkdir,apex,abb,fixed_push_symlink_timestamp,abb_exec,remount_shell,track_app,sendrecv_v2,sendrecv_v2_brotli,sendrecv_v2_lz4,sendrecv_v2_zstd,sendrecv_v2_dry_run_send,openscreen_mdns" HTTPStatus.BAD_REQUEST -
Traceback (most recent call last):
    d.send_keys(account_number)
  File "/home/smart/.local/lib/python3.10/site-packages/uiautomator2/__init__.py", line 1702, in send_keys
    self.wait_fastinput_ime()
  File "/home/smart/.local/lib/python3.10/site-packages/uiautomator2/__init__.py", line 1771, in wait_fastinput_ime
    ime_id, shown = self.current_ime()
  File "/home/smart/.local/lib/python3.10/site-packages/uiautomator2/__init__.py", line 1790, in current_ime
    dim, _ = self.shell(['dumpsys', 'input_method'])
  File "/home/smart/.local/lib/python3.10/site-packages/uiautomator2/__init__.py", line 428, in shell
    ret = self.http.post("/shell", data=data, timeout=timeout+10)
  File "/home/smart/.local/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/home/smart/.local/lib/python3.10/site-packages/uiautomator2/__init__.py", line 223, in request
    self.__client._prepare_atx_agent()
  File "/home/smart/.local/lib/python3.10/site-packages/uiautomator2/__init__.py", line 314, in _prepare_atx_agent
    _d = self._wait_for_device()
  File "/home/smart/.local/lib/python3.10/site-packages/uiautomator2/__init__.py", line 367, in _wait_for_device
    adb.wait_for(self._serial, timeout=1)
  File "/home/smart/.local/lib/python3.10/site-packages/adbutils/_adb.py", line 218, in wait_for
    c.check_okay()
  File "/home/smart/.local/lib/python3.10/site-packages/adbutils/_adb.py", line 137, in check_okay
    raise AdbError("Unknown data: %r" % data)
adbutils.errors.AdbError: Unknown data: ''

@SmartManoj SmartManoj changed the title Reconnect the device if offline Catched AdbError Dec 20, 2022
@codeskyblue codeskyblue merged commit cb8e16d into openatx:master Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants