Skip to content

Fix reconnect case label in start_remote_debug_server - #609

Open
zHElEARN wants to merge 1 commit into
ios-control:masterfrom
zHElEARN:fix-reconnect-case-label
Open

Fix reconnect case label in start_remote_debug_server#609
zHElEARN wants to merge 1 commit into
ios-control:masterfrom
zHElEARN:fix-reconnect-case-label

Conversation

@zHElEARN

Copy link
Copy Markdown

Fixes a typo in start_remote_debug_server where case 0x800002d: was used instead of case 0xe800002d:. This prevented the reconnect mechanism from being triggered when the device lost connection during service start.

When running ios-deploy with --nolldb, starting debugserver can sometimes fail with error 0xe800002d (Could not send a message to the device).

Although the code comment in start_remote_debug_server explicitly notes:

In other cases, it's been observed, that device may loose connection here (0xe800002d).

The switch(start_err) block incorrectly checked for case 0x800002d:. Because of missing the leading e, 0xe800002d fell through to the default: case, triggering a fatal error rather than executing the recovery logic.

[ 90%] SandboxingApplication
[ 95%] GeneratingApplicationMap
[100%] Installed package .build/Build/Products/Debug-iphoneos/XXX.app/
------ Debug phase ------
Starting debug of b4e4b550d16adafdcdbb5689fcdaddd9535e0312 (J96AP, iPad mini 4, iphoneos, arm64, 15.6.1, 19G82) a.k.a. 'iPad mini' connected through USB...
[  0%] Looking up developer disk image
[ 95%] Developer disk image mounted successfully
Symbol Path: /Users/XXX/Library/Developer/Xcode/iOS DeviceSupport/iPad5,1 15.6.1 (19G82)/Symbols
[100%] Listening for lldb connections
-------------------------
debugserver port: 12345
App path: /private/var/containers/Bundle/Application/5C97ECF3-485C-414D-9C0F-D433513412A1/XXX.app
Failed to start debugserver: e800002d Could not send a message to the device.
2026-07-27 16:33:39.921 ios-deploy[72909:3055391] [ !! ] Error 0xe800002d: Could not send a message to the device. start_err

Fix

Updated case 0x800002d: to case 0xe800002d: in src/ios-deploy/ios-deploy.m to properly catch the error and reconnect to the device as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant