Highlights
✨ Error messages that explain themselves
When a command fails, pymobiledevice3 now prints one line saying what went wrong, instead of a raw traceback or a terse developer note. About 280 error messages across the package were rewritten to say what failed, and they keep the device's reply and the identifiers involved. Every exception also describes itself, so library users get the same messages in str(e).
$ pymobiledevice3 lockdown get com.apple.mobile.wireless_lockdown NoSuchKey
ERROR No such value.
INFO Run again with -v for the full traceback (include it when reporting an issue)Run with -v to see the full traceback, rendered with syntax-highlighted source on a terminal. When pymobiledevice3 receives a reply it does not understand, the message asks you to open an issue with that -v output. The bug report template asks for it too.
For library users: str(e) changes for many exceptions. Notably, lockdown errors no longer read as lockdownd's raw code (MissingValue). The code is now in e.error, and str(e) describes the failure.
🐛 Fixes
serve-vncno longer cancels every task on the event loop when it shuts down. Before, stopping it also killed the caller's in-process tunnel. It also keeps the audio session alive when the device starts out silent.lockdown wifi-connectionsreportsfalseon a device that never had the setting changed, instead of failing with "No such value".- Progress callbacks passed to
InstallationProxyServiceinstall, uninstall and restore now get their extra arguments unpacked. - Pairing errors from lockdownd (passcode required, trust dialog pending, user denied) read as a message instead of a tuple.
wdacommands stop the XCUITest runner even when the command fails.- The interactive device prompt closes the connections to the devices you didn't pick.
restore updateno longer prints a traceback before its error message.- A failed service connection no longer logs "Future exception was never retrieved".
⚠️ Removed serve-web --max-bitrate
The option was never sent to the device, so it had no effect.
🧹 Internal cleanups
These are behavior-preserving simplifications: lockdown accessors are implemented once for both lockdown and RSD, service-name selection is shared, TSS and core-profile-session loops are shared, serve-web's HTTP responses go through one helper, USB RSD discovery is simplified, and unreferenced code is removed. Signing requests and serve-web responses were checked byte for byte against the previous code.
What's Changed
- 42db5bb Raise ProtocolError for replies that don't fit the protocol (#2091) (@doronz88)
- b085697 dvt, web_protocol: Word error messages for users (#2091) (@doronz88)
- 3143387 restore: Word error messages for users (#2091) (@doronz88)
- f8f6c35 usbmux, irecv, dtx, cli: Word error messages for users (#2091) (@doronz88)
- e21cff3 remote: Word error messages for users (#2091) (@doronz88)
- a3c5daf services: Word error messages for users (#2091) (@doronz88)
- e26996c github: Ask bug reports for the -v output (#2091) (@doronz88)
- 1ae534b cli: Render the -v error traceback with rich (#2091) (@doronz88)
- 9e37b85 cli: Report any pymobiledevice3 error by its message (#2091) (@doronz88)
- bfebc52 lockdown: Raise lockdownd's error replies with their description (#2091) (@doronz88)
- ed968c0 exceptions: Make every exception's message describe the failure (#2091) (@doronz88)
- 35ccb31 lockdown: Report Wi-Fi connections as off when never set (#2090) (@doronz88)
- 1ace9ec screen-stream: Build the web viewer's HTTP responses in one place (#2089) (@doronz88)
- f413df6 tss: Share the manifest-entry and device-value copy loops (#2089) (@doronz88)
- 7e31744 core-profile-session: Share the live run loop and the parser clock setup (#2089) (@doronz88)
- fbc81f2 services: Pick the lockdown or RSD service name in LockdownService (#2088) (@doronz88)
- 88317ef lockdown: Implement the value accessors once, in LockdownServiceProvider (#2087) (@doronz88)
- 3872ec1 remote: Treat each USB device as having one RSD address (#2086) (@doronz88)
- 163da3b Remove unreferenced internal code (#2085) (@doronz88)
- 520f814 restore: Stop printing a traceback before the CLI's error message (#2084) (@doronz88)
- 053f04c wda: Stop the XCUITest runner also when a command fails (#2084) (@doronz88)
- 477efc9 cli: Close the devices not picked from the device prompt (#2084) (@doronz88)
- 4ba1303 lockdown_service: Retrieve a failed connect's exception from its shared future (#2083) (@doronz88)
- b21201e installation_proxy: Pass a progress handler's extra args unpacked (#2083) (@doronz88)
- b1ee150 serve-web: Drop --max-bitrate, which the device was never sent (#2082) (@doronz88)
- 1c0260e serve-vnc: Keep the audio RR keepalive going before any audio arrives (#2081) (@doronz88)
- d823fb2 serve-vnc: Cancel only the server's own tasks at shutdown (#2081) (@doronz88)
Full Changelog: v11.41.2...v11.42.0