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

developer dvt xcuitest no longer works on Linux in the latest version #1118

Closed
jordus100 opened this issue Jul 11, 2024 · 1 comment
Closed

Comments

@jordus100
Copy link

Test environment

  • Ubuntu 22.04 LTS
  • iPhone 11 iOS 18 DB 3

I've been using pmd3 for quite some time now for launching Appium WebDriverAgent with the command pymobiledevice3 developer dvt xcuitest me.smartdust.wda.WebDriverAgentRunner.xctrunner --tunnel [SERIAL]
It still works for me in the pmd3 version from this commit.

However, when I updated to the latest version (4.11.6), the command returns an error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/__main__.py", line 180, in <module>
    main()
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/__main__.py", line 106, in main
    cli()
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/cli/cli_common.py", line 150, in wrap_callback_calling
    callback(service_provider=service_provider, **kwargs)
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/cli/developer.py", line 293, in xcuitest
    XCUITestService(service_provider).run(bundle_id)
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/services/dvt/testmanaged/xcuitest.py", line 52, in run
    self.setup_xcuitest(bundle_id, xctest_path, xctest_configuration)
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/services/dvt/testmanaged/xcuitest.py", line 166, in setup_xcuitest
    for name in afc.listdir("/tmp"):
                ^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/parameter_decorators/common.py", line 28, in new_f
    return f(*ba.args, **ba.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/services/afc.py", line 383, in listdir
    data = self._do_operation(afc_opcode_t.READ_DIR, afc_read_dir_req_t.build({'filename': filename}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/services/afc.py", line 593, in _do_operation
    self._dispatch_packet(opcode, data)
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/services/afc.py", line 573, in _dispatch_packet
    self.service.sendall(header + data)
  File "/home/jordan/workspace/pmd3venv/lib/python3.11/site-packages/pymobiledevice3/service_connection.py", line 123, in sendall
    self.socket.sendall(data)
OSError: [Errno 9] Bad file descriptor

Looks like it might be Linux related.

@doronz88
Copy link
Owner

Probably a duplicate of:
#647

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

No branches or pull requests

2 participants