YueChen-C / py-ios-device

IOS Professional Performance Testing Tool . You can get CPU, GPU, Memory , Lifecycle and other metrics from real iOS devices . IOS 专业性能测试工具
GNU General Public License v3.0
633 stars 179 forks source link

Cannot launch app on ios 16 #131

Closed antuking closed 5 months ago

antuking commented 5 months ago

Smartphone (please complete the following information):

Pre-condition:

Kill pid before moving to Usage step.

Usage:

pyidevice apps launch --udid xxxx --bundle_id abcdxyz

Or

pyidevice instruments launch --udid xxxx --bundle_id abcdxyz

Describe the bug

2024-01-25 12:18:07 [INFO] [LockDown] lockdown.py[line:73] Connecting Device 0000XxXX-001432XXXXXXX 2024-01-25 12:18:07 [WARNING] [Instrument] dvt.py[line:248] socket connection close Traceback (most recent call last): File "/usr/local/bin/pyidevice", line 8, in sys.exit(cli()) File "/usr/local/lib/python3.9/site-packages/pyidevice/main.py", line 10, in cli cli_commands() File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(args, **kwargs) File "/usr/local/lib/python3.9/site-packages/pyidevice/cli/instruments.py", line 85, in cmd_launch pid = rpc.launch_app(bundle_id=bundle_id, app_env=app_env) File "/usr/local/lib/python3.9/site-packages/ios_device/cli/base.py", line 219, in launch_app pid = self.instruments.call(InstrumentsService.ProcessControl, File "/usr/local/lib/python3.9/site-packages/ios_device/servers/dvt.py", line 185, in call channel_id = self.make_channel(channel) File "/usr/local/lib/python3.9/site-packages/ios_device/servers/dvt.py", line 180, in make_channel self._call(True, 0, "_requestChannelWithCode:identifier:", channel_id, channel) File "/usr/local/lib/python3.9/site-packages/ios_device/servers/dvt.py", line 223, in _call self._client.send_dtx(self._cli, dtx) File "/usr/local/lib/python3.9/site-packages/ios_device/servers/dvt.py", line 38, in send_dtx return client.send(buffer) AttributeError: 'NoneType' object has no attribute 'send'

YueChen-C commented 5 months ago

2024-01-25 12:18:07 [WARNING] [Instrument] dvt.py[line:248] socket connection close The connection was closed before it was started. Have you tested any other commands?

antuking commented 5 months ago

As you say, the connection was closed before the command started. I tried to perform other commands and give the same error. What should I do? Restarting all ios devices (v16.x), or do something else

YueChen-C commented 5 months ago

I seem to have encountered the same problem before. Frequent creation of DTServiceHub resulted in too many open fds. The solution is to then reboot or reinstall Developer Disk Image

YueChen-C commented 5 months ago

I seem to have encountered the same problem before. Frequent creation of DTServiceHub resulted in too many open fds. The solution is to then reboot or reinstall Developer Disk Image

You can only restart the device to delete DDI

antuking commented 5 months ago

Seems that this issue resolved. I tried to perform two ways to reproduce. Both of them works fine for me now. Thank so much more @YueChen-C