anxdpanic / plugin.video.twitch

Watch your favorite gaming streams on Kodi
https://twitchaddon.page.link/forum
263 stars 81 forks source link

Instructions should provide accurate steps to follow to get up and running #661

Closed cppcooper closed 1 year ago

cppcooper commented 1 year ago

I've been discovering libreELEC recently, installed this twitch addon then followed the instructions which indicate I do one thing for newer versions and an old (presumably) deprecated way for older versions.

Problem: The problem I faced was that I was being told the private oauth was fubar and to follow the steps I had just followed. Though I did generate a few more tokens, even trying two simultaneously (helix/private). Looking for issues I realize there was recently an API migration, so the older versions probably don't even work any more. The similar issues I found were #613 #659 #660. (note 613 and 659 seem to be duplicates, and I also couldn't verify similarity via logs)

Solved by: I solved the issue, by performing the steps given in the "deprecated" section, and presuming [based on repeated failures following the first set of instructions] I needed this token as the private_oauth_token.

Request: Update the wiki article to provide the correct steps for the current release. Which for the record seems to involve inspecting and manually retrieving an auth-token to be set as the private token.

Note: there is potential~ (I was pretty diligent) room for simple user error in the data-entry of these tokens as I initially had been typing them out manually in the settings, and within the final steps [before getting it to work] I enabled ssh and copy pasted the final token.

So hopefully with this information, either the article can be updated or this issue closed if this is not a reproducible issue.

krlvo commented 1 year ago

Agreed, a combination of the two should be featured in the readme. Everyone with subscriber benefits will have to go through this process. Happy to do the write-up (just combining some articles) if needed.

the-isz commented 1 year ago

I can fully confirm the issue, but - unfortunately - not the solution suggested by @cppcooper.

With the same issue (being told repeatedly that the private OAuth token was wrong), I first ensured that the token in settings.xml is correct, then tried:

  1. Using the app with the original setting (oauth_token_helix)
  2. Using the setting private_oauth_token instead
  3. Using both settings in settings.xml with the same value

In all three scenarios, settings.xml was always overwritten immediately using the original setting (oauth_token_helix) and - if applicable - removing the old private_oauth_token setting.

All three scenarios didn't change anything about the issue :(

Observed on kodi 19.4-6 on archlinuxarm (armv7h), twitch.tv plugin 2.6.2+matrix.1

apo86 commented 1 year ago

I did a small rewrite to hopefully make it a bit more clear. The previous version incorrectly identified a part of the process as deprecated, which probably contributed a lot to the confusion.

https://github.com/anxdpanic/plugin.video.twitch/wiki/Private-API-Credentials---OAuth-Token

Let me know if it's clear now. In case you have already changed things and are unsure about the default values: Starting point is Settings -> Login -> Oauth Token = EMPTY Settings -> Subscriber and Turbo Benefits -> OAuth Client ID = kimne78kx3ncx6brgo4mv6wki5h1ko Settings -> Subscriber and Turbo Benefits -> OAuth Token = EMPTY

cppcooper commented 1 year ago

@apo86 that's awesome! presuming all the information is correct

cppcooper commented 1 year ago

Ig there is no PR, so I'll close this now

the-isz commented 1 year ago

@cppcooper, @apo86:

I figured out my problem, thanks to @apo86's hint:

Settings -> Login -> Oauth Token = EMPTY

My OAuth token string wasn't empty and this lead to the infinite loop, asking me to get a new OAuth token in the settings menu and never showing the hint to go to https://twitchaddon.page.link/Z1iP.

I broke out of the loop by manually clearing the OAuth token string in the settings. If it can't be fixed in the addon (or until then), maybe this should be added to the Wiki article as well?

Another question: If the link is always the same anyway - is the first step (Get OAuth Token in Settings - Login) even necessary?

Anyway, thanks to both of you for your great work!

apo86 commented 1 year ago

It's entirely possible that the addon doesn't always behave optimally if your tokens are messed up in some way. I did another pass over the Wiki and added a troubleshooting section, which now also mentions the defaults in case someone wants to start from scratch.

Pretty sure the link has changed in the past and may change again in the future. So pushing the "Get OAuth token" button right now isn't necessary, but in the future it might be.