idb icon indicating copy to clipboard operation
idb copied to clipboard

Cannot start debug server when connecting to iPhone

Open kainzhong opened this issue 4 years ago • 0 comments

We use GitHub Issues for bugs.

--- Please use this template, and delete everything above this line before submitting your issue ---

Description

bytedance in ~ λ idb connect 00008030-001E10CC0AEA802E udid: 00008030-001E10CC0AEA802E is_local: True

bytedance in ~ λ idb debugserver start com.bytedance.zhongkaining --log DEBUG --udid 00008030-001E10CC0AEA802E 2021-10-26 19:40:26,687 [DEBUG] - start - DebugServerStartCommand command run with: Namespace(log_level='WARNING', compression=None, companion=None, companion_path='/usr/local/bin/idb_companion', companion_local=False, companion_tls=False, prune_dead_companion=True, root_command='debugserver', debugserver='start', udid='00008030-001E10CC0AEA802E', log_level_deprecated='DEBUG', json=False, bundle_id='com.bytedance.zhongkaining') 2021-10-26 19:40:26,687 [WARNING] - start - Setting --log after the command is deprecated, please place it at the start of the invocation 2021-10-26 19:40:26,687 [DEBUG] - idb - DebugServerStartCommand called 2021-10-26 19:40:26,689 [DEBUG] - start - Got existing companion CompanionInfo(udid='00008030-001E10CC0AEA802E', is_local=True, address=TCPAddress(host='localhost', port=62419), metadata={}) 2021-10-26 19:40:26,697 [DEBUG] - hpack.hpack - Adding (b':method', b'POST') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,697 [DEBUG] - hpack.hpack - Encoding 3 with 7 bits 2021-10-26 19:40:26,697 [DEBUG] - hpack.hpack - Adding (b':scheme', b'http') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,697 [DEBUG] - hpack.hpack - Encoding 6 with 7 bits 2021-10-26 19:40:26,697 [DEBUG] - hpack.hpack - Adding (b':path', b'/idb.CompanionService/connect') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 4 with 6 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 21 with 7 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Adding (b':authority', b'localhost:62419') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 1 with 6 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 11 with 7 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Adding (b'te', b'trailers') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 2 with 7 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 6 with 7 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Adding (b'content-type', b'application/grpc') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 31 with 6 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 11 with 7 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Adding (b'user-agent', b'grpc-python-grpclib/0.4.2 (darwin; cpython/3.9.6)') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 58 with 6 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoding 37 with 7 bits 2021-10-26 19:40:26,698 [DEBUG] - hpack.hpack - Encoded header block to b'\x83\x86D\x95\xd2F\xbd\xe3\xd3X\xea1\xea\xdc[;\x98\x85\x87\xaa\xa2\x91?A\x8b\xa0\xe4\x1d\x13\x9d\t\xb8\xe0\x9a\x0b\xff@\x82I\x7f\x86M\x835\x05\xb1\x1f_\x8b\x1du\xd0b\r&=LMedz\xa5\x9a\xca\xc8\xb5~\x939\xeaZk+%\x06\x8d\x80.\xd2\xe2S\xfa\x90vx5_j\x12\xbfI\x9c\xf50\xca\xef\xae\xe7\xf7' 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoding b'\x88@\x0ccontent-type\x10application/grpc@\x14grpc-accept-encoding\x15identity,deflate,gzip@\x0faccept-encoding\ridentity,gzip' 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 8, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded (b':status', b'200'), consumed 1 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 12, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 16, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded (<memory at 0x108bc0280>, <memory at 0x108bc01c0>), total consumed 31 bytes, indexed True 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 20, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 21, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded (<memory at 0x108bc0400>, <memory at 0x108bc0340>), total consumed 44 bytes, indexed True 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 15, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 13, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded (<memory at 0x108bc0580>, <memory at 0x108bc04c0>), total consumed 31 bytes, indexed True 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoding b'@\x0bgrpc-status\x010' 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 11, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded 1, consumed 1 bytes 2021-10-26 19:40:26,699 [DEBUG] - hpack.hpack - Decoded (<memory at 0x108bc0700>, <memory at 0x108bc0640>), total consumed 15 bytes, indexed True 2021-10-26 19:40:26,700 [DEBUG] - start - Constructed client for companion 00008030-001E10CC0AEA802E 2021-10-26 19:40:26,700 [DEBUG] - idb - debugserver_start called 2021-10-26 19:40:26,700 [DEBUG] - idb - debug_server called 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Adding (b':method', b'POST') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Encoding 3 with 7 bits 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Adding (b':scheme', b'http') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Encoding 6 with 7 bits 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Adding (b':path', b'/idb.CompanionService/debugserver') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Encoding 4 with 6 bits 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Encoding 24 with 7 bits 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Adding (b':authority', b'localhost:62419') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Encoding 66 with 7 bits 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Adding (b'te', b'trailers') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Encoding 65 with 7 bits 2021-10-26 19:40:26,700 [DEBUG] - hpack.hpack - Adding (b'content-type', b'application/grpc') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,701 [DEBUG] - hpack.hpack - Encoding 64 with 7 bits 2021-10-26 19:40:26,701 [DEBUG] - hpack.hpack - Adding (b'user-agent', b'grpc-python-grpclib/0.4.2 (darwin; cpython/3.9.6)') to the header table, sensitive:False, huffman:True 2021-10-26 19:40:26,701 [DEBUG] - hpack.hpack - Encoding 63 with 7 bits 2021-10-26 19:40:26,701 [DEBUG] - hpack.hpack - Encoded header block to b'\x83\x86D\x98`\xd2F\xbd\xe3\xd3X\xea1\xea\xdc[;\x98\x85bB\xc7l\xc8-\x9d\xcbg\xc2\xc1\xc0\xbf'

And then idb stuck here forever.

com.bytedance.zhongkaining is the bundle ID of my application, which is debuggable and installed on my iPhone via idb

Reproduction

I think just connect your iPhone to MacBook, and start a debug server, then this bug can be reproduced.

Solution

[OPTIONAL: Do you know what needs to be done to address this issue? Ideally, provide a pull request which fixes this issue.]

Additional Information

I installed idb by:

brew tap facebook/fb brew install idb-companion sudo pip3 install fb-idb

kainzhong avatar Oct 26 '21 11:10 kainzhong