idb icon indicating copy to clipboard operation
idb copied to clipboard

idb list-targets can't not work and return "No available targets"

Open phoebusliang opened this issue 7 years ago • 18 comments

I followed up guide: 1. brew tap facebook/fb 2. brew install idb-companion 3. pip3 install fb-idb

After that, I tried to use idb in my laptop, I executed the command like: idb list-targets, but the response shows like: "No available targets" even I manually boot a simulator.

phoebusliang avatar Aug 25 '19 06:08 phoebusliang

I believe this has been fixed on master, I'll publish new versions of both of these packages now

c-ryan747 avatar Aug 26 '19 16:08 c-ryan747

Pushed out a new version, let me now if it fixes this for you

You might have to run sudo pkill -f idb first to clean up the running old versions

c-ryan747 avatar Aug 26 '19 16:08 c-ryan747

I have same issue. After update fd-idb, idb-companion, it still raised.

salphaon avatar Aug 27 '19 08:08 salphaon

Fb-idb, idb-companion was deleted and then re-installed.

No available targets were output from the first list-targets.

$ idb list-targets
No available targets

A error occurred when the second list-targets command.

$ idb list-targets
2019-08-27 18:54:37,174 [ERROR] - root - Exception thrown in main
Traceback (most recent call last):
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/cli/main.py", line 211, in gen_main
    await root_command.run(args)
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/cli/commands/base.py", line 94, in run
    return await self._get_subcommand_for_args(args).run(args)
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/cli/commands/base.py", line 126, in run
    await self._run_impl(args)
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/cli/commands/base.py", line 157, in _run_impl
    await self.run_with_client(args=args, client=client)
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/cli/commands/list_targets.py", line 24, in run_with_client
    targets = await client.list_targets()
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/common/logging.py", line 110, in _async_wrapper
    raise self.translate_exception(ex)
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/common/logging.py", line 85, in _async_wrapper
    value = await function(*args, **kwargs)
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/client/grpc.py", line 151, in func_wrapper
    return await func(*args, **kwargs)
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/client/grpc.py", line 831, in list_targets
    local_targets = self.local_targets_manager.get_local_targets()
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/common/local_targets_manager.py", line 27, in get_local_targets
    self.local_targets = self._load()
  File "/Users/home/test/idb/venv/lib/python3.7/site-packages/idb/common/local_targets_manager.py", line 34, in _load
    targets_list = json.load(f)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 340, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 358, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Because of /tmp/idb_local_targets is empty. How to regenerate it?

salphaon avatar Aug 27 '19 10:08 salphaon

you can regenerate it by running 'idb_campanion --notify /tmp/idb_local_targets" although 'idb list-targets' should call that command in the background. but in the meantime you can unblock yourself this way

zeyadsalloum avatar Aug 27 '19 12:08 zeyadsalloum

@zeyadsalloum Something is wrong

2019-08-28 10:01:52.559+0900 IDB Companion Built at Aug 26 2019 09:31:24
2019-08-28 10:01:52.561+0900 Invoked with args=[/usr/local/bin/idb_companion, --notify, /tmp/idb_local_targets] env={JAVA_HOME => /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home, OLDPWD => /Users/home, SSH_AUTH_SOCK => /private/tmp/com.apple.launchd.Eg72qnPmV4/Listeners, PAGER => less, TMUX => /tmp//tmux-502/default,1033,0, SHELL => /bin/zsh, LESS => -R, ITERM_SESSION_ID => w0t0p0:022FD698-F985-4CB0-BA6F-0BAA89060A70, XPC_SERVICE_NAME => 0, TERM_PROGRAM_VERSION => 3.3.2, COMMAND_MODE => unix2003, MOBIL_SECRET_KEY => perfection-is-achieved-not-when-there-is-nothing-more-to-add-but-when-there-is-nothing-left-to-take-away, VIRTUAL_ENV => /Users/home/test/idb/venv, LANG => ko_KR.UTF-8, HOME => /Users/home, PWD => /Users/home/test/idb, TMPDIR => /var/folders/j_/5r87wkh93wv70cr9svxzbm580000gp/T/, SHLVL => 2, LC_TERMINAL_VERSION => 3.3.2, XPC_FLAGS => 0x0, PATH => /Users/home/test/idb/venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin, TERM => screen, ITERM_PROFILE => Default, TMUX_PANE => %1, LC_TERMINAL => iTerm2, TERM_PROGRAM => iTerm.app, LSCOLORS => Gxfxcxdxbxegedabagacad, USER => home, TERM_SESSION_ID => w0t0p0:022FD698-F985-4CB0-BA6F-0BAA89060A70, COLORTERM => truecolor, ZSH => /Users/home/.oh-my-zsh, COLORFGBG => 7;0, Apple_PubSub_Socket_Render => /private/tmp/com.apple.launchd.As8ewq6BWo/Render, PS1 => (venv) ${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info), SECURITYSESSIONID => 186a7, LOGNAME => home, _ => /usr/local/bin/idb_companion, LC_CTYPE => ko_KR.UTF-8, __CF_USER_TEXT_ENCODING => 0x1F6:0x3:0x33}
2019-08-28 10:01:52.564+0900 Notify mode is set. writing updates to /tmp/idb_local_targets
2019-08-28 10:01:52.566+0900 [framework_loader] MobileDevice: Loading from /System/Library/PrivateFrameworks/MobileDevice.framework
2019-08-28 10:01:52.572+0900 [framework_loader] MobileDevice: Successfully loaded
2019-08-28 10:01:52.572+0900 [framework_loader] Loaded All Private Frameworks [MobileDevice]
Aug 28 10:01:52  idb_companion[55002] <Notice>: _SubscribeForMuxNotifications (thread 0x10bee95c0): returned 0x0.
Aug 28 10:01:52  idb_companion[55002] <Notice>: AMDeviceNotificationSubscribeWithOptions (thread 0x10bee95c0): returned 0x0.
2019-08-28 10:01:52.685+0900 [framework_loader] CoreSimulator: Loading from /Library/Developer/PrivateFrameworks/CoreSimulator.framework
2019-08-28 10:01:52.686+0900 [framework_loader] CoreSimulator: Successfully loaded
2019-08-28 10:01:52.686+0900 [framework_loader] Loaded All Private Frameworks [CoreSimulator]
2019-08-28 10:01:52.692+0900 [CoreSimulator] Monitoring for new profiles in /System/Library/Developer/CoreSimulator/Profiles.  Currently watching for Developer directory to be created. (fd=8)
2019-08-28 10:01:52.692+0900 [CoreSimulator] Monitoring for new profiles in /Library/Developer/CoreSimulator/Profiles.  Currently watching for CoreSimulator directory to be created. (fd=10)
2019-08-28 10:01:52.692+0900 [CoreSimulator] Monitoring for new profiles in /AppleInternal/Library/Developer/CoreSimulator/Profiles.  Currently watching for AppleInternal directory to be created. (fd=11)
2019-08-28 10:01:52.692+0900 [CoreSimulator] Monitoring for new profiles in /Users/home/Library/Developer/CoreSimulator/Profiles.  Currently watching for Profiles directory to be created. (fd=12)
2019-08-28 10:01:52.698+0900 [CoreSimulator] Runtime bundle found com.apple.CoreSimulator.SimRuntime.tvOS-12-4 : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/tvOS.simruntime
2019-08-28 10:01:52.699+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple TV 4K.simdevicetype
2019-08-28 10:01:52.700+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple TV 4K (at 1080p).simdevicetype
2019-08-28 10:01:52.701+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple TV.simdevicetype
2019-08-28 10:01:52.702+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.tv at '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/tv.simdevicechrome'
2019-08-28 10:01:52.704+0900 [CoreSimulator] Runtime bundle found com.apple.CoreSimulator.SimRuntime.iOS-12-4 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime
2019-08-28 10:01:52.706+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Pro : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Pro (12.9-inch).simdevicetype
2019-08-28 10:01:52.707+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-XR : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone Xʀ.simdevicetype
2019-08-28 10:01:52.708+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 6 Plus.simdevicetype
2019-08-28 10:01:52.709+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 8 Plus.simdevicetype
2019-08-28 10:01:52.710+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-XS-Max : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone Xs Max.simdevicetype
2019-08-28 10:01:52.711+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Pro (9.7-inch).simdevicetype
2019-08-28 10:01:52.712+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-mini-4 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad mini 4.simdevicetype
2019-08-28 10:01:52.712+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-mini--5th-generation- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad mini (5th generation).simdevicetype
2019-08-28 10:01:52.714+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Pro (10.5-inch).simdevicetype
2019-08-28 10:01:52.714+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Air--3rd-generation- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Air (3rd generation).simdevicetype
2019-08-28 10:01:52.715+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-7 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 7.simdevicetype
2019-08-28 10:01:52.716+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-mini-3 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad mini 3.simdevicetype
2019-08-28 10:01:52.717+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-2 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad 2.simdevicetype
2019-08-28 10:01:52.718+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad--5th-generation- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad (5th generation).simdevicetype
2019-08-28 10:01:52.718+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Air : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Air.simdevicetype
2019-08-28 10:01:52.719+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-mini-2 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad mini 2.simdevicetype
2019-08-28 10:01:52.720+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad--6th-generation- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad (6th generation).simdevicetype
2019-08-28 10:01:52.721+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-6 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 6.simdevicetype
2019-08-28 10:01:52.722+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-5s : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 5s.simdevicetype
2019-08-28 10:01:52.722+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---3rd-generation- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Pro (12.9-inch) (3rd generation).simdevicetype
2019-08-28 10:01:52.723+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-SE : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone SE.simdevicetype
2019-08-28 10:01:52.724+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-4s : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 4s.simdevicetype
2019-08-28 10:01:52.725+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Air-2 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Air 2.simdevicetype
2019-08-28 10:01:52.726+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-X : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone X.simdevicetype
2019-08-28 10:01:52.727+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-5 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 5.simdevicetype
2019-08-28 10:01:52.728+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-6s : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 6s.simdevicetype
2019-08-28 10:01:52.730+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Pro--11-inch- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Pro (11-inch).simdevicetype
2019-08-28 10:01:52.731+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Retina : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Retina.simdevicetype
2019-08-28 10:01:52.732+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation- : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPad Pro (12.9-inch) (2nd generation).simdevicetype
2019-08-28 10:01:52.733+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 7 Plus.simdevicetype
2019-08-28 10:01:52.733+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-XS : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone Xs.simdevicetype
2019-08-28 10:01:52.734+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 6s Plus.simdevicetype
2019-08-28 10:01:52.735+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.iPhone-8 : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/iPhone 8.simdevicetype
2019-08-28 10:01:52.736+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.phone2 at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/phone2.simdevicechrome'
2019-08-28 10:01:52.736+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.tablet2 at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/tablet2.simdevicechrome'
2019-08-28 10:01:52.737+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.phone at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/phone.simdevicechrome'
2019-08-28 10:01:52.737+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.tablet at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/tablet.simdevicechrome'
2019-08-28 10:01:52.739+0900 [CoreSimulator] Runtime bundle found com.apple.CoreSimulator.SimRuntime.watchOS-5-3 : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/watchOS.simruntime
2019-08-28 10:01:52.740+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch - 42mm.simdevicetype
2019-08-28 10:01:52.741+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch - 38mm.simdevicetype
2019-08-28 10:01:52.742+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-4-44mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch Series 4 - 44mm.simdevicetype
2019-08-28 10:01:52.744+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-38mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch Series 3 - 38mm.simdevicetype
2019-08-28 10:01:52.744+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-42mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch Series 3 - 42mm.simdevicetype
2019-08-28 10:01:52.745+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch Series 2 - 42mm.simdevicetype
2019-08-28 10:01:52.746+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch Series 2 - 38mm.simdevicetype
2019-08-28 10:01:52.747+0900 [CoreSimulator] Device type bundle found com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-4-40mm : /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/DeviceTypes/Apple Watch Series 4 - 40mm.simdevicetype
2019-08-28 10:01:52.748+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.watch2b at '/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/watch2b.simdevicechrome'
2019-08-28 10:01:52.748+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.watch2 at '/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/watch2.simdevicechrome'
2019-08-28 10:01:52.749+0900 [CoreSimulator] Found device chrome com.apple.CoreSimulator.SimDeviceChrome.watch at '/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/Chrome/watch.simdevicechrome'
2019-08-28 10:01:52.757+0900 [CoreSimulator] New device pair (0ADB8D1A-642D-4363-A471-690A3EF7E84D => (6BBD2E43-E00A-485D-9068-C67B8D84F3A8, DE5AFC62-30D1-492C-94AE-5BDADEF72631)) in set /Users/home/Library/Developer/CoreSimulator/Devices
2019-08-28 10:01:52.757+0900 [CoreSimulator] New device pair (29A36A67-C67A-4EE2-9C81-8272F8CCD880 => (8833E8F3-08D8-4BD0-BA74-834B3DF26755, DF522C34-0B07-499E-8296-6DC6ACA9F7E7)) in set /Users/home/Library/Developer/CoreSimulator/Devices
2019-08-28 10:01:52.759+0900 Completed Pool Preconditons
2019-08-28 10:01:52.776 idb_companion[55002:255689] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (FBiOSTargetStateUpdate)'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff32c53cfd __exceptionPreprocess + 256
        1   libobjc.A.dylib                     0x00007fff5d2faa17 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff32c53b2f +[NSException raise:format:] + 201
        3   Foundation                          0x00007fff34e23f0d _writeJSONValue + 722
        4   Foundation                          0x00007fff34e2465c ___writeJSONObject_block_invoke + 176
        5   CoreFoundation                      0x00007fff32bc9fe4 -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 161
        6   Foundation                          0x00007fff34e240da _writeJSONObject + 454
        7   Foundation                          0x00007fff34e254d5 ___writeJSONArray_block_invoke + 145
        8   CoreFoundation                      0x00007fff32beba0b -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 219
        9   Foundation                          0x00007fff34e2538c _writeJSONArray + 300
        10  Foundation                          0x00007fff34e23be7 -[_NSJSONWriter dataWithRootObject:options:error:] + 124
        11  Foundation                          0x00007fff34e23acc +[NSJSONSerialization dataWithJSONObject:options:error:] + 338
        12  idb_companion                       0x0000000109ea7e12 -[FBiOSTargetStateChangeNotifier writeTargets] + 690
        13  idb_companion                       0x0000000109ea7b36 -[FBiOSTargetStateChangeNotifier reportInitialState] + 1814
        14  idb_companion                       0x0000000109ea72f1 -[FBiOSTargetStateChangeNotifier startNotifier] + 993
        15  idb_companion                       0x0000000109eb0213 GetCompanionCompletedFuture + 1731
        16  idb_companion                       0x0000000109eaf66f main + 751
        17  libdyld.dylib                       0x00007fff5eac83d5 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1]    55002 abort      idb_companion --notify /tmp/idb_local_targets

salphaon avatar Aug 28 '19 01:08 salphaon

Hi @zeyadsalloum, the same issue as @salphaon when exec idb_campanion --notify /tmp/idb_local_targets

phoebusliang avatar Aug 28 '19 06:08 phoebusliang

the same issue as @salphaon when exec idb_campanion --notify /tmp/idb_local_targets ,and it's should be 'idb_companion' not 'idb_campanion'

Junting-Liu avatar Aug 28 '19 06:08 Junting-Liu

i also meet the same issue,i conneted my iphoneX by lighting line then i run command idb-targets ,but no avaliable devices show

mushanzi1216 avatar Aug 28 '19 09:08 mushanzi1216

Hello, I need help with the same issue.

idb-companion 1.0.9 I am not sure, but the previous version (1.0.8) was correct. I can't install 1.0.8 by

brew install [email protected],

I get the error:

brew install [email protected] Error: No available formula with the name "[email protected]" ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... ==> Searching taps on GitHub... Error: No formulae found in taps.

Wait your help, thanks!

stereotype013 avatar Aug 28 '19 20:08 stereotype013

I've met the same issue as @salphaon, either simulator nor real device can not be listed with the command 'idb list-targets'. idb-companion 1.0.9

EricLi-Grab avatar Sep 04 '19 10:09 EricLi-Grab

There's still nothing can be used. Does anyone have idea on that?

phoebusliang avatar Sep 07 '19 14:09 phoebusliang

@phoebusliang With real device, idb list-targets running well. But some command raise OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 60878, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 60878) error that must periodically do idb kill.

salphaon avatar Sep 09 '19 02:09 salphaon

I had the same issue and the log of /tmp/idb_logs/notifier is same as salphaon

gebing avatar Sep 09 '19 17:09 gebing

> *** First throw call stack:
> (
>         0   CoreFoundation                      0x00007fff32c53cfd __exceptionPreprocess + 256
>         1   libobjc.A.dylib                     0x00007fff5d2faa17 objc_exception_throw + 48
>         2   CoreFoundation                      0x00007fff32c53b2f +[NSException raise:format:] + 201
>         3   Foundation                          0x00007fff34e23f0d _writeJSONValue + 722
>         4   Foundation                          0x00007fff34e2465c ___writeJSONObject_block_invoke + 176
>         5   CoreFoundation                      0x00007fff32bc9fe4 -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 161
>         6   Foundation                          0x00007fff34e240da _writeJSONObject + 454
>         7   Foundation                          0x00007fff34e254d5 ___writeJSONArray_block_invoke + 145
>         8   CoreFoundation                      0x00007fff32beba0b -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 219
>         9   Foundation                          0x00007fff34e2538c _writeJSONArray + 300
>         10  Foundation                          0x00007fff34e23be7 -[_NSJSONWriter dataWithRootObject:options:error:] + 124
>         11  Foundation                          0x00007fff34e23acc +[NSJSONSerialization dataWithJSONObject:options:error:] + 338
>         12  idb_companion                       0x0000000109ea7e12 -[FBiOSTargetStateChangeNotifier writeTargets] + 690
>         13  idb_companion                       0x0000000109ea7b36 -[FBiOSTargetStateChangeNotifier reportInitialState] + 1814
>         14  idb_companion                       0x0000000109ea72f1 -[FBiOSTargetStateChangeNotifier startNotifier] + 993
>         15  idb_companion                       0x0000000109eb0213 GetCompanionCompletedFuture + 1731
>         16  idb_companion                       0x0000000109eaf66f main + 751
>         17  libdyld.dylib                       0x00007fff5eac83d5 start + 1
> )
> libc++abi.dylib: terminating with uncaught exception of type NSException
> [1]    55002 abort      idb_companion --notify /tmp/idb_local_targets
>

I have the same issue as @salphaon with macOS Mojave(10.14.6). But another man runs it successfully on his mac with an old OSX(10.12.6). So I guess that it may be caused by not being supported by the latest OSX version. It may crash by JSONSerializationdataWithJSONObject as the stack line 8 to line 11 stated, I guess.

pengy14 avatar Sep 10 '19 08:09 pengy14

Same issue as @salphaon. The reason (I assume) is that after the first time calling idb list-targets an empty file gets written to /tmp/idb_local_targets which is not a valid JSON. If I run rm /tmp/idb_local_targets, I can run idb list-targets again, but only once.

alexpanov avatar Sep 21 '19 00:09 alexpanov

Same issue as @salphaon with macOS Mojave(10.14.6)

wzgy avatar Oct 02 '19 13:10 wzgy

same issue as @salphaon with Mojave latest version and Catalina latest beta version. How I can generate /tmp/idb_local_targets ? Can someone help me?

miroslavaivanova avatar Oct 07 '19 06:10 miroslavaivanova