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

"A connection to the server could not be stablished" / "The connection to the server timed out." #7

Open
Rulqu opened this issue Nov 22, 2019 · 64 comments
Labels
bug Something isn't working galaxy Issue that requires changes in GOG Galaxy

Comments

@Rulqu
Copy link

Rulqu commented Nov 22, 2019

I get an error when trying to login with this integration but login with browser and playstation works fine.
image

@FriendsOfGalaxy
Copy link
Owner

FriendsOfGalaxy commented Nov 25, 2019

This sometimes happen, I'm not sure why and if this error description is valid. Last time it had happen to me PSN backend had general problems.

For now, please try again. Once you authenticate, it should be fine.

@branflaker
Copy link

I am also getting this error as of approximately 12 hours ago. It's not the usual rate limiting applied to account logins. I simply cannot log in through the integration. I have confirmed that others can log in, but I cannot.

@Rulqu Did this ever resolve for you?

@Rulqu
Copy link
Author

Rulqu commented Dec 10, 2019

Didn't work yesterday. Was about to comment about it today but forgot. Now it works for reasons unknown to me.

@branflaker
Copy link

branflaker commented Dec 10, 2019

Thank you for your input. Over two weeks before it started working? I can't use the integration (or test changes to the PS3 branch) until it's resolved. Gotta figure something out...

I tried logging in with the exact same LOGIN_URL used by the integration (I logged the value to a file), but it still failed. What's the difference between logging in via the browser and logging in via GOG? A user agent string maybe?

EDIT: I've also updated my password and enabled 2FA. Made no difference.

@FriendsOfGalaxy
Copy link
Owner

What's the difference between logging in via the browser and logging in via GOG?

@branflaker I've tried to use different requestID but for the first time it made no difference. But now I cannot reproduce the problem - maybe you will have more luck?

OAUTH_LOGIN_URL = OAUTH_URL_BASE + "?requestID=external_request_e0002664-7e12-474b-ba44-495683d32d3c" \

@branflaker
Copy link

It's working again -- not sure if it was something server-side on PSN or if it was because I deleted the web cache for GOG.

I did try a different request ID too, before. 😄

@branflaker
Copy link

I just got the same error again. I deleted the contents of the C:\ProgramData\GOG.com\Galaxy\webcache\common directory and it started working again immediately.

I wonder what the exact issue is and if we can prevent it from occurring by flushing some of the webcache.

@FriendsOfGalaxy
Copy link
Owner

That's interesting. I wouldn't expect this because it looks like internal GalaxyStorage folder and logging into psn do not changed any file there for me, but... who knows. Next time try to delete file by file!

@HavoxYT
Copy link

HavoxYT commented Apr 7, 2020

The same issue is happening to me. I waited a week, reinstalled the plugin a few times, tried the new version, and tried deleting the cache like was suggested here. It still doesnt work for me. I get the same A connection to the server could not be established. (18.c5a83817.1586275815.851613be)" error

@HavoxYT
Copy link

HavoxYT commented Apr 8, 2020

Ok i was just able to login. The only difference I made was getting a new Wifi Adapter so maybe it has something to do with that. Maybe try logging in with ethernet if it's avalible or updating drivers

@Tom60chat
Copy link

Same problem
A connection to the server could not be established.
(18.3c933554.1586371548.3cb41817)

I exit GOG delete C:\ProgramData\GOG.com\Galaxy\webcache\common, restart and same error but not the same code.

A connection to the server could not be established.
(18.67b71002.1586371787.7236951)

But i can connect to the PSN website.

@Tom60chat
Copy link

I tried again today and now it works.

@FriendsOfGalaxy
Copy link
Owner

Looks like it is known PSN problem: https://gamingph.com/2019/11/how-to-fix-ps4-a-connection-to-the-server-could-not-be-established/
They advice to use VPN

@ShaunV2
Copy link

ShaunV2 commented Apr 10, 2020

You don't need a VPN to login to PSN.

@BSE97
Copy link

BSE97 commented Apr 17, 2020

I have the same issue now since over 24h.
I always get the error A connection to the server could not be established.
(18.14f01602.1587152097.308b1f70)

But I can login fine when trying any browser to login.

@Amillennialist
Copy link

Same problem here.

@EustaceCS
Copy link

A connection to the server could not be established.
(18.57751602.1587291283.63ef36)
Absolutely pure Win10 + Galaxy install (it coincided that I reinstalled Win yesterday), Ethernet/xPON, works in web browser (login successful) - fails to work through plugin.
:(

@simonebarbieri
Copy link

Same problem!

@FriendsOfGalaxy
Copy link
Owner

FriendsOfGalaxy commented Apr 24, 2020

Reproduced on older Chromium v74 while works in newer browser version. I've send request to Galaxy to update their inner browser version. It may help but not for sure.

Problem is because we're rejected with 403 while requesting auth cookie https://auth.api.sonyentertainmentnetwork.com/2.0/ssocookie

Akamai server blocks requests from older browser for some reason maybe because of SameSiteCookie policy, or CORS, or maybe because Akamai's anti-bot script does not like Galaxy browser.

  • Login works when user requests are handled by direct PSN server (nginx header)
  • Login does not work when requests are handled by Akamai's load balancer.

This is why it happen sometimes, not always.

Known workarounds:

  • use VPN
  • wait some time (like a day) and try to login again when there is smaller traffic.

@FriendsOfGalaxy FriendsOfGalaxy added bug Something isn't working galaxy Issue that requires changes in GOG Galaxy labels Apr 24, 2020
@Psebcool
Copy link

same issue

@ShaunV2
Copy link

ShaunV2 commented May 2, 2020

I'm now having this issue, can't login.
Then again it still can't seem to pull trophy data for one game.

@ghost
Copy link

ghost commented May 5, 2020

I'm also having this issue. I also find it odd that the password field clears immediately after I finish the captcha popup, and a few seconds later, the error code appears. Also, I've had to pass a Captcha every single time to log in. Though that may just be because Galaxy's browser isn't saving cookies, which would be understandable.

@branflaker
Copy link

I can only comment on my experience with this issue, but it's likely something employed on PSN's side, blocking excessive login attempts. It doesn't block based on IP, but likely on some identifying factor related to the authentication request, because there are times when I would get it in GOG but not in a browser.

@jed84
Copy link

jed84 commented May 7, 2020

Same issue.

Workarounds that didn't work for me:

  • using VPN
  • waiting some time (like a day) and trying to login again when there is smaller traffic
  • disableing 2FA

@ShaunV2
Copy link

ShaunV2 commented May 8, 2020

Still won't let me login, I don't use 2FA on my PSN account (doesn't even support it), I don't have 2FA on my GOG account and I have never used a VPN.

The issue is likely caused by the plugin itself and nothing PSN is doing since I have never had issues logging into PSN nor does PSN Profiles. It's also possible a GOG update broke the plugin from working correctly.

@MinusGabriel
Copy link

Same issue is happening to me. I'm using GOG 2.0.15.43

@MatheusVitor314
Copy link

I also had this problem, I upgraded to the recent version (v0.29) on GOG Galaxy 2.0.15 and now a new error has appeared
"The connection to the server timed out."
2020 05 12-15 21

@BSE97
Copy link

BSE97 commented May 12, 2020

Same happened to me too. I was connected, but after the update to 0.29 I got disconnected and get the same error: "The connection to the server timed out."

@Philippe23
Copy link

Someone provided a way to hack in a credential from a web-browser in the GoG Forums: https://www.gog.com/forum/general_beta_gog_galaxy_2.0/playstation_network_was_unable_connect/post148

@RMesado
Copy link

RMesado commented Jun 16, 2020

WOW! It worked!!

@Mlevin999
Copy link

For me, it just says "Plugin has crashed" when trying the method that Philippe23 suggested.

@Mlevin999
Copy link

Now it works, I just mistook the instructions.

@FriendsOfGalaxy
Copy link
Owner

FriendsOfGalaxy commented Jun 17, 2020

Someone provided a way to hack in a credential from a web-browser in the GoG Forums: https://www.gog.com/forum/general_beta_gog_galaxy_2.0/playstation_network_was_unable_connect/post148

To keep connection between Galaxy restarts, changed line should be:

stored_npsso = stored_credentials.get("npsso") if stored_credentials else "<your_npsso_here>"

@Philippe23

@FriendsOfGalaxy: There are hundreds (or more) of people having this issue right now. Can you give us a place to redirect our "me too's" to GoG?

https://mantis2.gog.com/

@FriendsOfGalaxy
Copy link
Owner

FriendsOfGalaxy commented Jun 17, 2020

Repasting workaround with "keep connection" change:

  • close GOG Galaxy if it's running at the moment
  • log in to https://store.playstation.com through your browser; if you were already logged in, log out first
  • after the login open this link: https://ca.account.sony.com/api/v1/ssocookie
    you'll get something like: {"npsso":"xxx"}
    where xxx is the npsso value
  • open windows explorer and enter the following into the address bar at the top and press enter
%LocalAppData%\GOG.com\Galaxy\plugins\installed\
  • open the psn_38087aea-3c30-439f-867d-ddf9fae8fe6f folder and edit the plugin.py file with your favourite text editor
  • go to authenticate method around line 49. it should look like this:
stored_npsso = stored_credentials.get("npsso") if stored_credentials else None
  • at the end, change None to "your npsso value here" for example:
stored_npsso = stored_credentials.get("npsso") if stored_credentials else "6oG1OcTODq8Jl8Bb8naWUSimh1sMktrL35op3uOnOUh4JpPDnUVkANHeKSVsuJ1D"

the quotation marks " " are important!

  • save the changes made to plugin.py and close the file
  • restart GOG Galaxy
  • try connecting with PSN again

@JhonStopMeNow
Copy link

JhonStopMeNow commented Jun 17, 2020

works very well, thank u !

@FriendsOfGalaxy
Copy link
Owner

Maybe this is a silly idea but, is it possible to redirect the login to an external navigator (Chrome, Edge, Firefox, ...) ??? In a navigator you can login without problems, maybe, idk

@RMesado it is nice idea, but plugin cannot fetch cookies from browser - it is basic browser security protection

We can use an external browser to get the access token, so could you provide a window or file that allows us to fill in access token manually?

@wenhan-wu
good idea. I just need to check if npsso from normal login to store.playstation.com has all required scopes. Or can someone confirm if achievements and all other plugin features works ok?

@ScottMontgomery
Copy link

I was already logged into PSN in my browser and the npsso value did not work. I had to log out and back in to get a working value FYI.

@elder-frog
Copy link

@FriendsOfGalaxy I try to login in Firefox with URL https://auth.api.sonyentertainmentnetwork.com/2.0/oauth/authorize?response_type=token&scope=capone:report_submission,kamaji:game_list,kamaji:get_account_hash,user:account.get,user:account.profile.get,kamaji:social_get_graph,kamaji:ugc:distributor,user:account.identityMapper,kamaji:music_views,kamaji:activity_feed_get_feed_privacy,kamaji:activity_feed_get_news_feed,kamaji:activity_feed_submit_feed_story,kamaji:activity_feed_internal_feed_submit_story,kamaji:account_link_token_web,kamaji:ugc:distributor_web,kamaji:url_preview&client_id=656ace0b-d627-47e6-915c-13b259cd06b2&redirect_uri=https://my.playstation.com/auth/response.html?requestID=external_request_e0002664-7e12-474b-ba44-495683d32d3c&baseUrl=/&returnRoute=/&targetOrigin=https://my.playstation.com&excludeQueryParams=true&prompt=login&tp_console=true&ui=pr you wrote in http_client.py, and replace stored_npsso with my token, now I can use the plugin to connect to psn. But it seems like only games library worked normally, trophies and friends still not work.

@JohnJonnyJohn
Copy link

JohnJonnyJohn commented Jun 17, 2020

@wenhan-wu Worked very well for me, thank you! Had a double issue. First the timeout problem. The second problem was, that my niece was logged in on my browser. Unfortunelly I used her npsso instead of mine. Gog galaxy couldn't disconnect the account of my niece. My second try with my own npsso wasn't working anymore. This 'solution' solved it for me.

@elder-frog
Copy link

@JohnJonnyJohn Are you logging in directly in your browser without using the OAUTH_LOGIN_URL in the http_client.py?

@JohnJonnyJohn
Copy link

JohnJonnyJohn commented Jun 17, 2020

I was logged in within the browser and had assigned your string to OAUTH_URL_BASE. It just worked, after I restarted Galaxy and clicked connect,

@gojensen
Copy link

it's login in just fine, but it's not getting the game library? is that another "connection" issue?

@TBthe1
Copy link

TBthe1 commented Jun 19, 2020

Also had this bug, using FriendsOfGalaxy's method got it working.
Sidenote: couldn't log in to the PSN on chrome, probably due to some installed extensions, had to use another browser to connect to the PSN to get the token.

@Toxe
Copy link

Toxe commented Jun 19, 2020

Someone provided a way to hack in a credential from a web-browser in the GoG Forums: https://www.gog.com/forum/general_beta_gog_galaxy_2.0/playstation_network_was_unable_connect/post148

I got the timeout as well when trying to login to PSN and this fixed it for me.

@v-new
Copy link

v-new commented Jun 22, 2020

I mean - WTF? Is it gonna work someday? As for now it's only frustrating and nothing else. It's not working. Period.

@masheleni
Copy link

I have tried to replace the browser in GOG Galaxy, but that just ends up breaking the app.
So, unless there's another way to authenticate to PSN other than the auth flow used currently in this plugin, I am afraid that this issue will most likely remain until GOG update their internal browser.
Only then, will be able to tell if that is the fix for this headache.

For the time being, I have attempted to write up very detailed instructions based off of the fix suggested on GOG here:
https://masheleni.github.io/gogpsn

Thank you @FriendsOfGalaxy for writing this plugin.

Here's hoping that a resolution to the timeout issue will be found soon.

In the meantime, try the manual workaround. Here's hoping it works for you all.

@gojensen
Copy link

gojensen commented Jun 25, 2020

not much help, it's not adding games to the gog library...
#13

@FriendsOfGalaxy FriendsOfGalaxy changed the title Cannot login throught the integration / "The connection to the server timed out." "A connection to the server could not be stablished" / "The connection to the server timed out." Aug 23, 2021
@zbir84
Copy link

zbir84 commented Aug 23, 2021

WARNING: EXCACT INSTRUCTION IS OUTDATED since 08.2021: - need to be adjusted to the flow. Any contributors welcomed

Repasting workaround with "keep connection" change:

  • close GOG Galaxy if it's running at the moment
  • log in to https://store.playstation.com through your browser; if you were already logged in, log out first
  • after the login open this link: https://ca.account.sony.com/api/v1/ssocookie
    you'll get something like: {"npsso":"xxx"}
    where xxx is the npsso value
  • open windows explorer and enter the following into the address bar at the top and press enter
%LocalAppData%\GOG.com\Galaxy\plugins\installed\
  • open the psn_38087aea-3c30-439f-867d-ddf9fae8fe6f folder and edit the plugin.py file with your favourite text editor
  • go to authenticate method around line 64. it should look like this:
stored_npsso = stored_credentials.get("npsso") if stored_credentials else None
  • at the end, change None to "your npsso value here" for example:
stored_npsso = stored_credentials.get("npsso") if stored_credentials else "6oG1OcTODq8Jl8Bb8naWUSimh1sMktrL35op3uOnOUh4JpPDnUVkANHeKSVsuJ1D"

the quotation marks " " are important!

  • save the changes made to plugin.py and close the file
  • restart GOG Galaxy
  • try connecting with PSN again

Updated for version 0.34: Follow instructions here, but instead of modifying line 64 modify line 49 in plugin.py where:
stored_cookies = stored_credentials.get("cookies") if stored_credentials else {"npsso":"<your npsso>"}
So basically copy paste the whole cookie from https://ca.account.sony.com/api/v1/ssocookie and paste it instead of None

Worked for me!

@mo35
Copy link

mo35 commented Aug 23, 2021

WARNING: EXCACT INSTRUCTION IS OUTDATED since 08.2021: - need to be adjusted to the flow. Any contributors welcomed
Repasting workaround with "keep connection" change:

  • close GOG Galaxy if it's running at the moment
  • log in to https://store.playstation.com through your browser; if you were already logged in, log out first
  • after the login open this link: https://ca.account.sony.com/api/v1/ssocookie
    you'll get something like: {"npsso":"xxx"}
    where xxx is the npsso value
  • open windows explorer and enter the following into the address bar at the top and press enter
%LocalAppData%\GOG.com\Galaxy\plugins\installed\
  • open the psn_38087aea-3c30-439f-867d-ddf9fae8fe6f folder and edit the plugin.py file with your favourite text editor
  • go to authenticate method around line 64. it should look like this:
stored_npsso = stored_credentials.get("npsso") if stored_credentials else None
  • at the end, change None to "your npsso value here" for example:
stored_npsso = stored_credentials.get("npsso") if stored_credentials else "6oG1OcTODq8Jl8Bb8naWUSimh1sMktrL35op3uOnOUh4JpPDnUVkANHeKSVsuJ1D"

the quotation marks " " are important!

  • save the changes made to plugin.py and close the file
  • restart GOG Galaxy
  • try connecting with PSN again

Updated for version 0.34: Follow instructions here, but instead of modifying line 64 modify line 49 in plugin.py where:
stored_cookies = stored_credentials.get("cookies") if stored_credentials else {"npsso":"<your npsso>"}
So basically copy paste the whole cookie from https://ca.account.sony.com/api/v1/ssocookie and paste it instead of None

Worked for me!

i can confirm that this works , cheers

@FriendsOfGalaxy
Copy link
Owner

Thanks for confirmation. Post updated

@Drawing12
Copy link

you can read this content if you have not solve issue, i think after this content your issue will be solved. https://www.shareway.today/how-to-fix-ps4-error/

@dan-r95
Copy link

dan-r95 commented Dec 14, 2022

For me it said Offline Retry. after I did the step in #7 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working galaxy Issue that requires changes in GOG Galaxy
Projects
None yet
Development

No branches or pull requests