AirtestProject / Airtest

UI Automation Framework for Games and Apps
http://airtest.netease.com/
Apache License 2.0
8.22k stars 1.29k forks source link

支持iOS 17 #1223

Open mewehk opened 3 months ago

mewehk commented 3 months ago

描述问题bug 连接不上iOS 17的设备

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tidevice/_device.py", line 501, in start_service
    return self._unsafe_start_service(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tidevice/_device.py", line 520, in _unsafe_start_service
    raise MuxServiceError(error)
tidevice.exceptions.MuxServiceError: InvalidService

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1535, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/m/Dev/pos_automation_test/ui_automation/tests/place_takeout_order/place_takeout_order.py", line 36, in <module>
    main()
  File "/Users/m/Dev/pos_automation_test/ui_automation/helper/report.py", line 9, in wrapper
    test_func(*args, **kwargs)
  File "/Users/m/Dev/pos_automation_test/ui_automation/tests/place_takeout_order/place_takeout_order.py", line 20, in main
    launch_app()
  File "/Users/m/Dev/pos_automation_test/ui_automation/setup.py", line 28, in launch_app
    start_app(config.APP_BUNDLE_ID)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airtest/utils/logwraper.py", line 131, in wrapper
    res = f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airtest/core/api.py", line 189, in start_app
    G.DEVICE.start_app(package, activity)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airtest/core/ios/ios.py", line 51, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airtest/core/ios/ios.py", line 865, in start_app
    return TIDevice.start_app(self.udid, bundle_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airtest/core/ios/ios.py", line 71, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airtest/core/ios/ios.py", line 215, in start_app
    BaseDevice(udid, Usbmux()).app_start(bundle_id=bundle_id)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tidevice/_device.py", line 720, in app_start
    with self.connect_instruments() as ts:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/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 "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/retry/api.py", line 33, in __retry_internal
    return f()
           ^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tidevice/_device.py", line 814, in connect_instruments
    conn = self.start_service(
           ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tidevice/_device.py", line 503, in start_service
    self.mount_developer_image()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tidevice/_device.py", line 674, in mount_developer_image
    raise ServiceError("DeveloperImage not found")

复现步骤 直接运行

预期效果 连接上设备

python 版本: python3.12.4

airtest 版本: 1.3.3

设备:

其他相关环境信息 Mac

Zebratestuser commented 2 months ago

Im facing the same issue.how did you solve this problem?

mynamecool commented 2 months ago

这是因为tidevice不支持iOS17以上的系统,tidevice的作者已经放弃更新了,不知道airtest团队会不会接手

brucehank commented 4 weeks ago

I have the same issue, unable to test iOS 17+. Does anyone know if Airtest will address this problem in the future?