nythepegasus / SideJITServer

A JIT enabler for iOS 17 with a Windows/macOS computer on the same WiFi!
GNU General Public License v3.0
270 stars 18 forks source link

script crashing after unplugging iPhone from USB #16

Open brokoler opened 2 months ago

brokoler commented 2 months ago

Hello,

I'm using macOS to run SideJITServer and followed the Youtube tutorials to set it up. SideJITServer was successfully installed via pip install SideJITServer and afterwards my iPhone was paired via USB and sudo SideJITServer -y

Used software versions: This was tested with macOS 14.4.1, iPhone 17.4.1, SideJITServer 1.3.0, pymobiledevice3 3.4.4

Issue description SideJITServer then started and created a USB tunnel, but after unplugging my iPhone when the script is running it crashes completely. Please see following error messages:

user@iMac-of-user ~ % sudo SideJITServer
INFO: Started server process [1286] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://127.0.0.1:49151 (Press CTRL+C to quit) 2024-04-21 11:13:31 iMac-of-user.local pymobiledevice3.tunneld[1286] INFO [start-tunnel-task-usbmux-00000000-0000000000000000-USB] Created tunnel --rsd 0000:0000:0000::1 63415 INFO: 127.0.0.1:49931 - "GET / HTTP/1.1" 200 OK

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pymobiledevice3/tunneld.py", line 168, in start_tunnel_task async with start_tunnel(protocol_handler, protocol=protocol) as tun: File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pymobiledevice3/remote/tunnel_service.py", line 941, in start_tunnel async with start_tunnel_over_remotepairing( File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pymobiledevice3/remote/tunnel_service.py", line 904, in start_tunnel_over_remotepairing async with remote_pairing.start_quic_tunnel( File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pymobiledevice3/remote/tunnel_service.py", line 404, in start_quic_tunnel async with aioquic_connect( File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/qh3/asyncio/client.py", line 100, in connect protocol.close() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/qh3/asyncio/protocol.py", line 52, in close self.transmit() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/qh3/asyncio/protocol.py", line 102, in transmit for data, addr in self._quic.datagrams_to_send(now=self._loop.time()): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/qh3/quic/connection.py", line 541, in datagrams_to_send crypto = self._cryptos[epoch]


KeyError: <Epoch.INITIAL: 0>

The error reason seems to be following:
**RuntimeError: qh3 v1.0+ no longer support passing cryptography certificate objects within a QuicConfiguration object. Use configuration.load_cert_chain(...) instead using PEM encoded values.**

**To me it seems something needs to be changed in the script, PEM encoded values seem to be forbidden now.**
Penguin7105 commented 2 months ago

i have the same issue and have not found a fix

fritzlb commented 2 months ago

I experienced something similar with pymobiledevice3, running pip install qh3==0.15.1 fixed it :)

polymo1 commented 2 months ago

running pip install qh3==0.15.1 fixed it

is qh3 a replacement/alternative to pymobiledevice3?

fritzlb commented 2 months ago

Nope a dependency Older pymobiledevice3 versions don't specify a version of qh3 and the newest release isn't compatible anymore