Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Plugin Data removes achievement progress on Steam #444

Open
Whitechapel-1888 opened this issue Jan 8, 2024 · 12 comments
Open

Download Plugin Data removes achievement progress on Steam #444

Whitechapel-1888 opened this issue Jan 8, 2024 · 12 comments

Comments

@Whitechapel-1888
Copy link

Success Story 3.1.7

I updated my entire game library using "Main Menu > Extensions > Success Story > Download plugin data...". This downloaded the correct achievements for all games fixing this issue, but removed all progress from my steam games:
image

I completed this game some time ago:
image

RetroAchievements & GoG are not affected.

@Lacro59
Copy link
Owner

Lacro59 commented Jan 8, 2024

Can you post your extension.log?

@Whitechapel-1888
Copy link
Author

Can you post your extension.log?

I would but there's no error notification, so no log dump is created. Is the extension.log accessible somewhere else?

@damirarh
Copy link
Contributor

damirarh commented Jan 8, 2024

The same thing is happening to me in the last two versions. There are no errors, here are the relevant entries from the log for the problematic scan:


08-01 18:31:34.870|INFO |SuccessStory#PluginDatabaseObject`4:RefreshNoLoader(Half-Life: Alyx - e413dbda-4685-4eac-9697-bb2afd950834)
08-01 18:31:34.870|INFO |SuccessStory#PluginDatabaseObject`4:Used SuccessStory.Clients.SteamAchievements for Half-Life: Alyx - e413dbda-4685-4eac-9697-bb2afd950834
08-01 18:31:34.870|INFO |SuccessStory#SteamAchievements:GetAchievements() - IsLocal : False, IsManual : False, HasApiKey: False, SteamIsPrivate: False
08-01 18:31:35.306|INFO |SuccessStory#SteamAchievements:SteamApi.GetAchievements()
08-01 18:31:37.284|INFO |SuccessStory#PluginDatabaseObject`4:0/42 achievements find for Half-Life: Alyx - e413dbda-4685-4eac-9697-bb2afd950834

I haven't had time to debug the issue yet. Maybe something fails to parse because of a different locale.

@damirarh
Copy link
Contributor

damirarh commented Jan 8, 2024

Ok, I did some debugging. As far as I can tell, the issue is caused by this if statement:

ObservableCollection<GameAchievement> steamAchievements = SteamApi.GetAchievements(game.GameId, SteamApi.CurrentAccountInfos);
if (steamAchievements?.Count > 0)

At this point steamAchievements contains all the achievements but without any unlock data because I didn't enter a Steam API key. Because of this my accountInfos is null and the whole block below is skipped (not marking any of my achievements as unlocked):

https://github.com/Lacro59/playnite-plugincommon/blob/95b985867adc9ae54b043ad3d13a4be733637474/CommonPluginsStores/Steam/SteamApi.cs#L424-L456

If I change the if statement above to force the code to continue in the else block, then it correctly scrapes the unlocked achievements. I changed it as follows:

var accountInfos = SteamApi.CurrentAccountInfos;
ObservableCollection<GameAchievement> steamAchievements = SteamApi.GetAchievements(game.GameId, accountInfos);
if (steamAchievements?.Count > 0 && accountInfos != null && accountInfos.IsCurrent)

I didn't create a PR because I'm not sure that this change won't break something else.

@OdinIsLord
Copy link

Same, all steam games are at 0% progress.

@PatrykJWisniewski
Copy link

I was having this issue as well. Never had to use an API key before, but adding one fixed this issue for me.

@Whitechapel-1888
Copy link
Author

I was having this issue as well. Never had to use an API key before, but adding one fixed this issue for me.

I have added an API key but the steam achievements still do not show up. I updated the game library, downloaded the SuccessStory plugin data, and refreshed individually and nothing worked.

@OdinIsLord
Copy link

I was having this issue as well. Never had to use an API key before, but adding one fixed this issue for me.

I have added an API key but the steam achievements still do not show up. I updated the game library, downloaded the SuccessStory plugin data, and refreshed individually and nothing worked.

Yeah I kinda gave up on it. Funny how the only games left that don't have achievements working are the games I paid for.

@damirarh
Copy link
Contributor

I was having this issue as well. Never had to use an API key before, but adding one fixed this issue for me.

I have added an API key but the steam achievements still do not show up. I updated the game library, downloaded the SuccessStory plugin data, and refreshed individually and nothing worked.

@Whitechapel-1888 Did you add the API key to SuccessStory settings (they are separate from the Steam integrations settings)? To add the API key for SuccessStory, navigate to Main Menu > Add-ons... and then Extension settings > Generic > SuccessStory. Click the Libraries tab, expand Steam and enter the API Key there.
image

@Whitechapel-1888
Copy link
Author

Whitechapel-1888 commented Feb 11, 2024

@damirarh I wasn't aware that there was an extra field to enter the API key, but this indeed works...

So, is there a specific reason why SuccessStory needs this extra field and cannot authenticate via the API key saved in playnite? Also, the fact that this works surprises me. From the code snippet above, I guessed the issue would apply to everyone eventually, regardless of the method of authentification.

@DarylGraves
Copy link

I've had a similar situation today. I'm not 100% sure how I fixed it as it takes ages to scan each time I make a change but I think unchecking "Always keep my total playtime private even if users can see my game details." may have been the issue for me.

I did also add the API key in as well but I have tried adding and removing that multiple times today and didn't have luck on it's own.

These are my Steam settings in the end:

image

@Whitechapel-1888
Copy link
Author

Whitechapel-1888 commented Mar 17, 2024

Eh, so despite using an API key, my achievement progress from steam games are being removed when the extension updates (so after playing and when manually updating).

Edit: actually, nevermind that. I generated a new API key and forgot to update the success story plugin...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants