darklinkpower / PlayniteExtensionsCollection

Collection of extensions made for Playnite.
MIT License
281 stars 28 forks source link

[JastUsaLibrary] Error When Updating Library #540

Closed burnpsy closed 1 month ago

burnpsy commented 1 month ago

Extension name

JastUsaLibrary

Bug Description

Ever since I updated this extension to version 1.18, I get an error message when updating my library.

My account is authenticated properly, and just to make sure that wasn't the problem I authenticated it a second time.

To Reproduce

Install version 1.18 of the extension, then try to update the library.

Logs

extensions.log

Screenshots

Here's the error.

darklinkpower commented 1 month ago

There's unfortunately nothing in the logs indicating this issue, is this still ocurring? If it does, please upload both Playnite.log and extensions.log after the error happens.

burnpsy commented 1 month ago

playnite.log extensions.log

Was simple enough to make the error happen again (I just hit manual update on the JAST library), so I've attached the files you asked for. The playnite.log seems to point to where the error is occurring.

darklinkpower commented 1 month ago

Delete both files to clean them. Then install this build and after reproducing the library update fails, upload both logs here again:

JastUsaLibrary_d407a620-5953-4ca4-a25c-8194c8559381_1_19.zip

burnpsy commented 1 month ago

playnite.log extensions.log

New logs attached.

darklinkpower commented 1 month ago

Thanks. As a final request, can you go here:

image

And upload this file? I don't remember if GitHub allows upload of json so you may need to change the extension or upload in a zip.

image

burnpsy commented 1 month ago

Looks like I was allowed to upload it as-is: userGamesCache.json

darklinkpower commented 1 month ago

Thanks. The cause is that previously the plugin imported a game with id 114 but for some reason an entry with this id does not exist in the list of games JAST returns for your account. The only idea I have is maybe having refunded a game after having imported it to Playnite or unlikely, that you previously connected a different account, is that something that happened?

In any case, please try this build and send me the logs again after trying to update the library, it should indicate if this happened and it should work fine this time:

JastUsaLibrary_d407a620-5953-4ca4-a25c-8194c8559381_1_19.zip

If it works, please go to the plugin download manager here and check if you can add a few downloads without any issues just to be safe:

image

burnpsy commented 1 month ago

I didn't refund any games or add a second account, so I have to guess something got renumbered on JAST's end?

Either way, the version you just send ran without any apparent error, and I was able to add downloads from the menu you indicated, so problem solved.

darklinkpower commented 1 month ago

Can you upload the logs again please as I mentioned to see what happened?

darklinkpower commented 1 month ago

huh that's weird, there's no mention of the missing game if there was one. Did you delete the logs file after checking if it worked fine in this response?

image

If that's not the case, well, the second safeguard change I added will prevent any error.

burnpsy commented 1 month ago

I cleared the logs right after installing the newest version you sent me, then sent you everything that was generated since.

More or less went Install -> clear logs -> update library -> attempt downloads.

I did find it strange that nothing came up in the log this time at all.

darklinkpower commented 1 month ago

I see, can you send me this file?

image

Or if you prefer, you can open it in your browser and just check if there's an entry with id 114 with Ctrl+F and tell me:

image

burnpsy commented 1 month ago

config.json

Here you go.

darklinkpower commented 1 month ago

Thanks. It looks like the fix is working as intended and the problematic entry was correctly removed during library update since an entry with id 114 is not there, although I'm not sure why it wasn't logged.

Sorry for taking so long to work to fix this, it can be hard to maintain all addons I work on by myself. The release with the fix is already available.

Additionally, I recommend to delete your extensions.log file again since it contains a game download link that is only logged when using a debug build and that shouldn't be shared (and why I deleted your comment earlier), although those links are only valid for 48 hours if I recall correctly.