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

0.15.2: Twitch-OAuth-Token doesn't work with LTG anymore #325

Closed
TheDromundKaas opened this issue Oct 4, 2016 · 5 comments
Closed

0.15.2: Twitch-OAuth-Token doesn't work with LTG anymore #325

TheDromundKaas opened this issue Oct 4, 2016 · 5 comments

Comments

@TheDromundKaas
Copy link

Description

A few weeks ago, Twitch started to require an OAuth token to watch Twitch with external tools. It could be generated by several tools. Once aquired, the token could be used on the command like to feed it into livestreamer, like this:

livestreamer --twitch-oauth-token THETOKEN THEURL QUALITY

LTG offers the same functionality, by adding the token to do the login. However, for a few days now, I cannot get it to work anymore. Starting LTG, it starts up an error page:

Error
There was an error while trying to display this page.
Name: HTTP Error
Message: Failed to load resource
Host: api.twitch.tv
Path: kraken/streams/summary

Switching to the "Games" tab, I need to either login or enter the token.

Expected / Actual behavior

Expected behavior:

Logging in using the "Sign in" button asks for Twitch connection permissions, then after accepting it, LTG works.

Actual behavior:

Accepting the permissions results in an empty page with

Authentication failed!
This window or tab can be closed now!

displayed. However, using the token generated by the process on the command line (feeding it into livestreamer), it works. However, it displays a short error message before working correctly:

C:\Users\Dromund Kaas>livestreamer --twitch-oauth-token THETOKEN https://www.twitch.tv/theenclase best
[cli][info] Found matching plugin twitch for URL https://www.twitch.tv/theenclase
[plugin.twitch][info] Attempting to authenticate using OAuth token
[plugin.twitch][error] Failed to authenticate, the access token is invalid or missing required scope
[cli][info] Available streams: audio, high, low, medium, mobile (worst), source (best)
[cli][info] Opening stream: source (hls)
[cli][info] Starting player: 'C:\Program Files (x86)\VideoLAN\VLC\vlc.exe'

After this. it streams as expected.

Reproduction steps

Please see above.

Environment details (operating system, etc.)

Windows 7, 64bit

Comments, logs, screenshots, etc.

Can supply if needed.

@bastimeyer
Copy link
Member

I'm unable to reproduce any of this what you have said.

The Client-ID is still valid and is used in all API requests, even while being logged out.
Authenticating via password or token also does work without any issues.

Switching to the "Games" tab, I need to either login or enter the token.

You must be running an old version if you're seeing Twitch API restrictions inside the GUI.
This was updated in v0.14.0 in July, shortly after Twitch announced this change.

The client-id workaround for livestreamer was added in v0.15.1 after the changes were made live and livestreamer was still not updated.

Please try removing your "Livestreamer-Twitch-GUI" connection from your Twitch account here:
https://www.twitch.tv/settings/connections

Also, please make sure that your livestreamer config file doesn't contain any login informations, since the GUI will use these automatically.

@TheDromundKaas
Copy link
Author

TheDromundKaas commented Oct 4, 2016

ltg

See program version (0.15.2)

I've tried to re-download current 64bit version, unpack to a different directory, same problem. Removed the application settings directory (Appdata/Local/livestreamer-twitch-gui), then tried again, with the same result (although the settings have all been reset).

The first 3 tabs give the mentioned "There was an error while trying to display this page." error display, "Subscriptions" to "Games" require a login (Buttons "Sign in" and "Use access token").

Problem also reproducible with Win32 version.

Anything else I can supply?

Edit: My livestreamer doesn't work without token as well. That might mean that I have the version not supporting clientid, which is why I see the requirement to use OAuth token, which might not be functional right now.

@bastimeyer
Copy link
Member

You could run a debug build and see the HTTP requests being made to the Twitch API.
Instructions here...

If you don't want to do this, you can also run the application with the --remote-debugging-port=8888 parameter, open http://localhost:8888 in your web browser and click on the "Livestreamer Twitch GUI" link.

While being in the dev tools, click on the Network tab. This menu will list all new HTTP requests.
See the request headers and the response code, this is all working correctly:

Logged out
screenshot from 2016-10-04 19-54-53

Logged in
screenshot from 2016-10-04 19-49-29

@bastimeyer
Copy link
Member

My livestreamer doesn't work without token as well

chrippa/livestreamer#1478

The GUI does set both the client-id and the oauth token livestreamer parameters automatically.

@TheDromundKaas
Copy link
Author

I'm very sorry, the problem has been fixed by using the debugging port and seeing the requests there. My fault, my firewall somehow didn't ask for connect permissions but somehow denied LTG automatically.

Everything works perfectly now. Thank you for your help.

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

No branches or pull requests

2 participants