FailSpy / humble-steam-key-redeemer

Python script to extract all Humble Bundle keys and redeem them on Steam automagically.
132 stars 27 forks source link

Stopped working recently #45

Closed jaromiru closed 8 months ago

jaromiru commented 9 months ago

Maybe an issue with chromedriver, maybe humble updated their interface.

Error log:

Traceback (most recent call last):
  File "/home/jaromiru/Documents/wrk/humble-steam-key-redeemer/humblesteamkeysredeemer.py", line 907, in <module>
    humble_login(driver)
  File "/home/jaromiru/Documents/wrk/humble-steam-key-redeemer/humblesteamkeysredeemer.py", line 276, in humble_login
    auth,login_json = do_login(driver,payload)
  File "/home/jaromiru/Documents/wrk/humble-steam-key-redeemer/humblesteamkeysredeemer.py", line 246, in do_login
    auth,login_json = perform_post(driver,HUMBLE_LOGIN_API,payload)
  File "/home/jaromiru/Documents/wrk/humble-steam-key-redeemer/humblesteamkeysredeemer.py", line 131, in perform_post
    return driver.execute_async_script(fetch_cmd.format(formData=json_payload,url=url,csrf=csrf))
  File "/home/jaromiru/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 427, in execute_async_script
    return self.execute(command, {"script": script, "args": converted_args})["value"]
  File "/home/jaromiru/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 348, in execute
    self.error_handler.check_response(response)
  File "/home/jaromiru/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: script timeout
  (Session info: chrome=120.0.6099.129)
Stacktrace:
#0 0x55e0a5fa9f83 <unknown>
#1 0x55e0a5c62b2b <unknown>
#2 0x55e0a5cfc508 <unknown>
#3 0x55e0a5cdc0b2 <unknown>
#4 0x55e0a5cfb006 <unknown>
#5 0x55e0a5cdbe53 <unknown>
#6 0x55e0a5ca3dd4 <unknown>
#7 0x55e0a5ca51de <unknown>
#8 0x55e0a5f6e531 <unknown>
#9 0x55e0a5f72455 <unknown>
#10 0x55e0a5f5af55 <unknown>
#11 0x55e0a5f730ef <unknown>
#12 0x55e0a5f3e99f <unknown>
#13 0x55e0a5f97008 <unknown>
#14 0x55e0a5f971d7 <unknown>
#15 0x55e0a5fa9124 <unknown>
#16 0x7f8b51894ac3 <unknown>
jrdiver commented 8 months ago

Tracked this error when trying to set this up on my side - seems to be related to chrome. Swapping the script to prefer firefox, by put that block first on line 142 (and having that installed) seems to have bypassed this particular issue,

FailSpy commented 8 months ago

I've implemented a temporary hotfix that prefers Firefox over Chrome. Seems like Chrome version >= 115 has a new 'Chrome for Testing' mode that's a bit... erm, obvious. Firefox is still working fine, for now.

Ultimately, these days Selenium should automatically download the FirefoxDriver thanks to the built-in Selenium manager. I'm going to mark this issue as closed for now.