GramAddict / bot

Completely free and open-source human-like Instagram bot. Powered by UIAutomator2 and compatible with basically any Android device 5.0+ that can run Instagram - real or emulated.
https://docs.gramaddict.org
MIT License
1.14k stars 180 forks source link

"Press back Button" never ending loop #414

Open n0poti opened 2 months ago

n0poti commented 2 months ago

Tried various Android Version and Instagram versions. Always get the same problem when initiating the bot:

[08/15 12:34:14] DEBUG | Navigating to main account... [08/15 12:34:44] DEBUG | Press back button. [08/15 12:34:45] DEBUG | 0.90s sleep [08/15 12:35:16] DEBUG | Press back button. [08/15 12:35:17] DEBUG | 2.11s sleep [08/15 12:35:48] DEBUG | Press back button. etc...

Screenshot 2024-08-15 123800

Environment:

Relevant Logs: [08/15 12:34:14] DEBUG | Navigating to main account... [08/15 12:34:44] DEBUG | Press back button. [08/15 12:34:45] DEBUG | 0.90s sleep [08/15 12:35:16] DEBUG | Press back button. [08/15 12:35:17] DEBUG | 2.11s sleep [08/15 12:35:48] DEBUG | Press back button. [08/15 12:35:49] DEBUG | 1.98s sleep [08/15 12:36:21] DEBUG | Press back button. [08/15 12:36:22] DEBUG | 2.07s sleep [08/15 12:36:54] DEBUG | Press back button. [08/15 12:36:55] DEBUG | 0.99s sleep [08/15 12:37:25] DEBUG | Press back button. [08/15 12:37:26] DEBUG | 1.90s sleep [08/15 12:37:58] DEBUG | Press back button. [08/15 12:37:59] DEBUG | 2.27s sleep [08/15 12:38:30] DEBUG | Press back button. [08/15 12:38:31] DEBUG | 1.46s sleep

Thanks for your help.

paulyoyo commented 1 month ago

Same here 🫠

KnowhereFern commented 4 weeks ago

Same issue here as well!

However, I am using an actual android device via ADB. I think it might be a problem with the instagram version

image

paulyoyo commented 3 weeks ago

The problem is in the file core/views.py line 1553

def click_on_avatar(self):
    while True:
        if self._new_ui_profile_button():
            break
        if self._old_ui_profile_button():
            break
        self.device.back()

I understand that this should click the avatar but it doesn't and keeps in the while loop forever.

I've commented all the lines within the function, click the avatar myself and know it's working.

I'm using the ig version 300.0.0.29.110

Python 3.9.2

Android Debug Bridge version 1.0.41 Version 28.0.2-debian

Raspberry Pi 4 Model B Rev 1.5 Raspbian GNU/Linux 11 (bullseye)

Any suggestions on how to fix it?