Skip to content

使用虚拟设备报错 #34

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

Open
yusandy0920 opened this issue Mar 12, 2025 · 0 comments · May be fixed by #39
Open

使用虚拟设备报错 #34

yusandy0920 opened this issue Mar 12, 2025 · 0 comments · May be fixed by #39

Comments

@yusandy0920
Copy link

[2025-03-12 15:28:57] hdc.py[line: 23] [DEBUG] hdc list targets
[2025-03-12 15:28:58] driver.py[line: 64] [INFO] No serial provided, using the first device: 127.0.0.1:5555
[2025-03-12 15:28:58] hdc.py[line: 23] [DEBUG] hdc list targets
[2025-03-12 15:28:58] _client.py[line: 142] [INFO] Start HmClient connection
[2025-03-12 15:28:58] _client.py[line: 185] [DEBUG] Initializing UITest service
[2025-03-12 15:28:58] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 shell "ps -ef"
[2025-03-12 15:28:58] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 shell "[ -f /data/local/tmp/agent.so ] && echo 'exists' || echo 'not exists'"
[2025-03-12 15:28:58] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 shell "md5sum /data/local/tmp/agent.so"
[2025-03-12 15:28:58] _client.py[line: 225] [DEBUG] Remote agent file is up-to-date
[2025-03-12 15:28:58] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 shell "chmod +x /data/local/tmp/agent.so"
[2025-03-12 15:28:58] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 shell "uitest start-daemon singleness"
[2025-03-12 15:28:58] _client.py[line: 253] [DEBUG] Started UITest daemon
[2025-03-12 15:28:59] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 fport ls
[2025-03-12 15:29:01] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 fport tcp:10001 tcp:8012
[2025-03-12 15:29:01] _client.py[line: 162] [DEBUG] Create uitest driver
[2025-03-12 15:29:01] _client.py[line: 62] [DEBUG] sendMsg: {"module":"com.ohos.devicetest.hypiumApiHelper","method":"callHypiumApi","params":{"api":"Driver.create","this":"Driver#0","args":[],"message_type":"hypium"},"request_id":"20250312152901389604"}
Traceback (most recent call last):
File "D:\Local\Projects\xdeviceProject\Script\testcases\hm2_demo.py", line 3, in
d = Driver()
^^^^^^^^
File "D:\Local\Projects\xdeviceProject\env\Lib\site-packages\hmdriver2\driver.py", line 50, in init
self._init_hmclient()
File "D:\Local\Projects\xdeviceProject\env\Lib\site-packages\hmdriver2\driver.py", line 80, in _init_hmclient
self._client.start()
File "D:\Local\Projects\xdeviceProject\env\Lib\site-packages\hmdriver2_client.py", line 147, in start
self._create_hdriver()
File "D:\Local\Projects\xdeviceProject\env\Lib\site-packages\hmdriver2_client.py", line 163, in _create_hdriver
resp: HypiumResponse = self.invoke("Driver.create") # {"result":"Driver#0"}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Local\Projects\xdeviceProject\env\Lib\site-packages\hmdriver2_client.py", line 114, in invoke
raw_data = self._recv_msg(decode=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Local\Projects\xdeviceProject\env\Lib\site-packages\hmdriver2_client.py", line 69, in _recv_msg
relay = self.sock.recv(buff_size)
^^^^^^^^^^^^^^^^^^^^^^^^^
ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。
[2025-03-12 15:29:01] _client.py[line: 150] [INFO] Release HmClient connection
[2025-03-12 15:29:01] _client.py[line: 36] [DEBUG] rm fport local port
[2025-03-12 15:29:01] hdc.py[line: 23] [DEBUG] hdc -t 127.0.0.1:5555 fport rm tcp:10001 tcp:8012

@yabi-zzh yabi-zzh linked a pull request Apr 15, 2025 that will close this issue
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 a pull request may close this issue.

1 participant