nythepegasus / SideJITServer

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

Error Code 121 #133

Open bbzze opened 2 months ago

bbzze commented 2 months ago

Happens most of the time when I try to pair, it only successfully created a server like 2 out of 15 times I tried.

  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Administrator\SideJITServer\venv\Scripts\SideJITServer.exe\__main__.py", line 7, in <module>
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\SideJITServer\__init__.py", line 259, in start_server
    refresh_devs()
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\SideJITServer\__init__.py", line 123, in refresh_devs
    for dev in get_tunneld_devices():
               ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\pymobiledevice3\tunneld.py", line 485, in get_tunneld_devices
    return get_asyncio_loop().run_until_complete(async_get_tunneld_devices(tunneld_address))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\pymobiledevice3\tunneld.py", line 480, in async_get_tunneld_devices
    return await _create_rsds_from_tunnels(tunnels)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\pymobiledevice3\tunneld.py", line 519, in _create_rsds_from_tunnels
    await rsd.connect()
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\pymobiledevice3\remote\remote_service_discovery.py", line 59, in connect
    await self.service.connect()
  File "C:\Users\Administrator\SideJITServer\venv\Lib\site-packages\pymobiledevice3\remote\remotexpc.py", line 54, in connect
    self._reader, self._writer = await asyncio.open_connection(self.address[0], self.address[1])
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\streams.py", line 48, in open_connection
    transport, _ = await loop.create_connection(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1121, in create_connection
    raise exceptions[0]
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1103, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1006, in _connect_sock
    await self.sock_connect(sock, address)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 729, in sock_connect
    return await self._proactor.connect(sock, address)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_events.py", line 803, in _poll
    value = callback(transferred, key, ov)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_events.py", line 599, in finish_connect
    ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired
Foodie947 commented 1 month ago

i have the exact same issue, and the only thing i can see between us is that we are both using python 3.12, ill try downgrading really quickly

edit: it seems like there is an error trying to establish an asynchronous connection using asyncio this could be due to network latency or a failure with the tunneling service. it could also be a firewall issue, but that didnt fix the problem for me

edit 2: a consistent way that i found was to wait for the phone symbol to show up in itunes (ie. device connects to your pc), then start the server

edit 3: final fix: at least the way that i have it set up, i have a folder on my desktop in which i cloned the repo. i then created a venv and installed the dependencies as normal. whenever i launch the server, i open itunes and wait for my device to appear. i then double click on my folder and open it. i do alt+f then i press s and then a. this opens an admin powershell window. in the powershell, i check to see that the directory is the one i cloned the repo in. then i do not enter the venv, and instead i just run the command SideJITServer.exe. for some reason, doing it this way seems more consistent.

edit 4: i lied, its still inconsistent

M1SCAR commented 1 month ago

Exactly the same problem, have you been able to solve it?