JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
9.2k stars 496 forks source link

Cannot authenticate on twitch #991

Closed wonx closed 5 years ago

wonx commented 5 years ago

I configured all other libraries without any problem, but twitch does not seem to be working for me. In the Settings/Libraries menu, I select Twitch, I click on "Authenticate". I enter my username and password, the window closes... and nothing happens. The "Authenticate" button is still there saying "requires authentication".

Is this a known issue?

I am using the last playnite client (version 4.72) on Windows 10 64 bit.

JosefNemec commented 5 years ago

Can you try "Clear web cache" from "Advanced" settings menu to see if it fixes the issue?

wonx commented 5 years ago

Nope. I did that, I logged in all the services again, but Twitch didn't change its "Requires authentication" message like the others did. Btw, it's not a problem with the password, because if I enter a wrong password the login screen tell me so and asks me to re-enter it. If I enter the right password, the login screen just fades and goes back to playnite.

JosefNemec commented 5 years ago

Can you go to About menu and create diagnostics package for me please? Thank you

wonx commented 5 years ago

It told me to attach the following ID to the diagnostics package: fe4ea655-1d7d-45ac-b31e-90b2470f9e0c

Btw, the "About" option in the menu is not visible unless the scale is set to 125% or less. In my laptop, windows recommended the 150% scale (since I have a small screen, but with high resolution), and the "About" option was hidden.

JosefNemec commented 5 years ago

Can you post a screenshot of the scaling issue?

wonx commented 5 years ago

Sure: Windows scaling 150%: playnite scaling

Windows scaling 125%: playnite scaling 125

Windows scaling 100%: playnite scaling 100

JosefNemec commented 5 years ago

Can you please try it with this build? Try to authenticate and then create new diagnostics package with it. Thank you

wonx commented 5 years ago

I tried it, but I got exactly the same behavior: I enter my credentials, the login window fades away, and the "Requires authentication" text is still there. This is the diagnostics package id: 0e8755d8-ccf8-4d30-8edf-48bded630651

JosefNemec commented 5 years ago

Thanks for additional data, but I'm still quite clueless about what might be wrong. Can you please reproduce it again with this build and attach new diag. package? It's still going to fail, but I've added some additional diagnostics information to logs, to help with find out what's going on.

JosefNemec commented 5 years ago

Also I noticed some network related errors in logs, can you check if Playnite is allowed in your firewall if you use any?

wonx commented 5 years ago

I use the firewall that comes with windows, and just to make sure, I manually added Playnite to the list of permitted applications both for public and private networks. Still, no change. Anyway, all other library extensions are able to log in to their services respectively, so I don't believe it's a firewall issue.

JosefNemec commented 5 years ago

Can you please attack diag package from the last build a linked? As I said, it doesn't fix the issue but adds additional debug information that could help me find where the issue is.

mathieubruguier commented 5 years ago

Same issue here.

I went ahead and used the build you linked to reproduce the issue and here's the diagnostics package id: ec8957d5-d07a-4f69-a969-63ff3ef82709

Let me know if I can be of any help!

wonx commented 5 years ago

Sorry, I thought I had posted my results the other day. I created a diagnostics package using the debug built you linked with the following ID: f1d63eec-20e2-4163-b88f-48616c81d54b

JosefNemec commented 5 years ago

Do you by any change see CloudFare captcha page before the login window closes (it might be there just for a second)? I have not idea why the login doesn't work for you guys, Twitch API doesn't report any active session after login is performed, but I don't see any error why.

mathieubruguier commented 5 years ago

I don't remember seeing it. I do see Google's Captcha however 🤔 (but I fill it and confirm it without any issue) If it helps, I am using Cloudfare's DNS (1.1.1.1). Could that have something to do with it? I am also using Pi-Hole, but I tried turning it off and the same thing happens.

Let me know if I can help any more, I'd love to help you fix the issue.

wonx commented 5 years ago

No, I didn't see any captcha during the login process (either in playnite or in the twitch website). I also don't use any special DNS, just the ones by default assigned by my router.

relrod commented 5 years ago

I too am having this issue. Mostly fresh Win10 install, Playnite 4.74.

Happy to help in any way.

JosefNemec commented 5 years ago

I'm not sure I will be able to fix this without access to an account that's affected by this issue.

relrod commented 5 years ago

@JosefNemec You on IRC at all? I'd be happy to set something up and have you vnc/teamviewer/whatever into my system (or a VM if I can reproduce it there) and we can try to track it down if you have time and want to debug.

Armag3ddon commented 5 years ago

I can confirm this issue happening on my system. I'd be happy to help in any way possible.

JosefNemec commented 5 years ago

Thanks for offers to help with this. I have my hands full with finishing 5.0, so I won't be able to look into this more until that is released. I would contact you when I have some time debug this more.

Taralas commented 5 years ago

I can include a diagnostic package as well: f8688dbb-ba6a-4b9d-9df1-c0635ce4c2f8.

I can also include the following from the playnite.log

2019-05-22 12:15:27.3322|INFO:Importing games from Twitch plugin. 2019-05-22 12:15:27.3586|DEBUG:Found 0 installed Twitch games. 2019-05-22 12:15:27.7613|WARN:Failed to download Twitch library at first attempt.System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at TwitchLibrary.Services.AmazonEntitlementClient.GetAccountEntitlements(String accountId, String authToken) at TwitchLibrary.TwitchLibrary.GetLibraryGames() 2019-05-22 12:15:27.8248|ERROR:Failed to renew Twitch authentication.System.Net.WebException: The remote server returned an error: (503) Server Unavailable. at System.Net.HttpWebRequest.GetResponse() at TwitchLibrary.Services.TwitchAccountClient.RenewTokens(String authToken, String accountId) at TwitchLibrary.TwitchLibrary.GetLibraryGames() 2019-05-22 12:15:28.0626|ERROR:Failed to download Twitch library.System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at TwitchLibrary.Services.AmazonEntitlementClient.GetAccountEntitlements(String accountId, String authToken) at TwitchLibrary.TwitchLibrary.GetLibraryGames() 2019-05-22 12:15:28.0626|ERROR:Failed to import uninstalled Twitch games.System.Exception: Authentication is required. at TwitchLibrary.TwitchLibrary.GetLibraryGames() at TwitchLibrary.TwitchLibrary.GetGames() 2019-05-22 12:15:28.0626|INFO:Importing games from Uplay plugin. 2019-05-22 12:15:28.0626|DEBUG:Found 0 installed Uplay games. 2019-05-22 12:17:59.6832|ERROR:Service request error by proxy: Value cannot be null. Parameter name: source 2019-05-22 12:17:59.6882|ERROR:Failed to get patron list.System.Exception: Value cannot be null. Parameter name: source at Playnite.Services.BaseServicesClient.ExecuteGetRequest[T](String subUrl) at Playnite.Services.ServicesClient.GetPatrons() at PlayniteUI.ViewModels.AboutViewModel.get_PatronsList()

Looks like the API gateway is giving a 500 error in my case. This is after clearing the cache in the client.

Starman99 commented 5 years ago

I'm having this issue too. I didn't clear my web cache, but I did manually remove and add the twitch library importer back. I made a diagnostics package 92cf414d-ac10-455a-9796-88cd304bc549 and I noticed something else odd with this: for a split, fraction of a second, at the very end of the log in box closing, it shows a "Ray ID", whatever that is. I caught it with printscreen two separate times, one with half of the ID cut off. I hope this helps, because I honestly don't know if it will.

Full Ray ID

What it looks like

thinko commented 5 years ago

Same issue here, fresh install by a new user, can get through the auth challenge, but it never shows authenticated and never scrapes twitch library.

kernaldave commented 5 years ago

Having the same issue here, Not an fresh install, was working fine when I installed it, then it just stoped working. 9d8392db-1eae-4e49-bcb9-87ec8034ad89

thelukemarley commented 5 years ago

Having the exact same issue as everyone else, worked when I installed it.

f372cec0-fb08-4a5c-9c19-20956c742c8d

JosefNemec commented 5 years ago

Please don't post more of "I'm having the same issue". I'm well aware of the issue and I'll look into it.

vyrtualsynthese commented 5 years ago

Same issue here but I have two factor auth. And I am a twitch affiliate. Dunno if it helps you understanding the probleme origin.

pawie974 commented 5 years ago

some months ago twitch introduced two factor autentication: it'll send a sms to registered mobile in order to give access to the website the interface doesn't manage this step, so it actually doesn't complete the handshake for the authentication moreover, the login isn't remenbered in any of my browsers or PCs , even if I've flagged the option in the login prompt (the option to remember for 30 days), so it could be more troublesome to conserve the authentication after the first time

japzone1 commented 5 years ago

Just encountered this issue. I also have 2FA enabled on my Twitch account. Playnite never asks for my 2FA code, so could it be related to that?

amitz commented 5 years ago

2FA is disabled on my account, and still I'l have the same issue, so it's probably isn't that.

HunterZ commented 5 years ago

Has anyone found a workaround for this? I'm affected. I'm not using 2FA.

JosefNemec commented 5 years ago

There's no fix yet, I didn't have time to analyze this. The issue is clearly in Playnite, you won't be able to fix it without changes to Playnite itself. Something changed in Twitch's authentication process and Playnite must be updated.

Also as I said earlier, "I'm having the same issues" messages won't help anything, stop posting them.

HunterZ commented 5 years ago

I was asking if anyone had found a workaround, not whether it had been fixed.

networldsystems commented 5 years ago

Just ran across this issue. It was working without issue previously. A week or two ago I changed my Twitch username. Just tried updating Playnite today and encountered the issue.

I did notice something else a bit odd. Every time I try to import Twitch, the CEF log records issues with GOG: [0625/235717.481:INFO:CONSOLE(1)] "Access Token Client is duplicated!", source: https://www4-static.gog.com/js/frontpage2-5beaa36.js (1) [0625/235717.488:INFO:CONSOLE(1)] "EventBus is duplicated!", source: https://www4-static.gog.com/js/frontpage2-5beaa36.js (1)

Both entries are added every time I try to update Twitch. FWIW.

Thank you.

JosefNemec commented 5 years ago

Can somebody please test it with this build? DON'T copy it over your standard installation, it's based on 5.0 beta build and things are not final.

I had to completely change how the authentication works, you now have to have Twitch client installed because Playnite uses it for sign in process.

smurfslayer0 commented 5 years ago

Can somebody please test it with this build? DON'T copy it over your standard installation, it's based on 5.0 beta build and things are not final.

I had to completely change how the authentication works, you now have to have Twitch client installed because Playnite uses it for sign in process.

I haven't posted before but have been monitoring this thread since I'm having the same issue. Just tried the test build and it worked for me. The Twitch app popped up, I logged in, and it shows authentication successful. It imported all my Twitch games.

Byron1c commented 5 years ago

Can somebody please test it with this build? DON'T copy it over your standard installation, it's based on 5.0 beta build and things are not final.

I had to completely change how the authentication works, you now have to have Twitch client installed because Playnite uses it for sign in process.

This worked great for me too. I did not import from other libraries, but the Twitch library popped up the Twitch app, and authentication was complete. All of my Twitch games appeared in the library :D

Edit: I like the interface improvements too

Cydfrey commented 5 years ago

Can also confirm. I was already logged in to Twitch client and Playnite found it on its own, I had nothing to do. Thanks for the great work.

JosefNemec commented 5 years ago

Fixed in 5.1

Lupick commented 5 years ago

Ive just installed playnite v 5.6 and twitch client 8.0.8 and I cannot connect twitch library. always ask for auth even if already logged in twitch client

anyGould commented 3 years ago

Diagnositcs package ID: ec662230-0ae7-481f-8ef8-5a1fa16cbf97

Twitch was working fine previously, and then today gave this error: image

Went through the log-in to Twitch, but playnite doesn't seem to be recognizing it. (Which led me to this thread.)

networldsystems commented 3 years ago

I'm on Playnite 8.11 and just updated my Amazon Games without issue. I had done an all libraries update earlier today and double-checked for an error when I saw your report - no error. If you have an option to update Twitch, I think you might be using an older version of Playnite. I don't have a Twitch library, only Amazon Games.

FWIW Steve

On Monday, March 15, 2021, 8:01:46 PM CDT, anyGould ***@***.***> wrote:  

Diagnositcs package ID: ec662230-0ae7-481f-8ef8-5a1fa16cbf97

Twitch was working fine previously, and then today gave this error:

Went through the log-in to Twitch, but playnite doesn't seem to be recognizing it. (Which led me to this thread.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

anyGould commented 3 years ago

This morning Windows forced an update, but sadly it still doesn't work so we can't blame Microsoft. :)

Playnite is 8.11 and says it's up to date. Twitch app doesn't seem to want to admit what version it's running, but it doesn't seem to need an update either (hit the "check for updates" in menu but no feedback one way or the other).

On a hunch, downloaded and installed the Amazon Games app, and that authenticated first try, and after a bit of futzing to get it to stop trying to connect to Twitch, I seem to be up and running. Guess it was time to switch over, whether I liked it or not?

tl;dr - Twitch decided not to authenticate, but Amazon Games does.