github doronz88/pymobiledevice3 v11.12.1

2 hours ago

Highlights

🐛 The CDP bridge reconnects after a device reboot instead of dying

pymobiledevice3 --reconnect webinspector cdp often failed to come back once the device
disconnected - it printed a traceback and the process was simply gone. Stress-rebooting a device
under a running bridge killed it in 3 of 8 cycles. Two things were wrong, both on the path the
device takes coming back:

  • The bridge connected to WebInspector from inside the ASGI lifespan, and uvicorn runs the
    lifespan itself: an exception there is logged and turned into sys.exit(3), which asyncio
    re-raises straight out of the event loop. The device error was only printed - it never
    reached the handler that classifies it, so --reconnect never waited for the device and never
    re-ran the command.
  • --reconnect re-invokes a command the moment lockdownd answers, a second or two before
    webinspectord serves anything. webinspectord refuses a session by terminating the connection,
    exactly as a device with Web Inspector disabled does, so a device that was merely still booting
    was reported as "Web Inspector is disabled" - fatal, and never retried.

The handshake is now retried while the device is still there, and a refusal is reported as a
disabled Web Inspector only once it outlives the deadline; the device's own disabled notification
still ends the wait immediately, and a device that went away mid-handshake is reported as the
disconnect it is. Six of six reboot cycles now reconnect cleanly.

pymobiledevice3 --reconnect webinspector cdp

💖 TestingBot joins the sponsors

Thanks to TestingBot for supporting the project.

What's Changed

Full Changelog: v11.12.0...v11.12.1

Don't miss a new pymobiledevice3 release

NewReleases is sending notifications on new releases.