steve1316 / granblue-automation-pyautogui

Educational application aimed at automating user-defined workflows for the mobile game, "Granblue Fantasy", using a variety of CV technologies in the backend such as OpenCV, PyAutoGUI and EasyOCR and a frontend coded in Typescript.
https://github.com/steve1316/granblue-automation-pyautogui/wiki
119 stars 36 forks source link

CAPTCHA Undetected #79

Closed PortablePanda closed 2 years ago

PortablePanda commented 2 years ago

The last CATPCHA I had didn't trigger the warning at all.


2:04:03 ######################################################################
2:04:03 [COMBAT] Starting Combat Mode.
2:04:03 ######################################################################
2:04:03 ######################################################################

2:04:03 [COMBAT] Now loading up combat script at D:/Desktop/granblue-automation-pyautogui-main/scripts/GW Fire EX.txt
2:04:13 [WARNING] Failed to find the ATTACK button.

2:04:13 [ERROR] Cannot find Attack button. Raid must have just ended.

2:04:13 [INFO] Resting period complete.
2:04:14 [WARNING] Failed to find the PLAY_AGAIN button.

2:04:14 [INFO] Starting process of checking for Pending Battles...
2:04:16 [WARNING] Failed to find the QUEST_RESULTS_PENDING_BATTLES button.
2:04:16 [INFO] No Pending Battles needed to be cleared.

2:04:18 [INFO] Moving back to the Home screen...
2:04:19 [WARNING] Failed to find the HOME button.

2:04:19 [ERROR] Bot encountered exception in Farming Mode: 
Traceback (most recent call last):
  File "D:\Desktop\granblue-automation-pyautogui-main\bot\game.py", line 935, in start_farming_mode
    self.item_amount_farmed += self._guild_wars.start(first_run)
  File "D:\Desktop\granblue-automation-pyautogui-main\bot\game_modes\guild_wars.py", line 171, in start
    self._navigate()
  File "D:\Desktop\granblue-automation-pyautogui-main\bot\game_modes\guild_wars.py", line 31, in _navigate
    self._game.go_back_home(confirm_location_check = True)
  File "D:\Desktop\granblue-automation-pyautogui-main\bot\game.py", line 262, in go_back_home
    raise RuntimeError("Home button located on the bottom bar is not visible. Is the browser window properly visible?")
RuntimeError: Home button located on the bottom bar is not visible. Is the browser window properly visible?

2:04:19 ######################################################################
2:04:19 ######################################################################
2:04:19 [FARM] Ending Farming Mode.
2:04:19 ######################################################################
2:04:19 ######################################################################```
PortablePanda commented 2 years ago

I think they subtly changed the CAPTCHA header; I snipped a new clip of it, but for safety, could we have a setting for the bot to play its alert when it terminates for any reason?

captcha_header

steve1316 commented 2 years ago

Thanks for letting me know. Updated the CAPTCHA image asset with yours and bot will now alert for every Exception from here on out.

PortablePanda commented 2 years ago

Another CAPTCHA error, the sound file doesn't always seem to play on pop-up. I haven't found a definite pattern for it yet, though.

EDIT: Thinking that it only plays one warning on CAPTCHA ever? And if you want it to play the warning again, you need to restart the bot.

PortablePanda commented 2 years ago

Update for the lack of sound alarm, I tried running the batch file I use to open the bot in administrator mode, and when an alert popped up, first I got a warning for low memory, and then a "python has encountered an error" window, though the bot didn't close.

lamp333 commented 2 years ago

Just curious but when do we typically see captchas popping up, during summon selection, loading screen etc?

PortablePanda commented 2 years ago

From what I can tell, it's before any action which would have you select your party, i.e. after selecting a summon or starting an Arcarum fight. Also if you've been doing Casino for too long.

steve1316 commented 2 years ago

Closing this issue due to inactivity. You can open another issue whenever the bot fails to detect CAPTCHA again.