Closed GreekWiz closed 2 years ago
It is perhaps a workaround if you are so lucky that you are able to login on another PC. In my case, I'm not able to login on my Windows laptop or MacBook Pro. So three devices without any luck of logging in. Regarding getting the cookies-popup, go to %appdata% and remove the files "Cookies*" in the folder playstationdiscord. (%appdata%\Roaming\playstationdiscord).
In my case I was only able to log in on older version (which is pointless in itself as I use ps5 most of the time), backup %appdata%/PlayStationDiscord
(just in case if it signs me out), then update to 3.2.0. It did notify me it needs me to log in again, but after closing this popup app stayed logged in, it also persist reboots so I'm fine for now.
edit: this method might require few tries, didn't work week ago, but today it did.
Is there a possible fix for a Mac? I don't have another computer to use and I've tried uninstalling and reinstalling as well as going into settings and allowing popups for cookies but am still getting the same error.
Some reports are saying that you should try again on a later date. Example one week later. I'm going to give it a new try in 7 days, then 10 and so on.
not sure if this is helpful - but macOS Big Sur/PS5 here. Have been trying to login for over a week. Tonight, I re-downloaded and instead of uninstalling I clicked "replace" when I went to copy the application file over. Once installed, I opened it, typed in my password and the application started to hang. After 2 min I forced closed, reopened and I was automatically logged in. I did not have to input any captcha, just opened to my profile and online status. Not sure if a fluke or my weird way of installing helped me at all but thought I would share because it does seem to be hit or miss.
Thanks for the updates here--it didn't work for me for many weeks, but now just logged in and it works, so maybe whatever the issue it's starting to resolve.
@Tustin anyone help out on this repo? Just found this project. Been splitting time b/w PC and PS5 so love this idea! I'm willing to help debug this issue. Shoot me an email with some context if you need some extra cycles from fellow dev :)
@mdaum, the easiest way to get in touch with Tustin is to contact him directly on Twitter or reply to his tweet 👍
I've had a lot of people asking me about hot to fix the connection issue when trying to login with PlayStationDiscord.
Unfortunately this is an issue with Sony's login form and not necessarily an issue with the program. The error occurs when Sony thinks you are a bot.
I've tried to fix this issue numerous times with no luck. It's hard to figure out what exactly they're detecting. It also sometimes will randomly work while for others they are never able to login
Originally posted by @V33m in https://github.com/Tustin/PlayStationDiscord/issues/156#issuecomment-827786315
welp: https://www.sie.com/en/blog/announcing-playstations-new-partnership-with-discord/ this could have something to do with the increased Bot blocking 👀
I'm currently developing my own Discord Rich Presence. I've made a proxy that has no issues when connecting and signing into PSN so I am confident that my implementation won't have this issue. It's not yet ready for release, but after spending countless hours over the past few weeks I am pretty confident in how I'm handling the sign-in.
Though with this new partnership, is it worth continuing development? I'm not sure.
Though with this new partnership, is it worth continuing development? I'm not sure.
It highly depends on how much more work is needed for a release the public can use. We won't have any PS and Discord integration before early 2022. So there are so months until that will happen. If you are thinking about thrashing the project, it would be awesome if you could help Tusin to implement your solution on how to login 👍
not sure if this is helpful - but macOS Big Sur/PS5 here. Have been trying to login for over a week. Tonight, I re-downloaded and instead of uninstalling I clicked "replace" when I went to copy the application file over. Once installed, I opened it, typed in my password and the application started to hang. After 2 min I forced closed, reopened and I was automatically logged in. I did not have to input any captcha, just opened to my profile and online status. Not sure if a fluke or my weird way of installing helped me at all but thought I would share because it does seem to be hit or miss.
Same here, Big Sur/PS5 @oxytocins what do you mean by replacing the app file ?
Yeah. this has been bugging me since I cant use an earlier version cause it doesn't include PS5 support. kind of irritating.
Though with this new partnership, is it worth continuing development? I'm not sure.
It highly depends on how much more work is needed for a release the public can use. We won't have any PS and Discord integration before early 2022. So there are so months until that will happen. If you are thinking about thrashing the project, it would be awesome if you could help Tusin to implement your solution on how to login
Alright, well I'll continue development. I should be able to create builds for Linux, Windows and macOS. Only problem I forsee right now is how to send out the API proxy. I could host the proxy on my domain but Sony sends the login details in plain text which is a security issue if I do host it. The proxy doesn't extract that particular information at all but there would be nothing stopping someone from editing a few lines of code to do so if they got into the server.
The only other alternative is to deploy a proxy service alongside the main app. Not sure how best to handle this though.
all the sign in issues would be fixed if the playstation log in page opened in the default browser instead of electron because electron breaks certain login APIs including sony's and google's.
I was able to work around this issue by running PlayStationDiscord.exe in compatibility mode for Windows 7.
None of the workarounds in this thread worked for me, except for trying 3.1.2 instead of the most recent 3.2.0. I've also noticed that the login screen in 3.1.2 looks different than the one in 3.2.0
The only way I managed to login was to try every 5-7 days until it eventually passed. Hopefully future versions will use the default browser to login given API related issues.
There is a really easy fix for this. The base userAgent used on app.ts line 114 should be updated to something less generic. This resolved my issue immediately.
None of these working for me
None of these working for me
Ty updating the user agent on line 114 to this. This is a generic Firefox agent for the latest version. Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
@CodyRWhite can you give me a hand to update this i am not as savy as you? where would i need to find the "user agent" to update the line? sorry for being a noob
@CodyRWhite can you give me a hand to update this i am not as savy as you? where would i need to find the "user agent" to update the line? sorry for being a noob
Hey yeah so I am running this as a compile version, I am not installing from the released binaries. If you are trying to make this change on the released binaries I am not sure how to update this yes.
However if you are pulling the git and compiling your self see below
Development Branch - Line 109 - https://github.com/Tustin/PlayStationDiscord/blob/development/src/app.ts
loginWindow.loadURL(store.get('legacy', false) ? v2.loginUrl : v3.loginUrl, {
userAgent: 'Mozilla/5.0'
});
Update
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0'
Master Branch - Line 114 - https://github.com/Tustin/PlayStationDiscord/blob/master/src/app.ts
loginWindow.loadURL(sonyLoginUrl, {
userAgent: 'Mozilla/5.0'
});
Update
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0'
Then recompile and run.
Updated the above, depending on what branch you are compiling.
what program or how did you recompile the master branch? ive made the changes in the master
Updated the above, depending on what branch you are compiling.
@CodyRWhite Is there a way that you could upload an .exe file of the fixed version somewhere? I'm not very savy, and I can't figure out how to recompile everything after updating the base userAgent used on app.ts.
Updated the above, depending on what branch you are compiling.
@CodyRWhite Is there a way that you could upload an .exe file of the fixed version somewhere? I'm not very savy, and I can't figure out how to recompile everything after updating the base userAgent used on app.ts.
https://github.com/boozerboozeman/PlayStationDiscord/releases/tag/v3.2.0-1 here you go, mate.
I think it's fixed now, at least on Windows thanks anyway
I think it's fixed now, at least on Windows thanks anyway
@Copimox Not really, still had an issue. I forked it, fixed the user agent and it works now. I opened a pr there (https://github.com/Tustin/PlayStationDiscord/pull/180) hopefully it gets merged
I think it's fixed now, at least on Windows thanks anyway
@Copimox Not really, still had an issue. I forked it, fixed the user agent and it works now. I opened a pr there (#180) hopefully it gets merged
I've merged your PR but I have experimented with User Agent changes in the past with not much luck. The same issue arises where it works for some but not others. Unfortunately Sony/Akamai do more sanity checking than the user agent.
Strangely though, the remote play Windows program seems to function fine. I've tried reverse engineering that program and it doesn't do anything special other than use the builtin C# WebView. My conclusion was that Electron chromium is injecting some custom stuff that triggers the bot check (but only on some computers/users?) and makes it throw the error.
I think it's fixed now, at least on Windows thanks anyway
@Copimox Not really, still had an issue. I forked it, fixed the user agent and it works now. I opened a pr there (#180) hopefully it gets merged
I've merged your PR but I have experimented with User Agent changes in the past with not much luck. The same issue arises where it works for some but not others. Unfortunately Sony/Akamai do more sanity checking than the user agent.
Strangely though, the remote play Windows program seems to function fine. I've tried reverse engineering that program and it doesn't do anything special other than use the builtin C# WebView. My conclusion was that Electron chromium is injecting some custom stuff that triggers the bot check (but only on some computers/users?) and makes it throw the error.
Thanks for merging it! I have been using your program for quite a while and yes that error is pretty random, only people to blame are Sony and Akamai as you stated. Electron causes some issues with some APIs, which is weird because at the end of the day it is just a chrome tab? I wonder what kind of tweaking they have done that cause issues. I'll have a look at it I think. Thanks again, really appreciate your work Tustin.
Updated the above, depending on what branch you are compiling.
@CodyRWhite Is there a way that you could upload an .exe file of the fixed version somewhere? I'm not very savy, and I can't figure out how to recompile everything after updating the base userAgent used on app.ts.
https://github.com/boozerboozeman/PlayStationDiscord/releases/tag/v3.2.0-1 here you go, mate.
after installing, testing, it doesnt dectect when your online, tested with ps5,ps4,psvita. just says im offline. hmmmm strange.
Updated the above, depending on what branch you are compiling.
@CodyRWhite Is there a way that you could upload an .exe file of the fixed version somewhere? I'm not very savy, and I can't figure out how to recompile everything after updating the base userAgent used on app.ts.
https://github.com/boozerboozeman/PlayStationDiscord/releases/tag/v3.2.0-1 here you go, mate.
after installing, testing, it doesnt dectect when your online, tested with ps5,ps4,psvita. just says im offline. hmmmm strange.
ok, update. uninstalled your above download, deleted all files did a restart, downloaded it again but didn't install it, after I installed remote play and PlayStation now, signed into both of them then installed your above download link.. everything is working across all systems. thanks for the updated .exe i was trying to build/recomplie myself and learn. still would like too for future use.
Updated the above, depending on what branch you are compiling.
@CodyRWhite Is there a way that you could upload an .exe file of the fixed version somewhere? I'm not very savy, and I can't figure out how to recompile everything after updating the base userAgent used on app.ts.
https://github.com/boozerboozeman/PlayStationDiscord/releases/tag/v3.2.0-1 here you go, mate.
after installing, testing, it doesnt dectect when your online, tested with ps5,ps4,psvita. just says im offline. hmmmm strange.
ok, update. uninstalled your above download, deleted all files did a restart, downloaded it again but didn't install it, after I installed remote play and PlayStation now, signed into both of them then installed your above download link.. everything is working across all systems. thanks for the updated .exe i was trying to build/recomplie myself and learn. still would like too for future use.
I should have mentioned that you could encounter some cache issues, I'm sorry that's on me. I'm glad you got it working, I saw you ask for a compiled version with the fix applied so I mostly compiled it for you to be honest. Enjoy!
Updated the above, depending on what branch you are compiling.
@CodyRWhite Is there a way that you could upload an .exe file of the fixed version somewhere? I'm not very savy, and I can't figure out how to recompile everything after updating the base userAgent used on app.ts.
https://github.com/boozerboozeman/PlayStationDiscord/releases/tag/v3.2.0-1 here you go, mate.
after installing, testing, it doesnt dectect when your online, tested with ps5,ps4,psvita. just says im offline. hmmmm strange.
ok, update. uninstalled your above download, deleted all files did a restart, downloaded it again but didn't install it, after I installed remote play and PlayStation now, signed into both of them then installed your above download link.. everything is working across all systems. thanks for the updated .exe i was trying to build/recomplie myself and learn. still would like too for future use.
I should have mentioned that you could encounter some cache issues, I'm sorry that's on me. I'm glad you got it working, I saw you ask for a compiled version with the fix applied so I mostly compiled it for you to be honest. Enjoy!
All good, it's all working as intended. I appreciate the help and the quick replies and fix too, still learning to do alot of this myself, it's fun for sure. Wish I started 20 years ago to be honest lol
I think it's fixed now, at least on Windows thanks anyway
@Copimox Not really, still had an issue. I forked it, fixed the user agent and it works now. I opened a pr there (#180) hopefully it gets merged
I've merged your PR but I have experimented with User Agent changes in the past with not much luck. The same issue arises where it works for some but not others. Unfortunately Sony/Akamai do more sanity checking than the user agent.
Strangely though, the remote play Windows program seems to function fine. I've tried reverse engineering that program and it doesn't do anything special other than use the builtin C# WebView. My conclusion was that Electron chromium is injecting some custom stuff that triggers the bot check (but only on some computers/users?) and makes it throw the error.
@Tustin Sorry I wasn't really trying to imply that the code was the issue. User agents and bot avoidance is a pain the the tail. Unless they offer exclusions or API's which well yeah not so much. One thing I noticed in your code, related to this topic is from what I can understand is that you are pulling "OAuth" from the login scenario. You are then passing that back on subsequent logins along with the Agent. While making the Agent more realistic will work for most users it may end up being detected again. What I am not really seeing that is not obvious to me is the inclusion on additional headers. I am quite new to Electron as this is the first app I have really played with it. However generally when I am impersonating a cached auth I try to impersonate everything not the bare min. Have you dabbled with passing additional header information in the attempt to override any Electron defaults creating a "unique ish" header profile? Hopefully that profile and the size of this user base would hit less bot traps.
Again the above is just mitigation of the error, unless you are able to get your hands on another platforms auth process or the support of sSony that is all we will be able to do is just mitigate this error.
I think it's fixed now, at least on Windows thanks anyway
@Copimox Not really, still had an issue. I forked it, fixed the user agent and it works now. I opened a pr there (#180) hopefully it gets merged
I've merged your PR but I have experimented with User Agent changes in the past with not much luck. The same issue arises where it works for some but not others. Unfortunately Sony/Akamai do more sanity checking than the user agent. Strangely though, the remote play Windows program seems to function fine. I've tried reverse engineering that program and it doesn't do anything special other than use the builtin C# WebView. My conclusion was that Electron chromium is injecting some custom stuff that triggers the bot check (but only on some computers/users?) and makes it throw the error.
@Tustin Sorry I wasn't really trying to imply that the code was the issue. User agents and bot avoidance is a pain the the tail. Unless they offer exclusions or API's which well yeah not so much. One thing I noticed in your code, related to this topic is from what I can understand is that you are pulling "OAuth" from the login scenario. You are then passing that back on subsequent logins along with the Agent. While making the Agent more realistic will work for most users it may end up being detected again. What I am not really seeing that is not obvious to me is the inclusion on additional headers. I am quite new to Electron as this is the first app I have really played with it. However generally when I am impersonating a cached auth I try to impersonate everything not the bare min. Have you dabbled with passing additional header information in the attempt to override any Electron defaults creating a "unique ish" header profile? Hopefully that profile and the size of this user base would hit less bot traps.
Again the above is just mitigation of the error, unless you are able to get your hands on another platforms auth process or the support of sSony that is all we will be able to do is just mitigate this error.
That's a good idea. There's no real reason that I omitted the other headers; that's just something I tend to do when testing stuff out just to see what exactly they want in the headers. I can always try to do that to see if it helps at all. I can't remember if that's something I tried before or not.
I an also agree that changing the User-Agent won't help at all. I've spend the last couple months reverse engineering how Sony telemetry and how the Arkose Labs fraud protection works and its probably the most in depth client checking I have ever seen. Checking the User-Agent is just the start, it also checks whether certain functions are available in certain environments such as WebView which will plain just fail to sign in as it is missing so much stuff. I only just cracked getting it working on WebView last weekend which is awesome. Still have a bit to go but I am hoping to get a build of my client out to you guys soonish (I have graduated from university now so have way more free time).
I will say though, that if stuff hasn't properly been spoofed, your IP can get a temporary sign in ban (has happened to me numerous times throughout testing), also it can lead to them blocking the invalid client string. Plus Sony and Arkose do update and switch around their code a fair bit so it requires an advanced amount of checking to confirm and spoof stuff. Based on my research their services store tokens of compatible clients and if your clients generated token does not match the token on their end, you won't get in.
Does anyone have a macOs fix for this? And is it depending on the update the mac has?
There is a really easy fix for this. The base userAgent used on app.ts line 114 should be updated to something less generic. This resolved my issue immediately.
Could you please explain how you fixed it? I did not quite understand. (preferably in normal language cuz I am not experienced in coding etc.)
Just an update on my end, I've successfully made an alpha quality client. Game icons get automatically uploaded to Discord when a new game is detected, the Discord Application name is also automatically set to the currently playing game. Currently works only for PS4 and PS5, but am working on PS3 and Vita support. Hoping to release a version in the next few weeks after its a little bit more stable. I might need some testers first before I release it to everyone.
As far as source code goes, I'm going to open source it when its stable with the exception of the config I developed for my custom build proxy.
macOS should be supported but at this time I don't have a way to compile for that platform so only Linux and Windows for now. If anyone does want to test let me know, and I'll send you an email once a test version is ready.
Example picture of myself playing on PS5 and the game showing on Discord:
Just an update on my end, I've successfully made an alpha quality client. Game icons get automatically uploaded to Discord when a new game is detected, the Discord Application name is also automatically set to the currently playing game. Currently works only for PS4 and PS5, but am working on PS3 and Vita support. Hoping to release a version in the next few weeks after its a little bit more stable. I might need some testers first before I release it to everyone.
As far as source code goes, I'm going to open source it when its stable with the exception of the config I developed for my custom build proxy.
macOS should be supported but at this time I don't have a way to compile for that platform so only Linux and Windows for now. If anyone does want to test let me know, and I'll send you an email once a test version is ready.
Example picture of myself playing on PS5 and the game showing on Discord:
I would love to test this, this looks amazing.
Just an update on my end, I've successfully made an alpha quality client. Game icons get automatically uploaded to Discord when a new game is detected, the Discord Application name is also automatically set to the currently playing game. Currently works only for PS4 and PS5, but am working on PS3 and Vita support. Hoping to release a version in the next few weeks after its a little bit more stable. I might need some testers first before I release it to everyone.
As far as source code goes, I'm going to open source it when its stable with the exception of the config I developed for my custom build proxy.
macOS should be supported but at this time I don't have a way to compile for that platform so only Linux and Windows for now. If anyone does want to test let me know, and I'll send you an email once a test version is ready.
Example picture of myself playing on PS5 and the game showing on Discord:
woah woah please realse the source code soon..!
Just an update on my end, I've successfully made an alpha quality client. Game icons get automatically uploaded to Discord when a new game is detected, the Discord Application name is also automatically set to the currently playing game. Currently works only for PS4 and PS5, but am working on PS3 and Vita support. Hoping to release a version in the next few weeks after its a little bit more stable. I might need some testers first before I release it to everyone.
As far as source code goes, I'm going to open source it when its stable with the exception of the config I developed for my custom build proxy.
macOS should be supported but at this time I don't have a way to compile for that platform so only Linux and Windows for now. If anyone does want to test let me know, and I'll send you an email once a test version is ready.
Example picture of myself playing on PS5 and the game showing on Discord:
Please let me know when you release for windows
Just an update on my end, I've successfully made an alpha quality client. Game icons get automatically uploaded to Discord when a new game is detected, the Discord Application name is also automatically set to the currently playing game. Currently works only for PS4 and PS5, but am working on PS3 and Vita support. Hoping to release a version in the next few weeks after its a little bit more stable. I might need some testers first before I release it to everyone.
As far as source code goes, I'm going to open source it when its stable with the exception of the config I developed for my custom build proxy.
macOS should be supported but at this time I don't have a way to compile for that platform so only Linux and Windows for now. If anyone does want to test let me know, and I'll send you an email once a test version is ready.
Example picture of myself playing on PS5 and the game showing on Discord:
Can't wait for this one!😁
App only shows offline even when my PS4 is online and running a game. Please, fix it!😥
Updated the above, depending on what branch you are compiling.
@CodyRWhite Is there a way that you could upload an .exe file of the fixed version somewhere? I'm not very savy, and I can't figure out how to recompile everything after updating the base userAgent used on app.ts.
https://github.com/boozerboozeman/PlayStationDiscord/releases/tag/v3.2.0-1 here you go, mate.
just to know, is there any macOS fixes?
App only shows offline even when my PS4 is online and running a game. Please, fix it!😥
this is happening to me too
App only shows offline even when my PS4 is online and running a game. Please, fix it!😥
this is happening to me too
it is not working for me either I'm on version 3.2.0
App only shows offline even when my PS4 is online and running a game. Please, fix it!😥
this is happening to me too
it is not working for me either I'm on version 3.2.0
I found a weird workaround, if you download the 3.2.0-1 version and then download 3.2.0 over 3.2.0-1 it should start working as you’ll still be logged in. Not 100% if that’s what did it but it’s the only thing I did. Fresh install of 3.2.0-1 and download 3.2.0 without deleting 3.2.0-1.
Sorry for labeling this as a bug, there is not many options for me to select.
I have been struggling like others for months trying to figure out why I could not get past this "a connection to the server could not be established. (18.d8655f.1619090663.6b2e161)" error, and I still have not figured it out, but I did come up with a workaround that worked for me.
Prior to trying this out, I had read up on how it seems to be tied to the white bar on the log in screen needing to allow cookies for it to possibly work. I never got that white bar, no matter how many times I tried uninstalling and cleaning the program from my system. I thought it might have been a pop up blocker, tried disabling all those, still nothing.
I finally gave up and installed PlayStation Discord on a laptop that I had not tried to install it on before. 3.2.0 worked first time. I was able to log in, get the CAPTCHA and 2FA.
I was glad it work, however it was not ideal for me. I wanted this to work on my Computer that I used daily and had Discord installed.
Once I had logged in to the point I know it was working (Discord was not installed on laptop), I decided to try and make it work on my PC again.
I thought to myself, why not just moved everything over to the other PC, maybe the keys or whatever it needed would transfer and work. Low and behold, once I moved all the files over, I started up PlayStation Discord 3.2.0 and poof, I was Logged in.
Here is what I did. This is overkill and maybe someone smarter than me can tell us the one or two files needed as opposed to moving everything over.
I closed out PlaystationDiscord on both PC's (Both must have 3.2.0 installed)
I then copied entire folders (all files) to a blank US I had. All the folders went into the root folder for ease. ----- Folder copied: Programs Files\PlayStationDiscord ----- Folder copied: Appdata\Roaming\playstationdiscord
The following are probably not needed, but I copied them anyways: ----- Folder copied: Appdata\Local\playstationdiscord-updater ----- One single file copied: com_tustin_playstationdiscord - This file will be in a folder called Appdata\Local\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\LocalState\AppIconCache\125
Important: the 125 folder will probably be different on your PC, mine was 100 on destop and 125 on laptop. There is only one that matches this path (except the number) and you will find the existing com_tustin_playstationdiscord file.
Taking the USB stick over to my Desktop, I carefully highlighted all the folders (individually and one at a time) , selected copy (so a copy remains on USB stick in case needed again) and did an overwrite on the existing files.
Once all four sections were done, I started the PlayStationDiscord App and I was already logged in.
I am sure this is overkill, and in fact only a couple of files are needed for the keys/log in part, but thought this would be a decent starting point to try and help someone get it working.
I realize some will not have a second PC/Laptop, however maybe you can run a VM or a dual boot for a fresh Windows install to get the files needed and then delete it,.
Regardless, I realize this is pretty long winded, but I was hoping to explain so anyone could do it.
Good Luck, I will check back to see if anyone knows what couple of files (as opposed to entire folders of files) are needed, so it can be made easier.