alexal1 / Insomniac

Instagram bot for automated Instagram interaction using Android device via ADB
https://insomniac-bot.com
MIT License
675 stars 159 forks source link

Insomniac returns to the search screen #427

Open Luke050 opened 2 years ago

Luke050 commented 2 years ago

Instagram version: 195.0.0.31.123 Insomniac 3.8.1 mode: like user followers only

in almost every session but at a random inomniac returns an error:

[03/23 10:32:39] Back to profiles list
[03/23 10:32:42] Next item not found: probably reached end of the screen.
[03/23 10:32:49] Cannot find the list of followers. Trying to press back again.
[03/23 10:32:50] Need to scroll now
[03/23 10:33:02] Error - module 'uiautomator2' has no attribute 'JSONRPCError'
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/insomniac/device_facade.py", line 527, in scroll
    self.viewV2.scroll.toEnd(max_swipes=1)
  File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/session.py", line 1197, in __call__
    max_swipes, steps)
  File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 547, in __call__
    http_timeout)
  File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 553, in jsonrpc_retry_call
    return self.jsonrpc_call(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 645, in jsonrpc_call
    raise err
uiautomator2.exceptions.UiObjectNotFoundError: -32001 Jsonrpc error: <android.support.test.uiautomator.UiObjectNotFoundException> data: UiSelector[CLASS=android.widget.ListView, RESOURCE_ID=android:id/list], method: scrollToEnd

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "insomniac/extra_features/session.py", line 278, in run
  File "/home/pi/.local/lib/python3.7/site-packages/insomniac/action_runners/interact/__init__.py", line 202, in run
    job()
  File "/home/pi/.local/lib/python3.7/site-packages/insomniac/safely_runner.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/insomniac/action_runners/interact/__init__.py", line 164, in job
    self.action_status)
  File "/home/pi/.local/lib/python3.7/site-packages/insomniac/action_runners/interact/action_handle_blogger.py", line 240, in handle_blogger
    followers_following_list_view.iterate_over_followers(is_myself, interact_with_follower, pre_conditions)
  File "/home/pi/.local/lib/python3.7/site-packages/insomniac/views.py", line 1449, in iterate_over_followers
    list_view.scroll(DeviceFacade.Direction.BOTTOM)
  File "/home/pi/.local/lib/python3.7/site-packages/insomniac/device_facade.py", line 528, in scroll
    except uiautomator2.JSONRPCError as e:
AttributeError: module 'uiautomator2' has no attribute 'JSONRPCError'

i think sometimes something is wrong when insomniac tries to get back on the followers list. because whenever I have this crash there is a search box in the screenshot

Luke050 commented 2 years ago

Can anyone help me? At the moment, it is impossible to use insomniac to like the user's followers. I made a little more attempts and it looks like insomniac sometimes presses the back button twice and disables the followers list

robium-max commented 2 years ago

I have the same sometimes. What is the full command what you use for the insomniac?