As of the time of writing, the Playstation Network integration plugin for GOG Galaxy 2.0 fails to sign in for many people.
After entering user credentials, users are presented with an error that The connection to the server timed out
.
The cause of the timeout error has to do with a CORS error being returned during the authentication process with the PlayStation server which only seems to be occuring with the current version of the built-in GOG Galaxy browser.
It is reported that the fix for this issue is that the built-in browser needs to be updated to a newer version. GOG is supposedly aware of the issue and there is no current ETA for a fix. My guess is that there should be a fix with the next update of GOG Galaxy 2.0.
Until a fix is released for the issue in question, a workaround has been found by Bustacap
, which this page details out with additional steps and images.
The very first step I would suggest is that you backup your current Galaxy folder in case things go wrong. If you follow the steps outlined in this guide, you should be fine.
CTRL+R
)%LocalAppData%\GOG.com
Then hit Ok
Backup the Galaxy folder. I backed it up just by archiving the whole folder using 7-zip.
Here we will be making sure that the PlayStation Network is disconnected, and that an un-altered version of the plugin is installed.
Exit GOG
CTRL+R
)%LocalAppData%\GOG.com\Galaxy\plugins\installed\
Then hit Ok
If present, delete the psn_{random-id}
folder.
Open up the Settings => Integration
page.
You should see a Connect
button for PlayStation Network. However, if you were previously signed into the PlayStation Network, you could be seeing a Connecting
status for the connector.
If you have a stuck Connecting
state:
Exit GOG
Settings => Integrations
page.If you see either Connected
or Offline
, then click Disconnect
.
Ensure that you are disconnected:
To download the PSN plugin again, click Connect
.
When the confirmation dialog comes up, click Cancel
.
Exit GOG
At this point, you should now have a clean version of the PSN plugin installed and disconnected. The next steps will cover manually editing the plugin with your NPSSO token which you will retrieve from your Playstation Store account.
CTRL+R
)%LocalAppData%\GOG.com\Galaxy\plugins\installed\
Then hit Ok
Open the psn_{random-id}
folder.
plugin.py
in your editor of choice. I use Visual Studio Code.Now here comes the fun part. We now have the plugin.py
file open in our editor. The next steps will go over how to obtain the NPSSO token that we will be inserting into the file.
Make sure you have the latest version of Mozilla Firefox, Google Chrome or the new Chromium-based Microsoft Edge browser installed before continuing.
It has been reported that Google Chrome version 74 experiences this issue where Sony’s authorization fails due to a CORS bug. This is why it is STRONGLY recommended to update your browsers to the latest version.
Open up a new browser window
Navigate to https://store.playstation.com
Sign in to the PlayStation Store
NB! Keep this tab open once signed in to keep the session active for the workaround to work
Open a new tab and navigate to https://ca.account.sony.com/api/v1/ssocookie
NB! This tab should also be kept open to keep the session active for the workaround to work
You should see the following:
If you see this error instead:
{"error":"invalid_grant","error_description":"Invalid login","error_code":20,"docs":"https://auth.api.sonyentertainmentnetwork.com/docs/","parameters":[]}
CTRL+R
or CTRL+F5
)plugin.py
open.Go to line 64 in plugin.py
.
Replace the last word None
on line 64 with your NPSSO Token
The NPSSO token has to be surrounded by “quotes”
After editing line 64, it should look something like this:
!NB: DO NOT CHANGE ANY OTHER LINE EXEPT LINE 64
Save plugin.py
.
Connect
to the PlayStation Network.
When the confirmation dialog pops up, click Connect
.
There you have it. That should be all you need to connect to your PlayStation Store Account.
Some of you might come across an error where it shows as Offline when you try connect to your PlayStation account, even after doing all these steps.
This is the result of your NPSSO token expiring before you finished up. You took too long to edit the plugin and now you need a new token.
Disconnect
from PlayStation Netowrk.CTRL+F5
).plugin.py
with the new token and save.