alexal1 / Insomniac

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

problem after activation and use of filters (search bar disappeared) #325

Closed jimboker closed 3 years ago

jimboker commented 3 years ago

[04/23 12:34:04] Handle @vivianprat [04/23 12:34:04] There is no special interaction-instructions for @vivianprat. Working with @vivianprat followers. [04/23 12:34:04] Closing keyboard... [04/23 12:34:04] The device keyboard is already closed. [04/23 12:34:10] Traceback (most recent call last): File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\insomniac\device_facade.py", line 473, in click self.viewV2.click(UI_TIMEOUT_LONG, offset=(x_offset, y_offset)) File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomator2_selector.py", line 150, in click self.must_wait(timeout=timeout) File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomator2_selector.py", line 345, in must_wait raise UiObjectNotFoundError({'code': -32002, 'data': str(self.selector), 'method': 'wait'}) uiautomator2.exceptions.UiObjectNotFoundError: -32002 Client error: <> data: Selector [resourceIdMatches='(?i)(com.instagram.android:id/action_bar_search_edit_text)', className='android.widget.EditText'], method: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\insomniac\safely_runner.py", line 14, in wrapper func(*args, **kwargs) File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\insomniac\action_runners\interact__init__.py", line 149, in job handle_blogger(device_wrapper.get(), File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\insomniac\action_runners\interact\action_handle_blogger.py", line 64, in handle_blogger blogger_profile_view = search_view.navigate_to_username(username, on_action) File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\insomniac\views.py", line 352, in navigate_to_username search_edit_text.click() File "C:\Users\mitsos\AppData\Local\Programs\Python\Python39\lib\site-packages\insomniac\device_facade.py", line 475, in click raise DeviceFacade.JsonRpcError(e) insomniac.device_facade.DeviceFacade.JsonRpcError: -32002 Client error: <> data: Selector [resourceIdMatches='(?i)(com.instagram.android:id/action_bar_search_edit_text)', className='android.widget.EditText'], method: None screenshot

SilentKernel commented 3 years ago

I have the same problem, if you scroll a little bit the the bar come back

jimboker commented 3 years ago

I have another problem now! The bot doesn't follow 🚶

davebaird commented 3 years ago

I have the same issue.

##########################################################
#                                                        #
#   _____                                 _              #
#  |_   _|                               (_)             #
#    | |  _ __  ___  ___  _ __ ___  _ __  _  __ _  ___   #
#    | | | '_ \/ __|/ _ \| '_ ` _ \| '_ \| |/ _` |/ __|  #
#   _| |_| | | \__ \ (_) | | | | | | | | | | (_| | (__   #
#  |_____|_| |_|___/\___/|_| |_| |_|_| |_|_|\__,_|\___|  #
#                                                        #
##########################################################

Insomniac v3.7.8

Hi! Since of v3.1.0 all core features in this project are free to use.
You may want to get more fine grained control over the bot via these features:
    - Filtering - skip unwanted accounts by various parameters
    - Scrapping - technique that makes interactions significantly safer and faster
    - Working hours - the script will wait till specified hours before each session
    - Removing mass followers - automate "cleaning" you account
    - Analytics tool - build presentation that shows your growth
Activate by supporting our small team: https://insomniac-bot.com/activate/

Using insomniac session-manager without extra-features
[04/24 22:44:18] Checking your Internet speed to adjust the script speed, please wait for a minute...
[04/24 22:44:18] (use --no-speed-check to skip this check)
[04/24 22:44:39] Download speed 96.18 Mbit/s, upload speed 75.76 Mbit/s
[04/24 22:44:39] Sleep range will be from 1.00 to 3.00 seconds
Looking for ADB devices...
Connected devices via adb: 1. That's ok.
[04/24 22:44:40] Using uiautomator v2
[04/24 22:44:40] Instagram version: 184.0.0.30.117
[04/24 22:44:40] Running Insomniac with the "interact" action.
[04/24 22:44:40] Successful interactions limit per source: 70
[04/24 22:44:40] Interactions limit per source: 140
[04/24 22:44:40] Total likes limit: 1000
[04/24 22:44:40] Total comments limit: 50

-------- START: 2021-04-24 22:44:40.927714 --------
[04/24 22:44:41] Close Instagram app
[04/24 22:44:41] Sleep for 2.30 seconds
[04/24 22:44:43] Open Instagram app
[04/24 22:44:43] Sleep for 2.38 seconds
[04/24 22:44:45] Closing keyboard...
[04/24 22:44:45] The device keyboard is already closed.
[04/24 22:44:47] Sleep for 1.55 seconds
[04/24 22:44:48] Refreshing your profile status...
[04/24 22:44:50] Sleep for 1.69 seconds
[04/24 22:44:52] Closing keyboard...
[04/24 22:44:52] The device keyboard is already closed.
[04/24 22:44:53] Hello, @XXXXXXXX! You have 0 followers and 0 followings so far.
[04/24 22:44:53] Creating tables in insomniac.db...

[04/24 22:44:53] Handle @natgeo
[04/24 22:44:53] There is no special interaction-instructions for @natgeo. Working with @natgeo followers.
[04/24 22:44:53] Closing keyboard...
[04/24 22:44:53] The device keyboard is already closed.
[04/24 22:44:59] Traceback (most recent call last):
  File "/Insomniac/insomniac/device_facade.py", line 473, in click
    self.viewV2.click(UI_TIMEOUT_LONG, offset=(x_offset, y_offset))
  File "/usr/local/lib/python3.8/dist-packages/uiautomator2/_selector.py", line 150, in click
    self.must_wait(timeout=timeout)
  File "/usr/local/lib/python3.8/dist-packages/uiautomator2/_selector.py", line 345, in must_wait
    raise UiObjectNotFoundError({'code': -32002, 'data': str(self.selector), 'method': 'wait'})
uiautomator2.exceptions.UiObjectNotFoundError: -32002 Client error: <> data: Selector [resourceIdMatches='(?i)(com.instagram.android:id/action_bar_search_edit_text)', className='android.widget.EditText'], method: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Insomniac/insomniac/safely_runner.py", line 14, in wrapper
    func(*args, **kwargs)
  File "/Insomniac/insomniac/action_runners/interact/__init__.py", line 149, in job
    handle_blogger(device_wrapper.get(),
  File "/Insomniac/insomniac/action_runners/interact/action_handle_blogger.py", line 64, in handle_blogger
    blogger_profile_view = search_view.navigate_to_username(username, on_action)
  File "/Insomniac/insomniac/views.py", line 352, in navigate_to_username
    search_edit_text.click()
  File "/Insomniac/insomniac/device_facade.py", line 475, in click
    raise DeviceFacade.JsonRpcError(e)
insomniac.device_facade.DeviceFacade.JsonRpcError: -32002 Client error: <> data: Selector [resourceIdMatches='(?i)(com.instagram.android:id/action_bar_search_edit_text)', className='android.widget.EditText'], method: None

[04/24 22:45:00] Crash saved as "crashes/Crash-2021-04-24-22-44-59.zip".
[04/24 22:45:00] Please attach this file if you gonna report the crash at
[04/24 22:45:00] https://github.com/alexal1/Insomniac/issues

[04/24 22:45:00] No idea what it was. Let's try again.

screenshot

davebaird commented 3 years ago

The solution for my case was to slow everything down. I'm using an emulator, and it seems images weren't displaying quickly enough. Insomniac runs an internet speed test when it first starts but that doesn't take into account whether the device itself is introducing a delay. So I hacked the time delays in a few places (sleeper.py, and also line 1006 in views.py I switched quick=True to False, but probably a better place to modify would be where the initial speed test is run). Anyway, this slowed everything down and gave time for pages to render and everything works now so the proof-of-concept worked out.

alexal1 commented 3 years ago

Fixed in v3.7.14