Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile error on big sur #672

Closed
wants to merge 2 commits into from
Closed

Conversation

djs66256
Copy link
Contributor

Motivation

Fix compile error mentioned at #671.

/idb/idb_companion/Server/FBIDBServiceHandler.mm💯14: error: no matching member function for call to 'set_data'
payload->set_data(buffer, size);
~~~~~~~~~^~~~~~~~

/idb/idb_companion/Server/FBIDBServiceHandler.mm:100:14: error: no matching member function for call to 'set_data'
    payload->set_data(buffer, size);
    ~~~~~~~~~^~~~~~~~
@khanhduy62
Copy link

khanhduy62 commented May 30, 2021

@djs66256 Could you tell me how can I implement your Pull Request ASAP?
I'm using

brew tap facebook/fb
brew install idb-companion

but it doesn't seems to work
or how can I edit file FBIDBServiceHandler.mm in my mac??
please help me

@djs66256
Copy link
Contributor Author

@khanhduy62 Clone and checkout my repo. Then build yourself.

./idb_build.sh idb_companion build /usr/local/bin/idb_companion_bin
ln -s  /usr/local/bin/idb_companion_bin/bin/idb_companion /usr/local/bin/idb_companion

@khanhduy62
Copy link

@djs66256 thank you, let me check it

@facebook-github-bot
Copy link

@c-ryan747 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@c-ryan747 merged this pull request in 24e4584.

@khanhduy62
Copy link

khanhduy62 commented Jun 1, 2021

@djs66256 I've got the following error after re-installing. Could you help me again? Please :'(

➜  ~ idb list-targets
2021-06-01 21:39:11,146 [ERROR] - root - Exception thrown in main
Traceback (most recent call last):
  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/python@3.9/3.9.5/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/python@3.9/3.9.5/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/python@3.9/3.9.5/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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/idb/common/companion_spawner.py", line 153, in spawn_notifier
    await self._read_notifier_output(stream=none_throws(process.stdout))
  File "/usr/local/lib/python3.9/site-packages/idb/common/companion_spawner.py", line 166, in _read_notifier_output
    update = parse_json_line(line)
  File "/usr/local/lib/python3.9/site-packages/idb/common/companion.py", line 73, in parse_json_line
    raise IdbJsonException(f"Failed to parse json from: {decoded_line}")
idb.common.companion.IdbJsonException: Failed to parse json from: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/idb/cli/main.py", line 287, in gen_main
    await root_command.run(args)
  File "/usr/local/lib/python3.9/site-packages/idb/common/command.py", line 90, in run
    return await self.resolve_command_from_args(args).run(args)
  File "/usr/local/lib/python3.9/site-packages/idb/cli/__init__.py", line 106, in run
    await self._run_impl(args)
  File "/usr/local/lib/python3.9/site-packages/idb/cli/__init__.py", line 149, in _run_impl
    await self.run_with_manager(
  File "/usr/local/lib/python3.9/site-packages/idb/cli/commands/target.py", line 171, in run_with_manager
    targets = await manager.list_targets()
  File "/usr/local/lib/python3.9/site-packages/idb/common/logging.py", line 113, in _async_wrapper
    raise ex
  File "/usr/local/lib/python3.9/site-packages/idb/common/logging.py", line 88, in _async_wrapper
    value = await function(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/idb/grpc/management.py", line 135, in list_targets
    await self._spawn_notifier()
  File "/usr/local/lib/python3.9/site-packages/idb/grpc/management.py", line 57, in _spawn_notifier
    await companion_spawner.spawn_notifier()
  File "/usr/local/lib/python3.9/site-packages/idb/common/companion_spawner.py", line 156, in spawn_notifier
    raise CompanionSpawnerException(
idb.common.companion_spawner.CompanionSpawnerException: Failed to spawn the idb notifier. Stderr: dyld: Library not loaded: /usr/local/opt/grpc/lib/libgrpc.15.dylib

  Referenced from: /usr/local/bin/idb_companion

  Reason: image not found

dyld: Library not loaded: /usr/local/opt/grpc/lib/libgrpc.15.dylib

  Referenced from: /usr/local/bin/idb_companion

  Reason: image not found

dyld: Library not loaded: /usr/local/opt/grpc/lib/libgrpc.15.dylib

  Referenced from: /usr/local/bin/idb_companion

  Reason: image not found

dyld: Library not loaded: /usr/local/opt/grpc/lib/libgrpc.15.dylib

  Referenced from: /usr/local/bin/idb_companion

  Reason: image not found

➜  ~ 

@c-ryan747
Copy link
Contributor

@djs66256 thanks for the fix, looks like something changed in the way a recent grpc version handles bytes

@djs66256
Copy link
Contributor Author

djs66256 commented Jun 1, 2021

@khanhduy62 Don't uninstall and remove the original files. Just replace idb_companion. It seems lost some dependencies. Try install again?

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

Successfully merging this pull request may close these issues.

4 participants