facebook / idb

idb is a flexible command line interface for automating iOS simulators and devices
https://fbidb.io
MIT License
4.51k stars 432 forks source link

idb list-targets: Multiple exceptions - Connect call failed #610

Open romancxx opened 4 years ago

romancxx commented 4 years ago

Description

When running idb list-targets I'm getting mutiple errors

Reproduction

I'm on mac, I have : python --version Python 2.7.16 python3 --version Python 3.8.5

I installed idb as suggested :

brew tap facebook/fb
brew install idb-companion
pip3.6 install fb-idb

and then running idb list-targets will output :


2020-07-23 17:22:48,250 [ERROR] - root - Exception thrown in main
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/main.py", line 211, in gen_main
    await root_command.run(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/base.py", line 94, in run
    return await self._get_subcommand_for_args(args).run(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/base.py", line 126, in run
    await self._run_impl(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/base.py", line 157, in _run_impl
    await self.run_with_client(args=args, client=client)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/list_targets.py", line 24, in run_with_client
    targets = await client.list_targets()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/common/logging.py", line 110, in _async_wrapper
    raise self.translate_exception(ex)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/common/logging.py", line 85, in _async_wrapper
    value = await function(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/client/grpc.py", line 151, in func_wrapper
    return await func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/client/grpc.py", line 835, in list_targets
    for companion in companions
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/client/grpc.py", line 823, in _companion_to_target
    response = await stub.describe(TargetDescriptionRequest())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 829, in __call__
    await stream.send_message(message, end=True)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 241, in send_message
    await self.send_request()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 173, in send_request
    protocol = await self._channel.__connect__()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 696, in __connect__
    self._protocol = await self._create_connection()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 681, in _create_connection
    ssl=self._ssl,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 792, in create_connection
    ', '.join(str(exc) for exc in exceptions)))
OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 52612, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 52612)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/idb", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/main.py", line 247, in main
    return loop.run_until_complete(gen_main(cmd_input))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
    return future.result()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/main.py", line 226, in gen_main
    await drain_coroutines(pending)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/main.py", line 235, in drain_coroutines
    asyncio.shield(asyncio.gather(*pending)), timeout=COROUTINE_DRAIN_TIMEOUT
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/main.py", line 211, in gen_main
    await root_command.run(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/base.py", line 94, in run
    return await self._get_subcommand_for_args(args).run(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/base.py", line 126, in run
    await self._run_impl(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/base.py", line 157, in _run_impl
    await self.run_with_client(args=args, client=client)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/cli/commands/list_targets.py", line 24, in run_with_client
    targets = await client.list_targets()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/common/logging.py", line 110, in _async_wrapper
    raise self.translate_exception(ex)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/common/logging.py", line 85, in _async_wrapper
    value = await function(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/client/grpc.py", line 151, in func_wrapper
    return await func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/client/grpc.py", line 835, in list_targets
    for companion in companions
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/idb/client/grpc.py", line 823, in _companion_to_target
    response = await stub.describe(TargetDescriptionRequest())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 829, in __call__
    await stream.send_message(message, end=True)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 241, in send_message
    await self.send_request()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 173, in send_request
    protocol = await self._channel.__connect__()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 696, in __connect__
    self._protocol = await self._create_connection()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/grpclib/client.py", line 681, in _create_connection
    ssl=self._ssl,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 792, in create_connection
    ', '.join(str(exc) for exc in exceptions)))
OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 52612, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 52612)

Additional Information

idb-companion 1.0.14 fb-idb-0.0.7

I searched for similar issues, found nothing so far, I would appreciate any idea.

AirChen commented 4 years ago
idb connect <target>

May helpful.