You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a hint on what could be happening here...
Test environment
Sequoia 15.2.
iPhone Xs iOS 18.3
Describe the bug
Can't start tunnel connection
To Reproduce
def verify_network_stack(device) -> bool:
"""Verify network stack configuration"""
print("Verifying network stack...")
try:
# Log the address details for debugging
print(f"Device service address: {device.service.address}")
address = device.service.address[0]
ports = [device.service.address[1]]
print(f"Attempting to connect to {address} on ports {ports}")
for port in ports:
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(5)
result = sock.connect_ex((address, port))
sock.close()
if result == 0:
print(f"Port {port} is open")
else:
print(f"Port {port} is closed")
return False
except Exception as e:
print(f"Error checking port {port}: {str(e)}")
return False
return True
except Exception as e:
print(f"Error during network stack verification: {str(e)}")
return False
def get_devices():
devices = get_device_list()
verify_network_stack(devices[0])
if not devices:
raise NoDeviceConnectedError()
return devices
class TunnelCreator:
def __init__(self, devices):
self.devices = devices
self.tunnels_to_create = 1
self.creating_tunnels_signal_file = None
self.close_tunnels_signal_file = None
self.tunnels_addresses_file = None
def create(self, device_udid=None):
if len(self.devices) == 1:
# only one device found
rsd = self.devices[0]
else:
# several devices were found
if device_udid is None:
# show prompt if non explicitly selected
rsd = prompt_device_list(self.devices)
else:
rsd = [device for device in self.devices if device.udid == device_udid]
print(rsd)
if len(rsd) > 0:
rsd = rsd[0]
else:
raise NoDeviceConnectedError()
if device_udid is not None and rsd.udid != device_udid:
raise NoDeviceConnectedError()
if not verify_tunnel_imports():
return
asyncio.run(tunnel_task_concurrently(rsd, tunnels_to_create=self.tunnels_to_create,
tunnels_addresses_file=self.tunnels_addresses_file,
creating_tunnels_signal_file=self.creating_tunnels_signal_file,
close_tunnels_signal_file=self.close_tunnels_signal_file), debug=True)
Expected behavior
Tunnel established
Error result
Verifying network stack...
Device service address: ('fe80::4d4:80ff:fe55:ff8c%en6', 58783)
Attempting to connect to fe80::4d4:80ff:fe55:ff8c%en6 on ports [58783]
Error checking port 58783: [Errno 8] nodename nor servname provided, or not known
WARNING:asyncio:Executing <Task pending name='Task-48' coro=<tunnel_task() running at /Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/venv/lib/python3.10/site-packages/pymobiledevice3/cli/remote.py:120> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/futures.py:385, Task.task_wakeup()] created at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py:429> cb=[gather.<locals>._done_callback() at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:720] created at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:636> took 0.450 seconds
Traceback (most recent call last):
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/remote-xpc-tunnel.py", line 162, in <module>
main()
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/remote-xpc-tunnel.py", line 158, in main
tunnel_creator.create()
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/remote-xpc-tunnel.py", line 107, in create
asyncio.run(tunnel_task_concurrently(rsd, tunnels_to_create=self.tunnels_to_create,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/venv/lib/python3.10/site-packages/pymobiledevice3/cli/remote.py", line 210, in tunnel_task_concurrently
await asyncio.gather(*tasks)
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/venv/lib/python3.10/site-packages/pymobiledevice3/cli/remote.py", line 120, in tunnel_task
async with start_tunnel(service_provider, secrets=secrets, max_idle_timeout=max_idle_timeout,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 199, in __aenter__
return await anext(self.gen)
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/venv/lib/python3.10/site-packages/pymobiledevice3/remote/core_device_tunnel_service.py", line 758, in start_tunnel
async with service.start_quic_tunnel(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 199, in __aenter__
return await anext(self.gen)
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/venv/lib/python3.10/site-packages/pymobiledevice3/remote/core_device_tunnel_service.py", line 380, in start_quic_tunnel
async with aioquic_connect(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 199, in __aenter__
return await anext(self.gen)
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/venv/lib/python3.10/site-packages/qh3/asyncio/client.py", line 99, in connect
await protocol.wait_connected()
File "/Users/juan/Documents/GitHub/apptim/ios-remote-xpc-tunnel-creator/venv/lib/python3.10/site-packages/qh3/asyncio/protocol.py", line 129, in wait_connected
await asyncio.shield(self._connected_waiter)
ConnectionError
The text was updated successfully, but these errors were encountered:
I'm looking for a hint on what could be happening here...
Test environment
Describe the bug
Can't start tunnel connection
To Reproduce
Expected behavior
Tunnel established
Error result
The text was updated successfully, but these errors were encountered: