idb
idb copied to clipboard
[Error] Getting error when run "idb list-targets"
File "/usr/local/lib/python3.9/site-packages/idb/common/companion.py", line 71, in parse_json_line
return json.loads(decoded_line)
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
TLDR, here's what worked for me:
brew tap --repair
brew update
brew upgrade
I finally figured out what was causing this error for me: brew was invisibly failing to upgrade my version of idb-companion because facebook changed their main branch name from master to main.
I realized when I called brew install idb-companion I was getting version 1.1.3, however, the current version is 1.1.5. I tried several times to reinstall, to brew tap facebook/fb, but nothing worked. Finally, I tried brew update and saw this:
fatal: couldn't find remote ref refs/heads/master
Error: Fetching /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb failed!
Error: Some taps failed to update!
The following taps can not read their remote branches:
facebook/fb
This is happening because the remote branch was renamed or deleted.
Reset taps to point to the correct remote branches by running `brew tap --repair`
So I ran brew tap --repair and saw:
==> facebook/fb: changed default branch name from master to main!
Once I did that I called brew update and saw:
Updated 1 tap (facebook/fb).
==> Updated Formulae
facebook/fb/idb-companion ✔
You have 2 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
And then finally called brew upgrade:
brew upgrade to get 1.1.5
==> Upgrading 2 outdated packages:
harfbuzz 3.0.0 -> 3.1.0
facebook/fb/idb-companion 1.1.3 -> 1.1.5
After that, I was able to call idb list-targets and everything worked (including Flipper, which was what led me here in the first place).
@computerjazz it looks like it works https://github.com/facebook/idb/issues/671#issuecomment-1000497933