objection icon indicating copy to clipboard operation
objection copied to clipboard

[bug] AttributeError: 'DeviceState' object has no attribute 'device_type'

Open sheilapae opened this issue 2 years ago • 1 comments

I am having bellow error when running this command objection -g <IPA Identifier / Name> explore But it worked when I tried it with DIVIA-v2. Does it have something to do with the app? what could be the cause of this?

Using USB device iOS Device Agent injected and responds ok! Traceback (most recent call last): File "/usr/local/bin/objection", line 8, in sys.exit(cli()) File "/usr/lib/python3/dist-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/objection/console/cli.py", line 182, in explore warn_about_older_operating_systems() File "/usr/local/lib/python3.10/dist-packages/objection/utils/helpers.py", line 177, in warn_about_older_operating if device_state.device_type == Android and ( AttributeError: 'DeviceState' object has no attribute 'device_type' Asking jobs to stop... Unloading objection agent...

Environment:

Device: iPhone XS OS: iOS 14.4 Frida Version: 16.1.11 frida-server of same version Objection Version: 1.11.0

sheilapae avatar Jan 31 '24 16:01 sheilapae

This might be a race condition or due to the app, though not sure would have to look at the old code. They way this works has since been changed quite a bit. Might be worth trying another app or trying to launch it a few times to see how it behaves.

IPMegladon avatar Oct 03 '24 05:10 IPMegladon

JB tool 「Shadow」 if Shadow enable 「Dynamic Libraries hook」on APP

it will cause 「AttributeError: 'DeviceState' object has no attribute 'device_type'」

imbauni avatar Nov 03 '25 07:11 imbauni