FriendsOfGalaxy / galaxy-integration-steam

Integration with Steam for Galaxy
368 stars 76 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

Doc-Bo commented 1 year ago

Fantastic, thanks!

Danyelalejandro commented 1 year ago

Someone could share please, a working file backend_steam_network.py with no mistakes for all of us? please?

Attached mine. Yes, it's actually in the root folder of plugin, apparently I've copy-pasted incorrect directory path. Just extract the archive contents into "%LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8" folder. backend_steam_network.zip

It worked but only until I disconnect, re-started and connected again. Thank you

Danyelalejandro commented 1 year ago

Someone could share please, a working file backend_steam_network.py with no mistakes for all of us? please?

Attached mine. Yes, it's actually in the root folder of plugin, apparently I've copy-pasted incorrect directory path. Just extract the archive contents into "%LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8" folder. backend_steam_network.zip

It worked but only until I disconnect, re-started and connected again. Thank you

It is normal it is not syncing?

Gianlucas94 commented 1 year ago

Someone could share please, a working file backend_steam_network.py with no mistakes for all of us? please?

Attached mine. Yes, it's actually in the root folder of plugin, apparently I've copy-pasted incorrect directory path. Just extract the archive contents into "%LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8" folder. backend_steam_network.zip

It worked but only until I disconnect, re-started and connected again. Thank you

It is normal it is not syncing?

For me worked... I Just waited for a few minutes until the "syncing" notifications finish and restarted the GOG client.

image

ShadowDrakken commented 1 year ago

Yeah this looks to be a temporary solution only. This temporary fix makes it continue even without getting the correct token.

I have been looking through the code for days but am not familiar with the way it uses web sockets to authenticate so have not been successful in figuring out how to get, store, and authenticate with this token.

I agree. I think, as someone said above, OAuth should be considered since it's a stable standard.

sparkus71 commented 1 year ago

As an added data point, the plugin on macOS works fine. a diff between the backend_steam_network.py files from the windows and macos versions show they are identical. so unclear why the changes above are necessary for windows to work.

Brigand231 commented 1 year ago

Thank you for sharing your file Allexedge, I was repeatedly botching the edit. You've restored my sanity.

kyuuketsukikurai commented 1 year ago

Thanks for the hard work. Unfortunately, even with the updated file, mine just drops to offline after trying to connect for a while.

Danyelalejandro commented 1 year ago

Thanks for the hard work. Unfortunately, even with the updated file, mine just drops to offline after trying to connect for a while.

Mine too, maybe because I have an inmense ammount of games in Steam. I am trying disconnecting and connecting after start to see if it works. Even with this temporary fix, the integration wasn't optimized before. Really sad because I liked this launcher to organize better my games. The fact that repeated games shows only with several icons and not repeated as Playnite, was awesome

RaveVR commented 1 year ago

Solution above not working, restarted GOG several times, still nothing Plugin Crashed.

Danyelalejandro commented 1 year ago

Thanks for the hard work. Unfortunately, even with the updated file, mine just drops to offline after trying to connect for a while.

Mine too, maybe because I have an inmense ammount of games in Steam. I am trying disconnecting and connecting after start to see if it works. Even with this temporary fix, the integration wasn't optimized before. Really sad because I liked this launcher to organize better my games. The fact that repeated games shows only with several icons and not repeated as Playnite, was awesome

UPDATE: Finally after several tries, it worked and synced. Thank you all for your efforts. Hope we can find someone who can do active development of integration, release official update and fix the old bugs existing that we "tolerated"

Enterhaggis commented 1 year ago

Worked great here thanks!

DavidsonPrata commented 1 year ago

Did it work 100% for you guys?

To me, it loads the games only. Any other data has been synchronized, such achievements. Am I the only one?

image

greysun75 commented 1 year ago

unfortunately it didnt work for me, at least got me to the point where steam prompted for my 2fa code, but then shows offline. Thanks for sharing the file. I didnt have this file at all.

greysun75 commented 1 year ago

I tried this a couple of times and it didnt work. What I found was there were multiple instances of gog running in the background. So instead of right clicking in systray and clicking exit go to task manager to make sure you are killing it completely. After this it worked. Thank you to whoever it was that shared the file. I didnt even have this file.

rcteske commented 1 year ago

I have not checked the achievements but doing the changes in backend_steam_network.py did get it working again, and with all the tags I had set up before. Thanks for that people!

We should probably put this in a PR for the main repo while we don't get a more permanent fix. Are the devs there reachable to accept it?

Drejzer commented 1 year ago

Did it work 100% for you guys?

To me, it loads the games only. Any other data has been synchronized, such achievements. Am I the only one?

image

same here. Got only some of the achievements. I'm not sure if it's just taking it ridiculously long to sync, or if it fails somewhere along the way. Yesterday I basically had oly the GOG achievements, but now some of the steam ones show up as well.

Danyelalejandro commented 1 year ago

Loading of achievements have been an issue since a long time ago. It is not new. I would suggest to let it sync a few times more.

slaakhash commented 1 year ago

This worked for me. Thank you very much. I've tried everything but nothing worked... Until this. I don't have many games on steam, around 20, but it shows all the achievements, time played... and all the stuff.

DavidsonPrata commented 1 year ago

Loading of achievements have been an issue since a long time ago. It is not new. I would suggest to let it sync a few times more.

Really? That wasn't my experience. Everything has always worked for me. All the achievements, played time and all stuff.

TheSahugani commented 1 year ago

is there a way to download the plugin outside of Galaxy? the folder isn't even present for me to alter the file.

Danyelalejandro commented 1 year ago

Loading of achievements have been an issue since a long time ago. It is not new. I would suggest to let it sync a few times more.

Really? That wasn't my experience. Everything has always worked for me. All the achievements, played time and all stuff.

Well, at least for achievements hunters as me. I haveover 400.000 achievements thanks to many shovelware. But maybe for regular users will not have issues

DarthVaderOz commented 1 year ago

This work around worked once, after restarting GOG now back offline :(

Silphatos commented 1 year ago

Is the public profile mode working after the changes?

StraboO commented 1 year ago

Zip file worked for me. I closed GOG. Applied fix. Restartet GOG. Integration connected fine, but no steam games. Restarted GOG and they where alle there 👯

Zitbvt commented 1 year ago

Le fichier "backend_steam_network.py" a très bien fonctionné pour moi. Après avoir fait la connexion sur Steam tous mes jeux sont revenus et après un redémarrage de l'ordinateur toutes les informations de temps, succès, etc. étaient présentes. Merci pour le partage.

DonaemouS commented 1 year ago

Someone could share please, a working file backend_steam_network.py with no mistakes for all of us? please?

Attached mine. Yes, it's actually in the root folder of plugin, apparently I've copy-pasted incorrect directory path. Just extract the archive contents into "%LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8" folder. backend_steam_network.zip

just got the time to install on my primary system and it looks like it works. I'm now able to launch games from GoG Galaxy again. But now, looks like I had played 595h in this week. Yes, I'm a sort of addicted, but that means about 25 days in one week... lol

Judassem commented 1 year ago

Someone could share please, a working file backend_steam_network.py with no mistakes for all of us? please?

Attached mine. Yes, it's actually in the root folder of plugin, apparently I've copy-pasted incorrect directory path. Just extract the archive contents into "%LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8" folder. backend_steam_network.zip

Unfortunately, it doesn't fix mine. It keeps saying "Plugin has crashed."

dekteron commented 1 year ago

Works, but not perfectly, because it conects to steam, but keeps going off line everytime i reset my PC... Any solution to keep steam integration on line, no matter if reset my pc?

CSources 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.

Thank you for the fix, works great.

cderoeck commented 1 year ago

Thanks for the fix! It solved the sync with my steam account. However I have the same achievements issue someone else reported above : none of my "recent"' achievements are synced. I only see the achievements I got more than 1 year ago, but since that, nothing else is being imported.

RabieRabit commented 1 year ago

I really hope they make a official fix soon But it looks abandoned though

Fikus25 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.

DonaemouS commented 1 year ago

or maybe, write it from scratch

Fikus25 commented 1 year ago

It would be also great if GOG Galaxy support adding multiple Steam accounts, because I know many people have more than one account and to this day you have to switch between them, so it should be possible to add more than one account of same integration to synchronize all games across all accounts and platforms.

Krynh commented 1 year ago

Worked once, now it refuses to connect again

odahviing 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.

Working, thanks.

gloowa 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.

You Sir are a Gentleman and a Scholar. Thank you.

exathilSSV commented 1 year ago

Guys I don't have such file. Any idea? What I can do? image

Krynh commented 1 year ago

Download the zip file linked earlier and extract

exathilSSV commented 1 year ago

So I should delete whole function from lane 186? What about function in lane 229, what should be deleted there?

slaakhash 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.

Restartin GoG Galaxy after do this, you have to disconnect and reconnect again the steam integration to make it work

rnosek-designs commented 1 year ago

Download the zip file linked earlier and extract

So I'm in the same predicament as the earlier individual. I've downloaded the file and created a folder called STEAM_NETWORK, yet it's still not working. I'm guessing that I'm either using a wrong/broken repository or I need to find some script to point to this folder and script. Let me know if what I typed makes sense.

LauraRozier 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.

Does this also fix the saving of the credential token or do you have to re-auth every time you start gog?

Shad0wBrok3r commented 1 year ago

Does this also fix the saving of the credential token or do you have to re-auth every time you start gog?

Yeah you have to re-auth every time you start GOG. At least we can login and have the steam games appear in GOG....but this is less than ideal.

mondodimotori 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"

RaveVR commented 1 year ago

Someone could share please, a working file backend_steam_network.py with no mistakes for all of us? please?

Attached mine. Yes, it's actually in the root folder of plugin, apparently I've copy-pasted incorrect directory path. Just extract the archive contents into "%LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8" folder. backend_steam_network.zip

Jeez, finally something works here, thanks <3

Shad0wBrok3r commented 1 year ago

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"

Just tested a few minutes ago and it works...be sure to click on disconnect first and replace the backend_steam.py file with the one provided in this thread or edit the file with the provided instructions. It's just that after you restart GOG you will have to connect again because it doesn't auto-reconnect for some reason....

rnosek-designs 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.

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?