Strip3s / PhoenixBot

Phoenix Bot - A Bird Bot Resurrection
MIT License
263 stars 113 forks source link

[BUG] Bestbuy task fails to progress after login #63

Closed arcreigh closed 3 years ago

arcreigh commented 3 years ago

Expected Behavior

Task waits until login is complete to progress (I assume this is what it is doing as I did see a wait.py call)

Actual Behaviour

Traceback on start of task.

Traceback error

Traceback (most recent call last):
  File "A:\AntiScalper\PhoenixBot\pages\homepage.py", line 510, in run
    BestBuy(self.status_signal, self.image_signal, self.product, profile, proxy, self.monitor_delay, self.error_delay) #TODO: Readd Discord Webhook
  File "A:\AntiScalper\PhoenixBot\sites\bestbuy.py", line 97, in __init__
    self.login()
  File "A:\AntiScalper\PhoenixBot\sites\bestbuy.py", line 150, in login
    WebDriverWait(self.browser, 10).until(
  File "C:\Users\Andrew\AppData\Roaming\Python\Python38\site-packages\selenium\webdriver\support\wait.py", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:

Repro Steps

Please include the steps of how we can reproduce this issue on our end.

I.E.

Task is created for https://www.bestbuy.com/site/amd-ryzen-9-5900x-4th-gen-12-core-24-threads-unlocked-desktop-processor-without-cooler/6438942.p?cmp=RMX&skuId=6438942

Start task

Get traceback.

Desktop Configuration

arcreigh commented 3 years ago

Full startup log for task 1

[2020-11-30 10:10:19][TASK 1] Starting Best Buy Task in dev mode - Phoenix Bot will not actually checkout. Check Settings page to disable Dev Mode
[2020-11-30 10:10:21][TASK 1] PDP Request: 200
[2020-11-30 10:10:21][TASK 1] Product URL: https://www.bestbuy.com/site/amd-ryzen-9-5900x-4th-gen-12-core-24-threads-unlocked-desktop-processor-without-cooler/6438942.p?cmp=RMX&skuId=6438942
[2020-11-30 10:10:21][TASK 1] Product URL Request: 200
[2020-11-30 10:10:21][TASK 1] Loading headless driver.
[2020-11-30 10:10:21][TASK 1] Loading https://www.bestbuy.com/
Traceback (most recent call last):
  File "A:\AntiScalper\PhoenixBot\pages\homepage.py", line 510, in run
    BestBuy(self.status_signal, self.image_signal, self.product, profile, proxy, self.monitor_delay, self.error_delay) #TODO: Readd Discord Webhook
  File "A:\AntiScalper\PhoenixBot\sites\bestbuy.py", line 97, in __init__
    self.login()
  File "A:\AntiScalper\PhoenixBot\sites\bestbuy.py", line 150, in login
    WebDriverWait(self.browser, 10).until(
  File "C:\Users\Andrew\AppData\Roaming\Python\Python38\site-packages\selenium\webdriver\support\wait.py", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
arcreigh commented 3 years ago

Resolved

New update has a settings page for login credentials the above error is the message received when credentials are not entered in the settings page.

Security considerations

Password is not masked and is visible if you click on the settings page.

Recommendations

For the above error a friendly popup in app stating that no credentials have been entered for this task. Symantec versioning of the various modules. ie Best Buy / Walmart / etc. as well as the application itself. Github releases detailing the patch notes (i'd be happy to help set this up.)