Steam Plugin Achievement % Fix for Galaxy
Since the Steam plugin has not been updated for quite a while and Galaxy has not been tracking Steam achievements for me since a month ago, I decided to look into the dev's github page. Apparently, people have already found fixes, but these are yet to be implemented.
If you're having the same issue as me, and do not want to wait until the update, here's the fix. All I've done is implemented the code in the pull requests. This should fix the achievements in addition to the plugin's timeout issue. It worked for me, my friends, and a couple of other internet users.
I don't take credit for any of the fixes. Credit goes to the respective github users.
The Timeout fix could interfere with other parts of the plugin. Please read here to understand what the issue is about. If you don't want risking it, refrain from modifying plugin.py.
Obviously, use it at own risk.
- Download
- Make sure you already have the latest Steam plugin (0.53, September 2020 release).
- Press Windows+R, write 'appdata', press Enter.
- Navigate to Local\GOG.com
- Replace files from the downloaded fix in the folder
- plugin.py to GOG.com\Galaxy\plugins\installed\steam_XXXXXXXXXXX
- websocket_client.py GOG.com\Galaxy\plugins\installed\steam_XXXXXXXXXXX\protocol
- Note: The steam_XXXXXXXXXXX folder may differ in name for you.
- Restart Galaxy, sync integrations, wait a bit for the data to come in.
- Note that games with an enormous number of achievements might still not work (1000+?).
If you don't trust downloading random files from the internet (which is fair), you can implement the changes yourself with a code editor based on the pull requests or read lower.
Achievement fix
Open websocket_client.py
Search for line 25
RECONNECT_INTERVAL_SECONDS = 20
Create a new line 26 and add
MAX_INCOMING_MESSAGE_SIZE = 2**24
Search for line 181/182
self._websocket = await asyncio.wait_for(websockets.connect(server, ssl=self._ssl_context), 5)
Change it to
self._websocket = await asyncio.wait_for(websockets.connect(server, ssl=self._ssl_context, max_size=MAX_INCOMING_MESSAGE_SIZE), 5)
Timeout fix
Open plugin.py
Search for line 261
connection_timeout = 30
Change to
connection_timeout = 120
Edit: Thanks to u/xenonisbad for pointing out potential issues with the Timeout Fix. Further information and disclaimer added.
Posted Jan 4, 2021, 3:55 PM UTC · edited
Somehow I am not affected by those problems, but I am happy people found some workarounds.
Btw. here there can be found explanation why timeout fix wasn't merged yet. I think everybody should be aware that this change can interfere with other issue.
Thanks for pointing it out. I actually forgot to include it in the post.
The fix has worked for my purposes, made my connection more stable (maybe differs on internet stability), but you're absolutely right, that it could interfere with other things. I'll edit the post immediately.