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 intosys.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--reconnectnever waited for the device and never
re-ran the command. --reconnectre-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
- cc484f8 cdp: Connect to the device before uvicorn owns the failure (#1941) (@doronz88)
- 52ec8fe webinspector: Retry a refused handshake instead of reporting it as disabled (#1941) (@doronz88)
- 7219072 readme: Add TestingBot to sponsors (#1940) (@doronz88)
Full Changelog: v11.12.0...v11.12.1