sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.33k stars 840 forks source link

[bug] Object cannot be started normally #462

Closed xmhwws closed 3 years ago

xmhwws commented 3 years ago
windows10
frida version: 14.2.18
Python 3.7.9

error:
objection -g packagename explore
Traceback (most recent call last):
  File "D:\python\Scripts\objection-script.py", line 10, in <module>
    from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\python\Scripts\objection-script.py", line 13, in <module>
    from importlib_metadata import distribution
ModuleNotFoundError: No module named 'importlib_metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 777, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (idna 3.1 (d:\python\lib\site-packages), Requirement.parse('idna<3,>=2.5'), {'requests'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\python\Scripts\objection-script.py", line 15, in <module>
    from pkg_resources import load_entry_point
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 3242, in <module>
    @_call_aside
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 570, in _build_master
    return cls._build_from_requirements(__requires__)
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 583, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'idna<3,>=2.5' distribution was not found and is required by requests

pip list:
![QQ截图20210519154016](https://user-images.githubusercontent.com/42903751/118774537-78a9a400-b875-11eb-92ec-5d57189c6834.png)
leonjza commented 3 years ago

Windows support is limited, so there is a chance we won't solve this. Regardless, what is D:\python\Scripts\objection-script.py? An entrypoint?

At first glance this looks like a Python distribution related issue on your computer. I would focus on the issue getting importlib.metadata imported.

xmhwws commented 3 years ago

I installed a lower version of idna and solved the problem. Maybe objection should support the latest version of idna? image

D:\python\Scripts\objection-script.py image