JosefNemec / PlayniteExtensions

Extensions for Playnite game launcher and manager.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Steam] Private Account Keeps Displaying "Authentication Required" After Authentication + API Key Input

KesKim opened this issue · comments

Check for existing issue
No completed or open issue with keyword "Steam" or "Authentication" seems to match this problem.

Describe the bug
"Authentication Required" message keeps displaying after authenticating, seemingly successfully. Authentication button opens the small web view that briefly shows Steam auth page and then goes straight to my Steam profile (very distinctly recognizeable as my own profile page due to all colourful customizations and profile pic) which can be seen just for a blink of an eye before the web view window automatically closes. Integration setup window for Steam still displays "Authentication Required".

I have tried: explicitly adding all Playnite executables as allowed in Windows Firewall (public+private networks just in case), clearing Playnite web cache via Advanced settings and setting up all authentications again), but still the issue persists and I am unable to access my Steam library via Playnite (except locally installed games).

To Reproduce
My initial state was that my Steam account has long been private and I had no Web API key. I installed Playnite via winget (open Terminal, type "winget install Playnite"), opened Playnite and setup integrations (Epic, GOG, itch.io and Steam). After initial metadata download I noticed I was missing all of my not-installed Steam games and there was a notification of Steam import failing. I opened integration setup, created and input my Web API key and this issue/situation started occurring.

NOTICE: If I go to my Steam profile page on Steam client with URL displayed, it does not display an account NUMBER, but a text-ID instead. I remember at some point it was possible to reserve a text-based short ID and must have at some point in time used that to more easily share limited parts of my Steam profile before turning it entirely private.

Screenshots
Still image of the issue of authentication not going through or persisting:
Playnite DesktopApp_AfterAuthentication

Short GIF detailing how the web view auto-closes after displaying my profile when attempting to authenticate (privacy details blurred and API key already changed since recording, my text-based account ID would be shown in the web view URL bar):
Playnite DesktopApp_AuthBlink_DetailsBlurred

Diagnostics ID
Please generate diagnostics package from "About Playnite" menu and attach identifier you received. If the issue is a crash bug, you can generate diag. package directly from crash dialog.
dd37086e-da4c-4e78-9ef1-c4d052d25ccf

Really weird, I can't replicate it myself. I will need to prepare debug build of Steam plugin to gather more information about what's going on with your account.

Having a Custom URL setup in Steam profile wouldn't affect this, now would it?
steam_LM2QT1JVH0

Seems I can't test clearing the Custom Url to return the profile URL into one with the profile ID number in it, because even if I save the now-empty Custom URL field, Steam Client will keep opening my profile via the Custom URL. I tried rebooting Steam but it still uses the previously-set Custom URL.

We don't use profile URLs for anything.

I'll upload debug version of Steam plugin on Monday to figure out what's happening with your account specifically.

What do I need to do to install the debug version of the Steam plugin and get you the data?

Install this (by just running the file), then try to authenticate, then generate new diagnostics package.

Did that, new diagnostics ID taken with debug plugin installed and after reattempting Steam authentication:
3f5a9524-2a86-40de-8e5e-522827bbf024

Should I also do another diagnostic report by clearing the web cache and then re-attempting authentication?

Thanks for new diag package. The issue happens because Steam API doesn't return any games for your library. Looks like an issue on Steam's side to me, we just receive empty response with no games:

{"response":{}}

You can test it yourself via this url:
https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key={APIKey}&include_appinfo=1&include_played_free_games=1&format=json&steamid={SteamID}&skip_unvetted_apps=0

Replace {SteamID} and {APIKey} with correct values for your account.

Confirmed - the empty response is what I'm getting. Could this be an issue of a fairly large library (500+ games) and as such just a limitation on Steam's side to stop people from doing anything data-heavy on external services? Do you have any pointers as to where I should go with this issue - Steam account support?

https://developer.valvesoftware.com/wiki/Steam_Web_API#Interfaces_and_method
points out that all supported Web API calls are listed in
http://api.steampowered.com/ISteamWebAPIUtil/GetSupportedAPIList/v0001/
and I cannot find GetOwnedGames in that list.

Obviously, this is an API you have been utilizing a lot and can still confirm it works on most users including your own tests, so my quick research is simply out of depth and my hunch is probably wrong about this. From the looks of this IPlayerService only lists a single method available in the Web API (RecordOfflinePlaytime).

But it is listed here in wiki, conforming perfectly to the test URL you handed me. https://developer.valvesoftware.com/wiki/Steam_Web_API#GetOwnedGames_.28v0001.29

Also, quick test revealed that trying to switch the API call name to anything non-existent returns a "Not Found" response, instead of an empty JSON array.

It's definitely not an issue with number of games on your account, people have been importing libraries with thousands of games with no problem.

I would recommend contacting Valve's support, I don't think there's anything we can do about it on our side if their API simply doesn't return data it should.

Yeah, tinkering with the Web API calls from browser trying to figure this out; I can call "simpler" methods like https://developer.valvesoftware.com/wiki/Steam_Web_API#GetRecentlyPlayedGames_.28v0001.29 and I still keep getting empty response JSON objects.

I'll go poke Valve's support from here on. Thank you very much for prompt and solid support on this side. 👍

One more note, apparently:

Unfortunately, Steam Support is unable to provide assistance with API, Source SDK, Mapping, and Dedicated Servers questions. The links below are the best resources for help with your specific problems.

So, I'm not expecting any resolution to this ever, I guess.

Seemingly related discussion here
https://steamcommunity.com/discussions/forum/1/1696044439573019687/

Pointing towards
https://steamcommunity.com/games/593110/announcements/detail/1667896941884942467

And finally this is starting to look like a user error on my side:

I thought the authentication should work if

  1. my Game Details privacy setting is private AND I proved the Web API key
    OR
  2. my Game Details privacy setting is public

But it would seem that case 1 always returns an Empty response, and only setting it public allows data through. Whether that's still a bug on Steam's side is up for anyone to figure out, as they themselves mention that they don't provide support for API matters.

Has your account had any money spent on it (directly in the store, not from Steam Wallet, or added to Steam Wallet from an external source like a credit card, as opposed to a Steam Market sale)? Accounts that have spent less than $5 USD do have some API limitations (if they can create a key at all). If you add ?xml=1 to your profile URL, there is an isLimitedAccount field you can check.

Also, maybe a dumb question, but is the API key you're using one that the generated from the same account? When game details or whole profile are private, only an API key generated from your own account will have access to see the details.

is the API key you're using one that the generated from the same account?

100% is, because you would get an error response otherwise, which is not happening in this case.

Has your account had any money spent on it

I make semi-regular purchases and have a fair bunch of games bought across 10+ years.

Current status is that I can flip my account public and get Playnite Steam Library importing my games, or if I keep it private and use an API key, I'll never get anything but empty responses.

Closing since there's not much we can do from our side.