Kyrluckechuck / TFT-Bot

Automate Teamfight Tactics (TFT) for token/mission farming. Updated for Set 8.5!
GNU Affero General Public License v3.0
50 stars 7 forks source link

League Client Unable To Start Via Bot #102

Closed Kyrluckechuck closed 1 year ago

Kyrluckechuck commented 1 year ago

Description

Looks like after https://github.com/Kyrluckechuck/TFT-Bot/pull/94 was merged, there unfortunately was a regression in being able to auto-start League. It will only start League correctly after the Riot Client is open (launching League closes itself after it opens the Riot client).

Looks like it might be time to add some logic to checking if the Riot client is running...

akshualy commented 1 year ago

Hm, I tested all 3 scenarios

  1. League Client already open
  2. Riot Client open but League Client closed
  3. RIot Client closed

and it worked, what's your log file?

Kyrluckechuck commented 1 year ago

Interesting, what I'm seeing is: 1- Success 2- Success 3- No dice

Attached the log file, but it doesn't really indicate anything since it's launching the game 🤔 tft-bot-debug-2023-03-31_16-33-02_377921.log

akshualy commented 1 year ago

Hmm, for me, it immediately finds the LCUx process at restart_league_client(). Can you check your task manager and see if the process exists/is being created?

Attached a file of "but it works on my end!", the world's most helpful IT response! tft-bot-debug-2023-03-31_23-27-09_445834.log

Kyrluckechuck commented 1 year ago

Odd! It was working for me prior to merging this 🤔

About 9 months ago when the Riot client became mandatory, I would occasionally have issues with the Riot client forcing itself open while League was open, but from what my Googling has me believing now, that's actually what most people experience and it's not a bug 😕

Kyrluckechuck commented 1 year ago

Okay, debugging deeper, it looks like if League is not open but the RiotClientServices.exe is running, when you go to open League it will instead open the UI for that. After killing it, the bot was then able to start correctly and it seems to work as expected.

I will test around with adding another clause to kill that executable as well when it goes to restart League, since that probably makes sense anyways.