Siyuanw / kinesis

Location Spoofing for iOS 17
GNU General Public License v3.0
253 stars 51 forks source link

ERROR Exception in callback _SelectorDatagramTransport._read_ready() handle #38

Open nix1016 opened 8 months ago

nix1016 commented 8 months ago

Getting this error after giving pairing consent. Anyone got any ideas?

[(.venv) nix1016 ~/Projects/Other/kinesis [main]$ sudo python3 main.py           
2024-02-22 17:56:49 nix1016-MacBook-Pro pymobiledevice3.remote.core_device_tunnel_service[81416] INFO Waiting user pairing consent
2024-02-22 17:57:12 nix1016-MacBook-Pro asyncio[81416] ERROR Exception in callback _SelectorDatagramTransport._read_ready()
handle: <Handle _SelectorDatagramTransport._read_ready()>
Traceback (most recent call last):
  File "/Users/nix1016.pyenv/versions/3.11.7/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/nix1016/.pyenv/versions/3.11.7/lib/python3.11/asyncio/selector_events.py", line 1169, in _read_ready
    self._protocol.datagram_received(data, addr)
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/asyncio/protocol.py", line 135, in datagram_received
    self._quic.receive_datagram(cast(bytes, data), addr, now=self._loop.time())
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/quic/connection.py", line 1026, in receive_datagram
    is_ack_eliciting, is_probing = self._payload_received(
                                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/quic/connection.py", line 2334, in _payload_received
    frame_handler(context, frame_type, buf)
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/quic/connection.py", line 1554, in _handle_crypto_frame
    self.tls.handle_message(event.data, self._crypto_buffers)
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/tls.py", line 1494, in handle_message
    self._client_handle_hello(input_buf, output_buf[Epoch.INITIAL])
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/tls.py", line 1716, in _client_handle_hello
    self._setup_traffic_protection(
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/tls.py", line 2196, in _setup_traffic_protection
    self.update_traffic_key_cb(
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/quic/connection.py", line 2637, in _update_traffic_key
    secrets_log_file.write(
    ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_RSAPrivateKey' object has no attribute 'write'
Traceback (most recent call last):
  File "/Users/nix1016/Projects/Other/kinesis/main.py", line 84, in <module>
    create_tunnel()
  File "/Users/nix1016/Projects/Other/kinesis/main.py", line 79, in create_tunnel
    asyncio.run(start_quic_tunnel(rsd))
  File "/Users/nix1016/.pyenv/versions/3.11.7/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/nix1016/.pyenv/versions/3.11.7/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nix1016/.pyenv/versions/3.11.7/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/nix1016/Projects/Other/kinesis/main.py", line 53, in start_quic_tunnel
    async with service.start_quic_tunnel(private_key) as tunnel_result:
  File "/Users/nix1016/.pyenv/versions/3.11.7/lib/python3.11/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/pymobiledevice3/remote/core_device_tunnel_service.py", line 349, in start_quic_tunnel
    async with aioquic_connect(
  File "/Users/nix1016/.pyenv/versions/3.11.7/lib/python3.11/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/asyncio/client.py", line 97, in connect
    await protocol.wait_connected()
  File "/Users/nix1016/.venv/lib/python3.11/site-packages/qh3/asyncio/protocol.py", line 127, in wait_connected
    await asyncio.shield(self._connected_waiter)
ConnectionError
Dre-Van-den-Hooff commented 8 months ago

Exact same problem here.

iiiyu commented 8 months ago

I got the same problem. Do you have any update?

nix1016 commented 8 months ago

Yeah if you change pymobiledevice3 from 2.18.1 to 2.30.1 in requirements.txt, and rerun pip install -r requirements it should work.

iiiyu commented 8 months ago

Yeah if you change pymobiledevice3 from 2.18.1 to 2.30.1 in requirements.txt, and rerun pip install -r requirements it should work.

Thanks for your reply.

Actually, I wanted to quickly update my iPhone's location, so I spent time studying pymobiledevice3. Now I can use two sample commands to accomplish it.

sudo pymobiledevice3 remote start-tunnel

pymobiledevice3 developer dvt simulate-location set --rsd HOST PORT -- x y
chikiball commented 8 months ago

I downgraded my pymobiledevice3 from 2.46.1 to 2.30.1 and now it is working