ucarno / ow-league-tokens

Bot that farms Overwatch League tokens by pretending you watch league streams
https://discord.gg/kkq2XY4cJM
193 stars 24 forks source link

Error when running app with more than one headless profile #61

Closed tired9494 closed 1 year ago

tired9494 commented 1 year ago

I'm getting this error using the recently released windows executable. I previously had this error when using python 3.9 instead of 3.11 but I am unsure how to force 3.11 with the exe. I get this error whenever I enable headless mode, both profiles are logged in. With the earlier version, youtube would open automatically but these tabs are open on a blank URL. No errors in the console when I have headless disabled.

headless enabled:

[2023-05-02 15:57:14,952 - INFO] (Version) Checking for new version...
[2023-05-02 15:57:14,979 - INFO] (Version) No new version available!
[2023-05-02 15:57:14,979 - INFO] (Bot) Booting 2 headless Chrome driver(s)...
[2023-05-02 15:57:14,979 - INFO] (Bot) Follow all instructions you see here and DO NOT press or do anything until asked, it may break the bot.
[2023-05-02 15:57:15,251 - INFO] patching driver executable C:\Users\tired\appdata\roaming\undetected_chromedriver\undetected_chromedriver.exe
Traceback (most recent call last):
  File "main.py", line 37, in <module>
  File "menu.py", line 125, in menu
  File "menu.py", line 85, in <lambda>
  File "app.py", line 203, in bootstrap
  File "app.py", line 76, in start_chrome
  File "app.py", line 76, in <listcomp>
  File "app.py", line 37, in get_driver
  File "undetected_chromedriver\__init__.py", line 374, in __init__
TypeError: '<' not supported between instances of 'NoneType' and 'int'
[8828] Failed to execute script 'main' due to unhandled exception!
Bye!

headless disabled: (it's been looking for 4 minutes)

[2023-05-02 16:08:48,654 - INFO] (Version) Checking for new version...
[2023-05-02 16:08:48,685 - INFO] (Version) No new version available!
[2023-05-02 16:08:48,685 - INFO] (Bot) Booting 2 Chrome driver(s)...
[2023-05-02 16:08:48,685 - INFO] (Bot) Follow all instructions you see here and DO NOT press or do anything until asked, it may break the bot.
[2023-05-02 16:08:48,970 - INFO] patching driver executable C:\Users\tired\appdata\roaming\undetected_chromedriver\undetected_chromedriver.exe
[2023-05-02 16:08:50,761 - INFO] (Bot) Checking if you are logged in...
[2023-05-02 16:08:52,169 - ERROR] (Chrome - 'tiredMain') Authentication check passed.
[2023-05-02 16:08:52,230 - INFO] (Bot) Looks like there are more drivers. Adding 2 seconds delay before checking for authentication so Google doesn't complain about suspicious activity.
[2023-05-02 16:08:54,230 - INFO] (Bot) Checking if you are logged in...
[2023-05-02 16:08:55,856 - ERROR] (Chrome - 'horikless') Authentication check passed.
[2023-05-02 16:08:55,939 - INFO] (Bot) Started looking for live stream...

With only 1 profile, the YouTube page is briefly opened before it switches back to a blank URL (default chrome page). This happens even when I set the "on start-up" behaviour to open previous tabs, or to open YouTube

[2023-05-02 16:16:43,301 - INFO] (Version) Checking for new version...
[2023-05-02 16:16:43,497 - INFO] (Version) No new version available!
[2023-05-02 16:16:43,498 - INFO] (Bot) Booting 1 Chrome driver(s)...
[2023-05-02 16:16:43,498 - INFO] (Bot) Follow all instructions you see here and DO NOT press or do anything until asked, it may break the bot.
[2023-05-02 16:16:43,781 - INFO] patching driver executable C:\Users\tired\appdata\roaming\undetected_chromedriver\undetected_chromedriver.exe
[2023-05-02 16:16:44,927 - INFO] (Bot) Checking if you are logged in...
[2023-05-02 16:16:47,355 - ERROR] (Chrome - 'tiredMain') Authentication check passed.
[2023-05-02 16:16:47,409 - INFO] (Bot) Started looking for live stream...
tired9494 commented 1 year ago

nevermind, I tried importing profiles from a couple days ago and one of them wasn't logged in

tired9494 commented 1 year ago

actually this is due to headless mode. I'm logged in on both profiles but I get the above crash whenever I have headless mode enabled

ucarno commented 1 year ago

Related: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1200 Try to update your Chrome version

tired9494 commented 1 year ago

I am running Version 112.0.5615.138, the most recent version. I'm not getting the error anymore but that may be because a stream is live right now (it is finding and opening it correctly)

ucarno commented 1 year ago

stream is live right now

Is it?

tired9494 commented 1 year ago

yeah, contenders is live rn and I've enabled contenders in the options. Anyway, I've figured out that this only happens with multiple profiles and headless enabled. 1 profile headless is fine, multiple profiles with headless disabled is fine. I'm getting this error only when I have 2 profiles and headless enabled

ucarno commented 1 year ago

contenders is live rn and I've enabled contenders in the options

You know you can't earn contenders skins through YT, right?

tired9494 commented 1 year ago

Oh I didn't realise they moved the drops to twitch this year, thanks

Homaxz commented 1 year ago

I have the same error. I'm running Chrome 113.0.5672.64. Headless works with 1 profile, as soon as I add another profile and start the bot, I get the error and the program crashes.

Running non-headless works fine for multiple profiles.

ucarno commented 1 year ago

Fixed in latest release