Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE INTEGRATION GOG GALAXY OF PLAYSTATION #40

Open
bportalanza opened this issue Jun 6, 2022 · 41 comments
Open

ISSUE INTEGRATION GOG GALAXY OF PLAYSTATION #40

bportalanza opened this issue Jun 6, 2022 · 41 comments

Comments

@bportalanza
Copy link

Describe the bug
it Shows the next error: "A connection to the server could not be established.
(18.66721cb8.1654455057.1b738a06)" when it asks my credencials

To Reproduce
Steps to reproduce the behavior,:

  1. Log in with account that have Playstation on gog integration
  2. It shows: "A connection to the server could not be established.
    (18.66721cb8.1654455057.1b738a06)"

Expected behavior
Connect Playstation integration on GOG galaxy.

@ivanrayner
Copy link

Do you have 2 Step Verification enabled on your PSN account? If so, have you tried disabling it?

@mcgowan7
Copy link

mcgowan7 commented Jun 8, 2022

I found this because I have same issue. I just disabled 2-factor and still Offline - Retry and Disconnected

@gnoling
Copy link

gnoling commented Jun 9, 2022

Same. I don't believe the developer maintains this integration anymore, so here's hoping someone figures out a solution.

@finkleroy
Copy link

I'm having the same issue. Is there another PSN integration we can use instead of this one?

@FiftyFour7250
Copy link

Same. Fix please.

@BaumherA
Copy link

Did some digging. This does not appear to be an issue with the integration here. I believe this is an issue with the Galaxy Client.
Without getting overly technical, the Authentication URL obtained from here

OAUTH_LOGIN_REDIRECT_URL = "https://www.playstation.com/"
OAUTH_LOGIN_URL = "https://web.np.playstation.com/api/session/v1/signin" \
"?redirect_uri=https://io.playstation.com/central/auth/login" \
"%3FpostSignInURL={redirect_url}" \
"%26cancelURL={redirect_url}" \
"&smcid=web:pdc"
OAUTH_LOGIN_URL = OAUTH_LOGIN_URL.format(redirect_url=OAUTH_LOGIN_REDIRECT_URL)
resolves to the following:

https://web.np.playstation.com/api/session/v1/signin?redirect_uri=https://io.playstation.com/central/auth/login%3FpostSignInURL=https://www.playstation.com/%26cancelURL=https://www.playstation.com/&smcid=web:pdc

if you paste this into your browser of choice, you can try logging in directly. if you can do so, this is not an issue with this integration, but rather an issue with the Galaxy Client. if you get that same error in your browser, it is an issue on Sony's end. If that url results in a 404 page or something of the like, that is an issue with that link.

For me, i can successfully log in via that url, using Edge version 103 (the current version as of this writing) It may be worth noting that i have to do a verification quiz. This quiz does not pop up in the GOG Galaxy.

@BaumherA
Copy link

A more technical note: Your login information is stored via a 64-bit cookie, known as a "session cookie". this cookie expires relatively quickly. However, there's a second cookie, called a "refresh cookie" that allows the caller to obtain a new "session cookie." After a period of two months of inactivity, the "refresh cookie" also expires. you will need to reauthenticate when that happens. if you access GoG Galaxy fairly often, this likely won't be an issue. The application checks if you have a session cookie, and if it has expired, attempts to retrieve a new one via the refresh cookie. if that has also expired, you need to log in again. The integration returns a "NextStep" object when this occurs. This tells the Galaxy to display a webpage (that URL in the previous comment), and, should you login successfully, take those cookies and pass them back to the plugin. The plugin never gets those cookies because the login never succeeds.
The error you are seeing is most likely a security issue raised by PSN because the integrated browser Galaxy Client uses is out of date. I cannot confirm this because i do not have the source code for the client and do not know what integrated browser they use. It may also be an issue of PSN being down, either in your region or for maintenance.

I have submitted a bug report to GoG outlining this. If it is a browser issue, updating it would fix the issue. I'd like to test further, but upon trying earlier today, it suddenly worked again. The only thing i can suggest for now is to try logging in again later, but hopefully this can get fixed in the client.

Alternatively, you can try logging in via the link and manually copying the 64 bit cookie into the plugin.py authenticate function, but i really do not recommend this. It will expire very frequently and thus be pretty pointless. You also should only do so if you know what you're doing. I believe this method is outlined in the GoG Galaxy Integration page for this issue

@finkleroy
Copy link

I'm able to successfully login using the second link you provided. I'm also able to login using the Playnite client, so it appears the issue is indeed with the Galaxy client. We'll need for GOG to fix it.

@BaumherA
Copy link

BaumherA commented Jul 15, 2022

I'm able to successfully login using the second link you provided. I'm also able to login using the Playnite client, so it appears the issue is indeed with the Galaxy client. We'll need for GOG to fix it.

In the event GoG dev team sees this, what OS do you use, Which browser did you try it with, and what Region are you from? Any information we can provide may be useful. For region, the language/country code on Sony's website is likely enough, if you feel comfortable sharing it. Ideally, if you are testing via Firefox (i.e. not Chromium-based), that would be new information, but i guess anything is useful.

For me, I'm on Windows 10, Edge 103. Sony's site connects me as En-Us (English, United States), which is true, I do reside in the US.

@finkleroy
Copy link

I'm able to successfully login using the second link you provided. I'm also able to login using the Playnite client, so it appears the issue is indeed with the Galaxy client. We'll need for GOG to fix it.

In the event GoG dev team sees this, what OS do you use, Which browser did you try it with, and what Region are you from? Any information we can provide may be useful. For region, the language/country code on Sony's website is likely enough, if you feel comfortable sharing it. Ideally, if you are testing via Firefox (i.e. not Chromium-based), that would be new information, but i guess anything is useful.

For me, I'm on Windows 10, Edge 103. Sony's site connects me as En-Us (English, United States), which is true, I do reside in the US.

Windows 10 (updated to the latest non-beta version), Chrome (updated), United States (English).

@juanimoli
Copy link

juanimoli commented Jul 26, 2022

A more technical note: Your login information is stored via a 64-bit cookie, known as a "session cookie". this cookie expires relatively quickly. However, there's a second cookie, called a "refresh cookie" that allows the caller to obtain a new "session cookie." After a period of two months of inactivity, the "refresh cookie" also expires. you will need to reauthenticate when that happens. if you access GoG Galaxy fairly often, this likely won't be an issue. The application checks if you have a session cookie, and if it has expired, attempts to retrieve a new one via the refresh cookie. if that has also expired, you need to log in again. The integration returns a "NextStep" object when this occurs. This tells the Galaxy to display a webpage (that URL in the previous comment), and, should you login successfully, take those cookies and pass them back to the plugin. The plugin never gets those cookies because the login never succeeds. The error you are seeing is most likely a security issue raised by PSN because the integrated browser Galaxy Client uses is out of date. I cannot confirm this because i do not have the source code for the client and do not know what integrated browser they use. It may also be an issue of PSN being down, either in your region or for maintenance.

I have submitted a bug report to GoG outlining this. If it is a browser issue, updating it would fix the issue. I'd like to test further, but upon trying earlier today, it suddenly worked again. The only thing i can suggest for now is to try logging in again later, but hopefully this can get fixed in the client.

Alternatively, you can try logging in via the link and manually copying the 64 bit cookie into the plugin.py authenticate function, but i really do not recommend this. It will expire very frequently and thus be pretty pointless. You also should only do so if you know what you're doing. I believe this method is outlined in the GoG Galaxy Integration page for this issue

@finkleroy got it working!

Based on this I went hunting that cookie cache. The first thing I saw is that it seems that Sony has changed 2FA screen (could be just frontend) and this means code changes, so cookie definitions could also have changed. As integration's name has "psn" and there is nothing of PS installed in this PC, I searched that string in Explorer. Found some folders, one was placed in "C:\ProgramData\GOG.com\Galaxy\webcache". There should be a number folder and a "common" folder. Close GoG if opened and inside that number folder there should be a "psn" folder, delete that one. Re-open GoG and try again, it should be working now. I don't really know if when refresh token expires you can login again (haven't tried), but until devs see this, you can try this solution.

@finkleroy
Copy link

A more technical note: Your login information is stored via a 64-bit cookie, known as a "session cookie". this cookie expires relatively quickly. However, there's a second cookie, called a "refresh cookie" that allows the caller to obtain a new "session cookie." After a period of two months of inactivity, the "refresh cookie" also expires. you will need to reauthenticate when that happens. if you access GoG Galaxy fairly often, this likely won't be an issue. The application checks if you have a session cookie, and if it has expired, attempts to retrieve a new one via the refresh cookie. if that has also expired, you need to log in again. The integration returns a "NextStep" object when this occurs. This tells the Galaxy to display a webpage (that URL in the previous comment), and, should you login successfully, take those cookies and pass them back to the plugin. The plugin never gets those cookies because the login never succeeds. The error you are seeing is most likely a security issue raised by PSN because the integrated browser Galaxy Client uses is out of date. I cannot confirm this because i do not have the source code for the client and do not know what integrated browser they use. It may also be an issue of PSN being down, either in your region or for maintenance.
I have submitted a bug report to GoG outlining this. If it is a browser issue, updating it would fix the issue. I'd like to test further, but upon trying earlier today, it suddenly worked again. The only thing i can suggest for now is to try logging in again later, but hopefully this can get fixed in the client.
Alternatively, you can try logging in via the link and manually copying the 64 bit cookie into the plugin.py authenticate function, but i really do not recommend this. It will expire very frequently and thus be pretty pointless. You also should only do so if you know what you're doing. I believe this method is outlined in the GoG Galaxy Integration page for this issue

@finkleroy got it working!

Based on this I went hunting that cookie cache. The first thing I saw is that it seems that Sony has changed 2FA screen (could be just frontend) and this means code changes, so cookie definitions could also have changed. As integration's name has "psn" and there is nothing of PS installed in this PC, I searched that string in Explorer. Found some folders, one was placed in "C:\ProgramData\GOG.com\Galaxy\webcache". There should be a number folder and a "common" folder. Close GoG if opened and inside that number folder there should be a "psn" folder, delete that one. Re-open GoG and try again, it should be working now. I don't really know if when refresh token expires you can login again (haven't tried), but until devs see this, you can try this solution.

I just tried the workaround, but I'm still experiencing the same error. I don't know why it worked for you but not me. When I tried to login, it didn't re-create the psn folder, which I moved to my desktop instead of deleting.

@juanimoli
Copy link

juanimoli commented Jul 26, 2022

I just tried the workaround, but I'm still experiencing the same error. I don't know why it worked for you but not me. When I tried to login, it didn't re-create the psn folder, which I moved to my desktop instead of deleting.

I'm sad to hear that. You can try searching the same "psn" folder in your system or delete the whole "webcache" folder. Maybe you have it installed GoG twice in different locations (or drives) and you have multiple locations.

@BaumherA
Copy link

BaumherA commented Jul 26, 2022

Deleting the web cache in theory could fix the error. It might also explain why it suddenly worked for me. Web browsers cache (store) data so the next time you visit a website it can load more quickly. If you happen to cache bad or outdated security data, PSN could (and likely should, because most security measures know they can be cracked after a long enough time and therefore expire before that point) invalidate itself. I have no idea what data the gog galaxy browser is caching or how to prevent it from caching in the first place, though I'm inclined to think that's not something we could do anyway

Tl;Dr: Try deleting everything in the web cache folder when GoG is closed. I believe it is located here: C:/ProgramData/GOG.com/Galaxy/webcache. It might cause gog to take longer to open back up, as gog caches the images/thumbnails for various games.

Edit: seeing you tried that already, you could try that in combination with deleting the psn integration. That is located in %localappdata% somewhere, not at my pc rn, apologies. Then when you start up GoG, add the psn integration back by going to settings -> (sync) integrations and then add integration, and search for psn.

@finkleroy
Copy link

Deleting the web cache in theory could fix the error. It might also explain why it suddenly worked for me. Web browsers cache (store) data so the next time you visit a website it can load more quickly. If you happen to cache bad or outdated security data, PSN could (and likely should, because most security measures know they can be cracked after a long enough time and therefore expire before that point) invalidate itself. I have no idea what data the gog galaxy browser is caching or how to prevent it from caching in the first place, though I'm inclined to think that's not something we could do anyway

Tl;Dr: Try deleting everything in the web cache folder when GoG is closed. I believe it is located here: C:/ProgramData/GOG.com/Galaxy/webcache. It might cause gog to take longer to open back up, as gog caches the images/thumbnails for various games.

Edit: seeing you tried that already, you could try that in combination with deleting the psn integration. That is located in %localappdata% somewhere, not at my pc rn, apologies. Then when you start up GoG, add the psn integration back by going to settings -> (sync) integrations and then add integration, and search for psn.

I deleted everything related to PSN + GOG that was on volume C: and then added it again inside Galaxy, but I'm still getting the same error. This isn't the only Galaxy integration I'm having issues with, so I switched over to Playnite a short time ago. So far I haven't had any major issues with it, it's more lightweight, has more integrations and I like how it's set up better, so I'll just stick with it instead of going back to Galaxy. Thanks for trying to fix it.

@juanimoli
Copy link

juanimoli commented Jul 26, 2022

Deleting the web cache in theory could fix the error. It might also explain why it suddenly worked for me. Web browsers cache (store) data so the next time you visit a website it can load more quickly. If you happen to cache bad or outdated security data, PSN could (and likely should, because most security measures know they can be cracked after a long enough time and therefore expire before that point) invalidate itself. I have no idea what data the gog galaxy browser is caching or how to prevent it from caching in the first place, though I'm inclined to think that's not something we could do anyway
Tl;Dr: Try deleting everything in the web cache folder when GoG is closed. I believe it is located here: C:/ProgramData/GOG.com/Galaxy/webcache. It might cause gog to take longer to open back up, as gog caches the images/thumbnails for various games.
Edit: seeing you tried that already, you could try that in combination with deleting the psn integration. That is located in %localappdata% somewhere, not at my pc rn, apologies. Then when you start up GoG, add the psn integration back by going to settings -> (sync) integrations and then add integration, and search for psn.

I deleted everything related to PSN + GOG that was on volume C: and then added it again inside Galaxy, but I'm still getting the same error. This isn't the only Galaxy integration I'm having issues with, so I switched over to Playnite a short time ago. So far I haven't had any major issues with it, it's more lightweight, has more integrations and I like how it's set up better, so I'll just stick with it instead of going back to Galaxy. Thanks for trying to fix it.

Are you sure you're deleting files from your current GoG installation? As I've said, from what I'm reading it sounds like you probably have or either two installations living in your system or just bad luck. If this isn't the case, then I'm afraid you will have to wait or use Playnite then. Hope any dev from GoG sees this.

@finkleroy
Copy link

Are you sure you're deleting files from your current GoG installation? As I've said, from what I'm reading it sounds like you probably have or either two installations living in your system or just bad luck. If this isn't the case, then I'm afraid you will have to wait or use Playnite then. Hope any dev from GoG sees this.

I deleted all the files on volume C: that are related to PSN and Galaxy. The only PSN files I left are related to Playnite, RPCS3 and Steam.

@mcgowan7
Copy link

mcgowan7 commented Jul 26, 2022 via email

@philou-felin
Copy link

philou-felin commented Aug 7, 2022

FYI I found a different tool that fills the need. So I don’t have to battle these unofficial plugins. I moved to “Playnite” Check it out. Works well.

I think I'll just make a spreadsheet. 😆

That being said, if GOG doesn't manage to support PSN anymore, this might be bad in the future, as people decide they don't really need GOG Galaxy, especially with offline installers... 🤷‍♂️

(sorry for multiple edits)
If GOG is not 100% working, and I still need Steam and EGS to launch games, why would I keep the launcher? I also have troubles with itchIO, and many games, especially on EGS, are not listed in GOG... 🤷‍♂️

@Destroy666x
Copy link

@juanimoli thanks, that worked for me.

@philou-felin your comment doesn't make much sense as:
a) GOG never really supported PSN. This is unofficial integration made by someone and then forked.
b) Lots of other integtrations still work fine. For me only PSN was and Rockstar is broken.
c) It's also a standalone launcher for GOG games.
It's not going anywhere because of lack of support for PSN...

@philou-felin
Copy link

@philou-felin your comment doesn't make much sense as: a) GOG never really supported PSN. This is unofficial integration made by someone and then forked. b) Lots of other integtrations still work fine. For me only PSN was and Rockstar is broken. c) It's also a standalone launcher for GOG games. It's not going anywhere because of lack of support for PSN...

Oh. Hey, I'm not wishing bad luck here. I was a bit annoyed, that is all. 😅 I knew this wasn't an official integration, but I didn't knew this was a fork from an existing/old integration.

@Cyberinfosys
Copy link

Runing GOG in compatible mode of Windows 8 can solve this problem.

@EartHQuakE1974
Copy link

Found a (at least for me) working solution @ GOG forum

Source: https://www.gog.com/forum/general_beta_gog_galaxy_2.0/playstation_connection_timed_out/page39

  1. Quit GOG Galaxy completely.

  2. In your browser log in at store.playstation.com, then go to https://ca.account.sony.com/api/v1/ssocookie and copy the npsso value.

  3. Open C:\Users<username\AppData\Local\GOG.com\Galaxy\plugins\installed\psn_\plugin.py in a text editor.

  4. Replace line 52 ("return NextStep("web_session", AUTH_PARAMS)" with the following line (make sure to get the indentation correct: there's 12 spaces in front of the line):

stored_cookies = {"npsso": ""}

This line follows the "if not stored_cookies:" line on line 51

  1. Save the file, restart Galaxy

  2. Go to the settings and reconnect the PSN plugin

So could we use this knowledge to create a valid pull request for the last release ? i am way out of my depth here, beeing a very rusty .Net developer i must admit.

greets, earth

@gnoling
Copy link

gnoling commented Sep 19, 2022

As far as working solutions go, the earlier advice regarding Web Cache is spot on. Once that is cleared, it'll reconnect without issue.

@pippo-san
Copy link

Now, for some reason, the guys at playnite are having the same issue, and they discovered that pressing "Trouble with login?" and then pressing the arrow button (previous page), will allow you to continue with the login, even with two-step autentication.

You can still replace the npsso value via code edit, but this one is easier :)

source: XenorPLxx/playnite-library-psn#5 (comment)

@KZeni
Copy link

KZeni commented Jan 10, 2023

@pippo-san I attempted this method of going to "Trouble with login?", going back via the arrow at the top left, and then try to log in (per #40 (comment)), but I still got the same/similar error as others:

A connection to the server could not be established.
(18.b172117.1673387691.912cbdb)

I do have two-factor enabled, but it gives the error before showing the two-factor prompt (it rejects / doesn't proceed when submitting the password.)

Meanwhile, doing what @EartHQuakE1974 detailed in #40 (comment) had me connected without ever seeing the login prompt after pressing connect (with it correctly connecting (then confirming it was correctly tied to my account & imported my library properly.) However, I'm left wondering how long this stays working before it needs to be given a new npsso value (then needing to repeat the editing of that python file with the new login cookie/auth value.)

So it seems there's still a valid workaround, but this really could/should be addressed formally. I'm not sure if there's a good way to have it do what #40 (comment) does behind the scenes or anything (with the normal login prompt not working properly). Otherwise, couldn't this be updated to outright ask for the npsso value as a form field (with a link to https://ca.account.sony.com/api/v1/ssocookie & some instructions so the person establishing the connection can get the value they need) so we avoid the login as part of this integration entirely (putting it on one's web browser to log in [which must work for Sony's service to be functional] while it automates what's otherwise currently done by editing that file.)

@pippo-san
Copy link

Otherwise, couldn't this be updated to outright ask for the npsso value as a form field (with a link to https://ca.account.sony.com/api/v1/ssocookie & some instructions so the person establishing the connection can get the value they need) so we avoid the login as part of this integration entirely (putting it on one's web browser to log in [which must work for Sony's service to be functional] while it automates what's otherwise currently done by editing that file.)

That's exactly what the guys at playnite are doing, the fact is that @FriendsOfGalaxy has been inactive for more than a year, and since he is the source for all the integrations available on galaxy we remain with an outdated mess right of the box.
I don't have time to look into it, if everyone else want to replace the login with just a field asking for the npsso go and do it :)

Anyway, once connected you won't have to retrieve the npsso value for quite a long time (like months, don't know when expires)

@s0ulmirr0r
Copy link

The npsso trick doesn't seems to work anymore, i can't connect to the server, maybe they changed the login url. Can someone verify? Thanks

@KZeni
Copy link

KZeni commented Jan 13, 2023

@s0ulmirr0r Going to https://ca.account.sony.com/api/v1/ssocookie returned my npsso value without issue just now, or is there a different part of the process that's breaking? Also, I did just use that for both the GOG .py file edit workaround from above a few days ago & with Playnite just yesterday without issue. GOG still shows it as connected & syncing integrations gave no errors just now, too.

@s0ulmirr0r
Copy link

@s0ulmirr0r Going to https://ca.account.sony.com/api/v1/ssocookie returned my npsso value without issue just now, or is there a different part of the process that's breaking? Also, I did just use that for both the GOG .py file edit workaround from above a few days ago & with Playnite just yesterday without issue. GOG still shows it as connected & syncing integrations gave no errors just now, too.

My bad, i found the issue, there was a duplicate integration called playstation, deleted it and now the correct one (psn) is working with the npsso. I thought something has changed in the connection when i got the error, but it was my fault. Thanks anyway Kzeni, glad that the trick still works

@BaumherA
Copy link

BaumherA commented Mar 16, 2023

Been a while since I've looked at this; finally logged back in to GOG and it reared its ugly head again. Seems PlayNite is having the same issue and has a copypasta workaround. Their solution was to avoid the API entirely and have you copy and paste the NPSSO directly into a text field instead of scraping it from the URL. This comment explains why you'd occasionally be able to login before. The simple explanation: when you login to PSN, it can either go directly to PSN or to Akami, which acts as a middleman to prevent bots. Akami does not like GoG's browser (which i believe is because GoG's browser is outdated), and fails.

The workaround I'm looking into is to avoid GoG's integrated browser entirely but still use the API. Some integrations of other applications will open your dedicated browser and do authentication there, then return to the app if it succeeds. Off the top of my head, i believe PayPal does this when opened from some mobile apps. I think i recall it doing this with EA Store (or whatever Origin is called now) on PC as well. It's not really how GoG's API is intended for use, but it could work. NGL i'm not really familiar with doing this (the whole point of GoG API was to do it for you), but we're basically doing OAuth already, so if there's a python library that can do an OAuth request in an external browser and keep the cookie jar, it'd solve this. The same approach could be used for PlayNite as well, except in C#, of course.

@joerg-nafcom
Copy link

I have the same issue and it appears the workarounds suggested here do not work for me

@ashleydb
Copy link

ashleydb commented May 5, 2023

I wanted to try some of these workarounds in GOG Galaxy on Mac, but I can't find plugin.py. Closest I can find is:

/Users/Shared/GOG.com/Galaxy/Storage/plugins/psn_38087aea-[blah blah blah]-storage.db
Trying to open that it seems to be binary and doesn't show anywhere to add the npsso.

I also checked here, but it only contains two folders; Epic and Xbox
/Applications/GOG Galaxy.app/Contents/Resources/Plugins

Any hints?

@ABaumher
Copy link

ABaumher commented May 6, 2023

@ashleydb Try ~/Library/Application\ Support/GOG.com/Galaxy/plugins/installed

Apparently HOME/Library/Application Support is the macOS equivalent of %localappdata%

@ashleydb
Copy link

ashleydb commented May 6, 2023 via email

@ABaumher
Copy link

ABaumher commented May 6, 2023

Odd. That's where the documentation says it should be. Do you have any other extensions (steam, uplay, etc)? If so, are they in that folder?

Edit: Do you have a custom home path? IIRC macOS has HOME in a user folder, but you can configure that. Apologies, the last time i worked with macs was OSX (I think Big Sur? idr El Capitan, so 2016. Geez, that was a while back. ). I'm going to need a VM of it to test the steam plugin, which is catestrophically broken for anyone not lucky enough to have signed in before steam changed the authentication. So i might be able to find it in a little bit, but i'm guessing you'd rather not wait that long

@ABaumher
Copy link

ABaumher commented May 6, 2023

can you do a find or grep command from terminal? Grep searches the contents of the files and would be slower, but it's the one i'm familiar with.

grep -rn "class ProtocolClient" or
find "protocol_client.py" from whatever directory will search the most of your computer.
Edit: you can specify the target folder to search with -f <target/folder/location> in find

@ashleydb
Copy link

ashleydb commented May 8, 2023

I used this:
find / -name "protocol_client.py"
Which made me realize I was being dumb and ~/Library is within my User directory, but hidden. So, yes I do have this:
/System/Volumes/Data/Users/<username>/Library/Application Support/GOG.com/Galaxy/plugins/installed/
And there is a PSN folder in there with a plugin.py.
I'll try that. Thanks for the pointers.

@ashleydb
Copy link

ashleydb commented May 8, 2023

Can confirm @EartHQuakE1974's post above still works, even for my PSN account with 2FA enabled.

I just did it with GOG Galaxy version 2.0.62 (26) on an M1 Mac, editing this file using the Terminal (since Library seems to be a hidden folder):
/Users//Library/Application Support/GOG.com/Galaxy/plugins/installed/psn_38087aea-3c30-439f-867d-ddf9fae8fe6f/plugin.py

@Sin-Shadow-Fox
Copy link

Found a (at least for me) working solution @ GOG forum

Source: https://www.gog.com/forum/general_beta_gog_galaxy_2.0/playstation_connection_timed_out/page39

1. Quit GOG Galaxy completely.

2. In your browser log in at store.playstation.com, then go to https://ca.account.sony.com/api/v1/ssocookie and copy the npsso value.

3. Open C:\Users<username\AppData\Local\GOG.com\Galaxy\plugins\installed\psn_\plugin.py in a text editor.

4. Replace line 52 ("return NextStep("web_session", AUTH_PARAMS)" with the following line (make sure to get the indentation correct: there's 12 spaces in front of the line):

stored_cookies = {"npsso": ""}

This line follows the "if not stored_cookies:" line on line 51

5. Save the file, restart Galaxy

6. Go to the settings and reconnect the PSN plugin

So could we use this knowledge to create a valid pull request for the last release ? i am way out of my depth here, beeing a very rusty .Net developer i must admit.

greets, earth

HTTP Status 429 – Too Many Requests

Type Status Report

Description The user has sent too many requests in a given amount of time ("rate limiting").
Apache Tomcat/9.0.34

@Kenyiro34
Copy link

Kenyiro34 commented May 10, 2024

https://web.np.playstation.com/api/session/v1/signin?redirect_uri=https://io.playstation.com/central/auth/login%3FpostSignInURL=https://www.playstation.com/%26cancelURL=https://www.playstation.com/&smcid=web:pdc

Helo guys still got problem i got wrong lines i got 48 to 59

48 async def authenticate(self, stored_credentials=None):
49 stored_cookies = stored_credentials.get("cookies") if stored_credentials else None
50 if not stored_cookies:
51 return NextStep("web_session", AUTH_PARAMS)
52
53 auth_info = await self._do_auth(stored_cookies)
54 return auth_info
55
56 async def pass_login_credentials(self, step, credentials, cookies):
57 cookies = {cookie["name"]: cookie["value"] for cookie in cookies}
58 self._store_cookies(cookies)
59 return await self._do_auth(cookies)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests