FriendsOfGalaxy / galaxy-integration-steam

Integration with Steam for Galaxy
370 stars 77 forks source link

Steam offline bug #159

Open m1cha3l02 opened 1 year ago

m1cha3l02 commented 1 year ago

Describe the bug While trying to log in to steam with plugin in the GOG app tries to load but it always ends with a message "Offline. Try again."

To Reproduce

  1. Launch GOG Galaxy
  2. Try to log in with your steam account
  3. The "Offline" message should pop up

Expected behavior An expcted behaviour should be the abillity to log in and synchronise my games within the GOG Galaxy launcher

gOOvER commented 1 year ago

@RabieRabit I hope so too, since the original creator of this integration doesn't care about updating it. Someone else should take over the maintenance of this integration, otherwise it's useless.

Whats stopping us from rebuilding it?

you must clone the whole "friends of Galaxy" repo ;)

RabieRabit commented 1 year ago

@RabieRabit I hope so too, since the original creator of this integration doesn't care about updating it. Someone else should take over the maintenance of this integration, otherwise it's useless.

Whats stopping us from rebuilding it?

you must clone the whole "friends of Galaxy" repo ;)

@gOOvER I would not mind doing it unfortunately my knowledge in this area is not to great.. Not only is my python knowledge weak but I have never maintained a repo like this or spent time building any type of plugin. I would love to contribute. that would be a first for me as well :D

gOOvER commented 1 year ago

@RabieRabit I hope so too, since the original creator of this integration doesn't care about updating it. Someone else should take over the maintenance of this integration, otherwise it's useless.

Whats stopping us from rebuilding it?

you must clone the whole "friends of Galaxy" repo ;)

@gOOvER I would not mind doing it unfortunately my knowledge in this area is not to great.. Not only is my python knowledge weak but I have never maintained a repo like this or spent time building any type of plugin. I would love to contribute. that would be a first for me as well :D

I think, we must create a complete new "Friends of Galaxy" project.

But on the other side; Gog should maintain steam integration like EPIC

RabieRabit commented 1 year ago

@RabieRabit I hope so too, since the original creator of this integration doesn't care about updating it. Someone else should take over the maintenance of this integration, otherwise it's useless.

Whats stopping us from rebuilding it?

you must clone the whole "friends of Galaxy" repo ;)

@gOOvER I would not mind doing it unfortunately my knowledge in this area is not to great.. Not only is my python knowledge weak but I have never maintained a repo like this or spent time building any type of plugin. I would love to contribute. that would be a first for me as well :D

I think, we must create a complete new "Friends of Galaxy" project.

But on the other side; Gog should maintain steam integration like EPIC

That would be more than ideal

DavidsonPrata commented 1 year ago

@RabieRabit I hope so too, since the original creator of this integration doesn't care about updating it. Someone else should take over the maintenance of this integration, otherwise it's useless.

Whats stopping us from rebuilding it?

you must clone the whole "friends of Galaxy" repo ;)

@gOOvER I would not mind doing it unfortunately my knowledge in this area is not to great.. Not only is my python knowledge weak but I have never maintained a repo like this or spent time building any type of plugin. I would love to contribute. that would be a first for me as well :D

I think, we must create a complete new "Friends of Galaxy" project.

But on the other side; Gog should maintain steam integration like EPIC

Unfortunately, it isn't up to them!

gOOvER commented 1 year ago

Unfortunately, it isn't up to them!

It should; but Steam doesn't pay like EPIC does ;)

DavidsonPrata commented 1 year ago

Unfortunately, it isn't up to them!

It should; but Steam doesn't pay like EPIC does ;)

Are you joking...right? Epic doesn't pay a penny to GOG. As a new platform, Epic just partners with them to authorise GOG to develop an official integration. In another hand, Steam, leading the PC market share isn't interesting.

gOOvER commented 1 year ago

Unfortunately, it isn't up to them!

It should; but Steam doesn't pay like EPIC does ;)

Are you joking...right? Epic doesn't pay a penny to GOG. As a new platform, Epic just partners with them to authorise GOG to develop an official integration. In another hand, Steam, leading the PC market share isn't interesting.

Thats why Gog is on EPIC and EPIC is maintained bei GOG Team ;) pls wake up ;)EPIC pays a lot for such things ;) but it looks like, you are a bit younger and dont know much about the gaming market and EPIC :D

And about Steam; Steam was the FIRST Gaming Platform and thats why they are so big ;) I know Steam from the first alpha ;)

DavidsonPrata commented 1 year ago

Unfortunately, it isn't up to them!

It should; but Steam doesn't pay like EPIC does ;)

Are you joking...right? Epic doesn't pay a penny to GOG. As a new platform, Epic just partners with them to authorise GOG to develop an official integration. In another hand, Steam, leading the PC market share isn't interesting.

Thats why Gog is on EPIC and EPIC is maintained bei GOG Team ;) pls wake up ;)EPIC pays a lot for such things ;) but it looks like, you are a bit younger and dont know much about the gaming market and EPIC :D

And about Steam; Steam was the FIRST Gaming Platform and thats why they are so big ;) I know Steam from the first alpha ;)

Oh gosh...these conspiracy theories about Epic paying out GOG got here already? LOL

gOOvER commented 1 year ago

Unfortunately, it isn't up to them!

It should; but Steam doesn't pay like EPIC does ;)

Are you joking...right? Epic doesn't pay a penny to GOG. As a new platform, Epic just partners with them to authorise GOG to develop an official integration. In another hand, Steam, leading the PC market share isn't interesting.

Thats why Gog is on EPIC and EPIC is maintained bei GOG Team ;) pls wake up ;)EPIC pays a lot for such things ;) but it looks like, you are a bit younger and dont know much about the gaming market and EPIC :D And about Steam; Steam was the FIRST Gaming Platform and thats why they are so big ;) I know Steam from the first alpha ;)

Oh gosh...these conspiracy theories about Epic paying out GOG got here already? LOL

Same for yopu about steam ;) But useless to discuss with an epic fanboy

HexagonIsTheBestagon commented 1 year ago

This is github, please keep your weird fanboyism somewhere else and don't derail the conversation.

Torsten Widmann @.***> schrieb am So., 9. Apr. 2023, 20:07:

Unfortunately, it isn't up to them!

It should; but Steam doesn't pay like EPIC does ;)

Are you joking...right? Epic doesn't pay a penny to GOG. As a new platform, Epic just partners with them to authorise GOG to develop an official integration. In another hand, Steam, leading the PC market share isn't interesting.

Thats why Gog is on EPIC and EPIC is maintained bei GOG Team ;) pls wake up ;)EPIC pays a lot for such things ;) but it looks like, you are a bit younger and dont know much about the gaming market and EPIC :D And about Steam; Steam was the FIRST Gaming Platform and thats why they are so big ;) I know Steam from the first alpha ;)

Oh gosh...these conspiracy theories about Epic paying out GOG got here already? LOL

Same for yopu about steam ;) But useless to discuss with an epich fanboy

— Reply to this email directly, view it on GitHub https://github.com/FriendsOfGalaxy/galaxy-integration-steam/issues/159#issuecomment-1501183257, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6GCGYRHE5SUCGSNI7IREYTXAL3H7ANCNFSM6AAAAAAVUP7BY4 . You are receiving this because you commented.Message ID: @.*** com>

mondodimotori commented 1 year ago

I may try again in the next few days... But at this point, reading that it requires you to login every time you open GOG, I'll just wait for a more definitive fix. Thanks anyway!

DavidsonPrata commented 1 year ago

Unfortunately, it isn't up to them!

It should; but Steam doesn't pay like EPIC does ;)

Are you joking...right? Epic doesn't pay a penny to GOG. As a new platform, Epic just partners with them to authorise GOG to develop an official integration. In another hand, Steam, leading the PC market share isn't interesting.

Thats why Gog is on EPIC and EPIC is maintained bei GOG Team ;) pls wake up ;)EPIC pays a lot for such things ;) but it looks like, you are a bit younger and dont know much about the gaming market and EPIC :D And about Steam; Steam was the FIRST Gaming Platform and thats why they are so big ;) I know Steam from the first alpha ;)

Oh gosh...these conspiracy theories about Epic paying out GOG got here already? LOL

Same for yopu about steam ;) But useless to discuss with an epic fanboy

wait...WHAT??? I hate Epic games with all my guts mate! I just don't believe in conspiracies. If you have the info about that, post the link/source. Simple like that!!!

gloowa commented 1 year ago

Since FriendsOfGalaxy does not seem to ba active since mid-2021, does anyone know of any actively maintained fork of the plugin?

HexagonIsTheBestagon commented 1 year ago

There is none. I've just been using Playnite with the GoG Skin. It's better in every aspect and actively maintained.

gloowa @.***> schrieb am Mo., 10. Apr. 2023, 11:07:

Since FriendsOfGalaxy does not seem to ba active since mid-2021, does anyone know of any actively maintained fork of the plugin?

— Reply to this email directly, view it on GitHub https://github.com/FriendsOfGalaxy/galaxy-integration-steam/issues/159#issuecomment-1501584406, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6GCGYRWZRQTOBBKTJCLJT3XAPEULANCNFSM6AAAAAAVUP7BY4 . You are receiving this because you commented.Message ID: @.*** com>

krashd8 commented 1 year ago

After almost two years of GOG.com incompetence I found the best fix for the constant integration problems was to completely uninstall Galaxy and then install Playnite. It's been over a month now and I've had no problems with this fix so far.

TheSentry commented 1 year ago

Okay, here goes nothing ...

I just created an organization here on GitHub: FansOfGalaxy The plan is to continue where FriendsOfGalaxy seemingly abandoned the project and keep it alive. It is a fork, so it's possible to merge the changes back into the "original" repositories should they ever come back.

That being said, I have a history of wanting to work on such community project but then not having the time for it. (Full-time job has priority.) So I don't want this to be a one man show and hope that people chime in and help.

So, let's see where this goes ...

francoisaudic commented 1 year ago

I was able to make it work somehow by two small fixes in %LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\steam_network\backend_steam_network.py file:

1. `_get_websocket_auth_step(self)` function (line 186): comment out or delete exception raising and return success operation code instead (timeout value was also decreased to 20 seconds, not sure if it has affected something):
async def _get_websocket_auth_step(self):
        try:
            result = await asyncio.wait_for(
                self._websocket_client.communication_queues["plugin"].get(), 20
            )
            return result["auth_result"]
        except asyncio.TimeoutError:
            return UserActionRequired.NoActionRequired
            #raise BackendTimeout() 
2. `_handle_two_step(self, params, fail, finish)` function (line 229): explicitly return Authentication object instead of `self._check_public_profile()`. Without this edit the plugin shows warning  "2FA authentication failed, falling back to public profile" but still imports Steam library.
        if result != UserActionRequired.NoActionRequired:
            return next_step_response(fail, finish)
        else:
            self._auth_data = None
            self._store_credentials(self._user_info_cache.to_dict())
            return Authentication(self._user_info_cache.steam_id, self._user_info_cache.persona_name)
3. Restart GOG Galaxy and re-enter Steam credentials.

Not working here as of today. After typing my credentials and passing the two steps verification, it just hangs at "connecting..." for a few seconds before resulting, again, as "offline, retry"

File not found in the steam_network folder, but directly in the parent folder

kyuuketsukikurai commented 1 year ago

Ok, I "just" got it working and see my mistake. I kept closing out GOG Galaxy completely, then swapping out the backend_steam_network.py file.

This time, I left GOG Galaxy open and then swapped the file. Now it finally connected and began importing data. I'm not positive if this will stick but atleast I have a majority of that data back.

This was the trick for me. I was closing GoG and swapping it. Leaving it open while disconnected, replacing the file, then connecting it worked for me.

ryanpcmcquen commented 1 year ago

I was able to make it work somehow by two small fixes in %LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\steam_network\backend_steam_network.py file:

  1. _get_websocket_auth_step(self) function (line 186): comment out or delete exception raising and return success operation code instead (timeout value was also decreased to 20 seconds, not sure if it has affected something):
async def _get_websocket_auth_step(self):
        try:
            result = await asyncio.wait_for(
                self._websocket_client.communication_queues["plugin"].get(), 20
            )
            return result["auth_result"]
        except asyncio.TimeoutError:
            return UserActionRequired.NoActionRequired
            #raise BackendTimeout() 
  1. _handle_two_step(self, params, fail, finish) function (line 229): explicitly return Authentication object instead of self._check_public_profile(). Without this edit the plugin shows warning "2FA authentication failed, falling back to public profile" but still imports Steam library.
        if result != UserActionRequired.NoActionRequired:
            return next_step_response(fail, finish)
        else:
            self._auth_data = None
            self._store_credentials(self._user_info_cache.to_dict())
            return Authentication(self._user_info_cache.steam_id, self._user_info_cache.persona_name)
  1. Restart GOG Galaxy and re-enter Steam credentials.

Has this been created as a PR?

OpenRift412 commented 1 year ago

I was able to make it work somehow by two small fixes in %LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\steam_network\backend_steam_network.py file:

  1. _get_websocket_auth_step(self) function (line 186): comment out or delete exception raising and return success operation code instead (timeout value was also decreased to 20 seconds, not sure if it has affected something):
async def _get_websocket_auth_step(self):
        try:
            result = await asyncio.wait_for(
                self._websocket_client.communication_queues["plugin"].get(), 20
            )
            return result["auth_result"]
        except asyncio.TimeoutError:
            return UserActionRequired.NoActionRequired
            #raise BackendTimeout() 
  1. _handle_two_step(self, params, fail, finish) function (line 229): explicitly return Authentication object instead of self._check_public_profile(). Without this edit the plugin shows warning "2FA authentication failed, falling back to public profile" but still imports Steam library.
        if result != UserActionRequired.NoActionRequired:
            return next_step_response(fail, finish)
        else:
            self._auth_data = None
            self._store_credentials(self._user_info_cache.to_dict())
            return Authentication(self._user_info_cache.steam_id, self._user_info_cache.persona_name)
  1. Restart GOG Galaxy and re-enter Steam credentials.

Has this been created as a PR?

No because it fails when you restart Galaxy again, requiring you to reconnect it.

Ariikitty commented 1 year ago

I was able to make it work somehow by two small fixes in %LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\steam_network\backend_steam_network.py file:

1. `_get_websocket_auth_step(self)` function (line 186): comment out or delete exception raising and return success operation code instead (timeout value was also decreased to 20 seconds, not sure if it has affected something):
async def _get_websocket_auth_step(self):
        try:
            result = await asyncio.wait_for(
                self._websocket_client.communication_queues["plugin"].get(), 20
            )
            return result["auth_result"]
        except asyncio.TimeoutError:
            return UserActionRequired.NoActionRequired
            #raise BackendTimeout() 
2. `_handle_two_step(self, params, fail, finish)` function (line 229): explicitly return Authentication object instead of `self._check_public_profile()`. Without this edit the plugin shows warning  "2FA authentication failed, falling back to public profile" but still imports Steam library.
        if result != UserActionRequired.NoActionRequired:
            return next_step_response(fail, finish)
        else:
            self._auth_data = None
            self._store_credentials(self._user_info_cache.to_dict())
            return Authentication(self._user_info_cache.steam_id, self._user_info_cache.persona_name)
3. Restart GOG Galaxy and re-enter Steam credentials.

Not working here as of today. After typing my credentials and passing the two steps verification, it just hangs at "connecting..." for a few seconds before resulting, again, as "offline, retry"

Tried this today and instead of the plugin allowing me to login but then hang on connecting before saying offline, it now just says the plugin crashed after making the edits to the backend_steam_network.py

pippo-san commented 1 year ago

Okay, here goes nothing ...

I just created an organization here on GitHub: FansOfGalaxy The plan is to continue where FriendsOfGalaxy seemingly abandoned the project and keep it alive. It is a fork, so it's possible to merge the changes back into the "original" repositories should they ever come back.

You may want to have a look at this other organization https://github.com/GOG-Nebula

WazBurrows commented 1 year ago

@TheSentry, I see that you created the fork of the steam plugin under FansOfGalaxy but the fix from this thread isn't in it. And the fix is also not in the other clone of the repo that @pippo-san referred to under GOG-Nebula.

pippo-san commented 1 year ago

@TheSentry, I see that you created the fork of the steam plugin under FansOfGalaxy but the fix from this thread isn't in it.

He seems to have only forked and updated the readme of the Steam plugin, and I still didn't find any fix provided bt others working for me.

And the fix is also not in the other clone of the repo that @pippo-san referred to under GOG-Nebula.

They seem to have abandoned the project, so you won't see updates there, but it's a starting point to @TheSentry, if they really want to do anything

TheSentry commented 1 year ago

@WazBurrows @pippo-san Yes, the fix isn't in it, yet. Mainly because it didn't fix things for me. I still have the problem with the Steam integration showing up as offline and "retry" does nothing.

The other problem is that the repository itself is not what is plugged into Galaxy. You need to compile it first and I need some time to figure things out. If you know how to do it and want to help, feel free to join the project :)

WazBurrows commented 1 year ago

Sorry, but I "rage quit" GoG Galaxy yesterday and installed Playnite instead. I'm having no problems with it and it seems to have a bunch of other features.

There was another Galaxy plugin that had to be manually updated after each Galaxy update too - Ubisoft maybe. So with that and Steam not working without logging in every time, and then seeing that the Steam plugin was abandoned, I have little hope for Galaxy.

I'd suggest you try Playnite instead, unless there is a particular reason that you're staying with Galaxy. My reason is simple: I just need a central place to check for the games that I own when I see a game sale is running, or the Humble Choice list of games is released. I don't really use many of the other features.

------ Original Message ------ From "TheSentry" @.> To "FriendsOfGalaxy/galaxy-integration-steam" @.> Cc "WazBurrows" @.>; "Mention" @.> Date 4/14/2023 11:18:31 AM Subject Re: [FriendsOfGalaxy/galaxy-integration-steam] Steam offline bug (Issue #159)

@WazBurrows @.*** https://github.com/pippo-san Yes, the fix isn't in it, yet. Mainly because it didn't fix things for me. I still have the problem with the Steam integration showing up as offline and "retry" does nothing.

The other problem is that the repository itself is not what is plugged into Galaxy. You need to compile it first and I need some time to figure things out. If you know how to do it and want to help, feel free to join the project :)

— Reply to this email directly, view it on GitHub https://github.com/FriendsOfGalaxy/galaxy-integration-steam/issues/159#issuecomment-1508912793, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALK7UNGRTAJ7DJAZ57KZW53XBF2FPANCNFSM6AAAAAAVUP7BY4. You are receiving this because you were mentioned.Message ID: @.***>

TheSentry commented 1 year ago

@WazBurrows Nah, I tried Playnite and it is not as good as Galaxy. Not even close. I want my Galaxy client back to its glorious days and I'll keep working on that.

Fikus25 commented 1 year ago

Kinda funny that plugin for the largest and oldest digital game distribution is so hard to maintain. I would expect that integration for Steam would be no 1. to work on.

TheSentry commented 1 year ago

@Fikus25 The problem is that it is barely documented. It works as long as you only need to change few lines of code, but apparently each plugin contains its own Python environment and every module needed. So small fixes are easy, but no bigger changes. Unless you have the instructions on how to compile it. And that one script I've found uses a GOG-internal GitLab server ...

adrianinsaval commented 1 year ago

seems this entire account has been abandoned, such a shame, it was so nice to have all my games on a single launcher...

joerg-nafcom commented 1 year ago

I am having the same issue (I am at gog galaxy 2.0 version 2.0.62,26) steam stays at "offline", clicking on "Retry" does nothning and disconnecting and re-connecting sets it back to "offline".

ryanpcmcquen commented 1 year ago

I reluctantly switched to Playnite (I really liked GOG Galaxy and have used it for years). I'm impressed with how speedy and responsive the interface in Playnite is. Playnite also recommended that I disable the Nahimic process on my Windows 10 machine and now everything seems to be running smoother.

If you're debating trying Playnite, I say give it a go, I was pleasantly surprised.

It even works with things like Itch.io, which never had GOG Galaxy support that I know of, so now I have one launcher where I can get to all my games.

TheSentry commented 1 year ago

Could we please concentrate on fixing the issue at hand? This is not a Playnite advertisement thread

Danyelalejandro commented 1 year ago

Could we please concentrate on fixing the issue at hand? This is not a Playnite advertisement thread

I agree. As a matter of fact Github threads are for technical issues and files, not for discussions. The place for it would be Reddit or Twitter

ABaumher commented 1 year ago

Back on topic, a bit of a combination of the issue and how to (potentially) fix it. Ccorsano's comment points out the cause, and following the rabbit hole to https://github.com/SteamRE/SteamKit/issues/1125 (also mentioned in the comments here by marvelvang), notes that Steam has implemented a new means of authentication. Both the steam kit and playnite integrations are written in C#, but they could be ported to python. Similarly, Steam Web implements it in TypeScript, which could also be ported. To dramatically simplify what exactly is going on, Steam used to perform a callback when it succeeded. It no longer does so, and this causes GoG to timeout, and you remain offline. Steam sends a Javascript Web Token (JWT) with a refresh and access token, as well as other information that verifies the token is going to who it is supposed to. This is an increasingly common form of handshake for authentication because it hides the authentication information from malicious actors and expires before any deciphering can complete, while still providing a means for the proper actor to stay logged in without prompting you for your password over and over again. Unfortunately, these secure communication methods tend to be a pain in the neck to work with.

The Tl;Dr: Steam authentication no longer sends a callback on success like we'd expect and uses a different workflow. We'd need to rewrite the python code to work with this. Also, since FriendsOfGalaxy appears inactive, we'd need to fork this and get Scoop (see https://github.com/borger/scoop-galaxy-integrations) to refer to this fork instead. Implementations already exist in TypeScript (Node.JS) and C#. I'll see what I can do, though given how much of a pain the PSN integration was, I'm not making any promises. If i get a successful version i'll put a pull request up here and at https://github.com/GOG-Nebula/galaxy-integration-steam/

ABaumher commented 1 year ago

I forgot how much i dislike python. Abstract classes use their own package instead of being built-in like most OOP, and absstract methods are really hacky. Which is made necessary because the implementation currently uses two backend formats - one using a public profile and another using the network directly. The public profile backend was a workaround for login issues (which seems like a particularly nasty "bug," for lack of better term). If we're lucky, the new workflow would fix this issue because we could use the refresh token to get a new access token periodically. I'm definitely going to need testing/testers to see if this is the case. For now i'll see if i can get both methods to work and go from there.

Bertaz commented 1 year ago

@ABaumher Maybe you already found about it, but check my previous comment: https://github.com/FriendsOfGalaxy/galaxy-integration-steam/issues/159#issuecomment-1479032932 . ArchiSteamFarm is also written in C#, but could be useful to get an idea on how to implement it in Python

Argalt commented 1 year ago

Hi, i'm doing the fix but doesn't work. Here is my log file: plugin-steam-ca27391f-2675-49b1-92c0-896d43afa4f8.log error line 47 2023-04-20 22:06:30,373 - steam_network.websocket_client - ERROR - Failed to establish authenticated WebSocket connection ValueError('too many values to unpack (expected 2)') error line 63 2023-04-20 22:06:50,387 - backend_steam_network - WARNING - Incorrect provided Steam64 ID: None 2023-04-20 22:06:50,388 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "8", "error": {"code": 4, "message": "Backend responded in unknown way"}} error line 115 2023-04-20 22:07:45,422 - plugin - WARNING - Authentication for initial backend failed with ValueError("invalid literal for int() with base 10: 'None'") 2023-04-20 22:07:45,422 - plugin - INFO - Requested backend switch from BackendMode.SteamNetwork to BackendMode.PublicProfiles 2023-04-20 22:07:45,802 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "25", "error": {"code": 106, "message": "Access denied"}}

Isn't it wiser to correct these errors than to start from scratch?

Argalt commented 1 year ago

now i have just the error => error line 63 2023-04-20 22:06:50,387 - backend_steam_network - WARNING - Incorrect provided Steam64 ID: None 2023-04-20 22:06:50,388 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "8", "error": {"code": 4, "message": "Backend responded in unknown way"}}

michaelcawood commented 1 year ago

Same issue here... following for a fix.

Krynh commented 1 year ago

Kinda funny that plugin for the largest and oldest digital game distribution is so hard to maintain. I would expect that integration for Steam would be no 1. to work on.

Gog obviously don't care about the galaxy integrations

ABaumher commented 1 year ago

@ABaumher Maybe you already found about it, but check my previous comment: #159 (comment) . ArchiSteamFarm is also written in C#, but could be useful to get an idea on how to implement it in Python

I didn't see it but i'll take a look. Playnite simply uses another NuGet package to handle steam authentication, which iirc is SteamKit2. There are at least 3 different python packages that claim to offer the same, and i'd very much prefer to let them handle it, but their documentation isn't great.

Current problem is trying to figure out why this implementation is so (imo needlessly) complicated. I have no idea where we actually call the API, which is obfuscated to a crazy degree. As far as i can tell only two functions in the plugin are broken: 'authenticate' and 'pass_login_credentials'. Credentials, however, starts a websocket communication on a separate thread, which hangs in the authenticate method (throws a timeout), which is what the hack fix ignores. I'd assume you could have told if the authentication was successful by the data returned in the http_client request, but i don't have logs of what the previous version sent so i can't confirm it.

I'm attempting to create a python program that does the authentication outside of GOG so i don't have to bother testing though GOG, then copypaste the script in when it works. Unfortunately I don't think i can do that with the credentials function, because that uses data stored in GOG's cache. This is what makes it so you don't have to log back in all the time

EDIT: Anyone know if GOG has a dev mode akin to Steam's -Dev flag? I might have missed it somewhere but I don't remember seeing anything denoting it. would make debugging a little easier

ABaumher commented 1 year ago

@Argalt

now i have just the error => error line 63 2023-04-20 22:06:50,387 - backend_steam_network - WARNING - Incorrect provided Steam64 ID: None 2023-04-20 22:06:50,388 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "8", "error": {"code": 4, "message": "Backend responded in unknown way"}}

That "fix" is just a hack. The fix simply ignores an authentication call, assuming everything is ok. I'd assume, at least in your case, it was not ok, so your steam64 id returned 'null' or in Python, 'None'. We can't login with null, so everything breaks.

ABaumher commented 1 year ago

Found the message we aren't getting. We no longer get EMsg 5463, or ClientNewLoginKey. Found where we hang, too. May have a temporary fix that will work, but it may cause you to have to log in every time. If anyone is feeling adventurous, comment out await self._protobuf_client.login_key_retrieved.wait() in \steam_network\protocol_client.py (if you are on Linux or Mac, use forward slashes instead of backslashes)

This may break something else in the code; i am looking now to see if that's the case, but it's probably faster to just try it, and if it errors, send me a log

DonaemouS commented 1 year ago

where I find logs?

merovigen commented 1 year ago

@DonaemouS usually you can find them here - C:\ProgramData\GOG.com\Galaxy\logs.

OldManLoki commented 1 year ago

Found the message we aren't getting. We no longer get EMsg 5463, or ClientNewLoginKey. Found where we hang, too. May have a temporary fix that will work, but it may cause you to have to log in every time. If anyone is feeling adventurous, comment out await self._protobuf_client.login_key_retrieved.wait() in \steam_network\protocol_client.py (if you are on Linux or Mac, use forward slashes instead of backslashes)

This may break something else in the code; i am looking now to see if that's the case, but it's probably faster to just try it, and if it errors, send me a log

Seems to work... at least for the moment. Not just the library is updated, even the latest activity now is correctly displayed... No error so far.

Janhtzen commented 1 year ago

Thank, it's fixed for me with this solution

Krynh commented 1 year ago

Does not stay online for me after a restart