Fabbi / autoshift

automatic SHiFT code redemption script™
GNU General Public License v3.0
64 stars 23 forks source link

Unknown error with html dump #35

Closed Wyrrrd closed 2 years ago

Wyrrrd commented 2 years ago

On latest docker version, I get an unknown error with html dump of the page, this repeats for all keys. The last successful key redemption was on 29.01.2022, creation of a new keys.db did not help...

Debug Log Excerpt ``` 2022-04-09 18:01:25,155 [INFO] Trying to redeem 5 Golden Keys (W3KBT-XFKWH-JBRJH-JJBTB-T99HC) 2022-04-09 18:01:25,396 [DEBUG] shift:187 - GET https://shift.gearboxsoftware.com/home?redirect_to=https%3A%2F%2Fshift.gearboxsoftware.com%2Fcode_redemptions%2Fnew 200 2022-04-09 18:01:25,628 [DEBUG] shift:225 - GET https://shift.gearboxsoftware.com/home?redirect_to=https%3A%2F%2Fshift.gearboxsoftware.com%2Fentitlement_offer_codes 200 2022-04-09 18:01:25,635 [ERROR] SHiFT

© 2022 Gearbox. SHiFT is a registered trademark of Gearbox Enterprises, LLC. The Playstation Network logo is a registered trademark of Sony Computer Entertainment Inc.
The Xbox LIVE logo is a registered trademark of Microsoft Corporation. The Steam logo is a registered trademark of Valve Corporation. All rights reserved. Nintendo Switch is a trademark of Nintendo.

2022-04-09 18:01:25,709 [DEBUG] auto:59 - Status: UNKNOWN 2022-04-09 18:01:25,710 [INFO] A unknown Error occured ```
Fabbi commented 2 years ago

you aren't logged in there. Seems like that was a bug on the platform. Did this ever reoccur?

Wyrrrd commented 2 years ago

It is consistent. autoshift is not claiming a single key (with my setup), at all.

I checked the credentials again, since I do some docker variable shenanigans, but the values translate to the needed envvars correctly, and I can use these values to login manually...

Wyrrrd commented 2 years ago

Okay, I switched to your image (was still on zacharmstrong's), removed the db. Now I don't even get that far...

(Why does it need to migrate a db that it just created? 🤔)

Debug Log Excerpt ``` 2022-06-28 10:55:20,411 [INFO] Migrating database to version 1 Traceback (most recent call last): File "//./autoshift/auto.py", line 244, in main(args) File "//./autoshift/auto.py", line 172, in main all_keys = query_keys(args.games, args.platforms) File "//./autoshift/auto.py", line 75, in query_keys keys = list(query.db.get_keys(None, None)) File "/autoshift/query.py", line 285, in get_keys ex = self.execute(cmd, params) File "/autoshift/query.py", line 197, in execute self.__update_db() File "/autoshift/query.py", line 217, in __update_db if not func(self.__conn, silent=self.__create_db): TypeError: update_1() got an unexpected keyword argument 'silent' ```
Fabbi commented 2 years ago

I just pushed an update that should fix this, can you try it?

The migration step is just the way I handle the database migration. I leave the initial code as is and push updates to the database according to the current version. So a new database always starts at version 1

Wyrrrd commented 2 years ago

Sorry, now I get this...

Debug Log Excerpt ``` Traceback (most recent call last): File "//./autoshift/auto.py", line 247, in main(args) File "//./autoshift/auto.py", line 175, in main all_keys = query_keys(args.games, args.platforms) File "//./autoshift/auto.py", line 110, in query_keys all_keys[g][p]))) KeyError: 'epic' ```
Fabbi commented 2 years ago

argh, dang.. ok thanks.. fixed it.. you really find all the bugs there, I'm sorry 😃

Wyrrrd commented 2 years ago

It finally works! Thanks and sorry for abusing this issue as a support ticket :P

Fabbi commented 2 years ago

Thank you for finding all those bugs 😄