SparrowBrain / Playnite.GGDeals

Playnite extension to sync library with GG.deals website.
MIT License
9 stars 0 forks source link

Errors occured while importing #13

Closed AmanoTC closed 1 week ago

AmanoTC commented 3 weeks ago

Hi there. I have a huge library (GOG Galaxy can't handle my amount of games) and tried importing my games to GG.Deals. Some stores worked, some didn't (Humble and Indiegala failed, for example). I'd like to give you more details, but it seems that there is no error message within Playnite that I can export and paste here. How to proceed? How to get you the data you need?

Blantas commented 3 weeks ago

Same problem here. A library of 40k games. I would be happy to help debugging this if possible.

AmanoTC commented 3 weeks ago

There seems to be a rate limit while importing. First try, with every shop checked in Settings except Steam, GoG and Xcloud, it should have imported over 5000 games. It didn't and imported <1000 games.

Now I am only checking one shop after the other and it imports games it didn't import the first time around.

Shops I have a lot of games from (>1000) still produce the same error message: "Error occured while adding games to GG.deals library." There is no other error message.

SparrowBrain commented 3 weeks ago

More info should be in the logs. Would be best if you could go into %AppData%/Playnite/ and attach extensions.log file here.

Another question - did you wait for the metadata fetch to finish? As in, do all/most your games have descriptions, cover art, etc?

Blantas commented 3 weeks ago

Here's my log:

extensions.log

22-08 18:54:05.506|ERROR|GGDeals#GGDealsService:Error while trying to add games to library. System.NullReferenceException: Object reference not set to an instance of an object. at GGDeals.Services.AddGamesService.d6.MoveNext() in C:\Users\Qwx\src\Playnite.GGDeals\GGDeals\Services\AddGamesService.cs:line 63 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GGDeals.Services.GGDealsService.d8.MoveNext() in C:\Users\Qwx\src\Playnite.GGDeals\GGDeals\Services\GGDealsService.cs:line 59 22-08 18:54:05.664|INFO |GGDeals#GGDealsService:Finished adding games to GG.deals collection: Total: 38674, NotFound: 0, AlreadyOwned: 0, SkippedDueToLibrary: 0, Ignored: 0, Added: 0 22-08 18:57:57.307|ERROR|GGDeals#GGDealsService:Error while trying to add games to library. System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GGDeals.Api.Services.GGDealsApiClient.d5.MoveNext() in C:\Users\Qwx\src\Playnite.GGDeals\GGDeals\Api\Services\GGDealsApiClient.cs:line 40 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GGDeals.Services.AddGamesService.d6.MoveNext() in C:\Users\Qwx\src\Playnite.GGDeals\GGDeals\Services\AddGamesService.cs:line 63 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GGDeals.Services.GGDealsService.d__8.MoveNext() in C:\Users\Qwx\src\Playnite.GGDeals\GGDeals\Services\GGDealsService.cs:line 59 22-08 18:57:57.477|INFO |GGDeals#GGDealsService:Finished adding games to GG.deals collection: Total: 38408, NotFound: 0, AlreadyOwned: 0, SkippedDueToLibrary: 0, Ignored: 0, Added: 0

Metadata fetch haven't finished yet, I checked the logs and it I noticed there's a bunch of errors when doing that too, I guess steam rate limit was reached or something.

SparrowBrain commented 1 week ago

@Blantas thanks for the log!

Metadata is necessary to match games with GG.deals. Best to wait for metadata fetch to finish, or if some metadata is missing to manually fetch it before syncing with GG.deals.

The issue in the logs was caused by multiple parallel calls to the GG.deals API. I've implemented a fix for it and added better handling for errors coming from the API.

Should be solved in v2.1.0.