anxdpanic / plugin.video.twitch

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

Can't start plugin since a couple of days ago: complains about access token #652

Closed jonisb closed 2 years ago

jonisb commented 2 years ago

Context

Please provide any relevant information about your setup


Expected Behavior

Please describe the behavior you are expecting. Plugin starts


Current Behavior

What is the current behavior? Plugin don't start gives notification "Failed to connect to Twitch API"


Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Start Twitch plugin
  2. Plugin don't start
  3. No profit

Log

Please include a complete debug log. log

2022-04-24 15:28:09.684 T:14820   DEBUG: Twitch: Version: |2.6.0| Application Version: |Kodi| |18.8 (18.8.0) Git:20200727-45686bddb1| -> |18|8||0|20200727-45686bddb1| (ENCODED)
2022-04-24 15:28:09.684 T:14820   DEBUG: Twitch: Queries: |{'mode': 'main'}| Args: |['plugin://plugin.video.twitch/', '1', '', 'resume:false']|
2022-04-24 15:28:09.684 T:14820   DEBUG: Twitch: Calling cached method: |twitch_addon.addon.api.Twitch.valid_token|
2022-04-24 15:28:09.686 T:14820   DEBUG: script.module.python.twitch: GET QUERY: url: |https://id.twitch.tv/oauth2/validate|, params: |{}|, data: |{}|, headers: |{'Authorization': 'OAuth ***********'}|, target_func: |validate|
2022-04-24 15:28:09.686 T:14820   DEBUG: script.module.python.twitch: Downloading: |https://id.twitch.tv/oauth2/validate|
2022-04-24 15:28:10.376 T:14820   DEBUG: script.module.python.twitch: url: |https://id.twitch.tv/oauth2/validate| parameters: |{}|
                                            {
                                                "message": "invalid access token", 
                                                "status": 401
                                            }
2022-04-24 15:28:10.407 T:14820   DEBUG: CSettingsManager: requested setting (mute_notifications) was not found.
2022-04-24 15:28:10.407 T:14820   ERROR: Traceback (most recent call last):
2022-04-24 15:28:10.407 T:14820   ERROR:   File "D:\Kodi\portable_data\addons\plugin.video.twitch\resources\lib\twitch_addon\router.py", line 290, in run
2022-04-24 15:28:10.407 T:14820   ERROR:     twitch_api = api.Twitch()
2022-04-24 15:28:10.407 T:14820   ERROR:   File "D:\Kodi\portable_data\addons\plugin.video.twitch\resources\lib\twitch_addon\addon\api.py", line 54, in __init__
2022-04-24 15:28:10.407 T:14820   ERROR:     if not self.valid_token(self.client_id, self.access_token, self.required_scopes):
2022-04-24 15:28:10.407 T:14820   ERROR:   File "D:\Kodi\portable_data\addons\plugin.video.twitch\resources\lib\twitch_addon\addon\common\cache.py", line 104, in memoizer
2022-04-24 15:28:10.408 T:14820   ERROR:     result = func(*args, **kwargs)
2022-04-24 15:28:10.408 T:14820   ERROR:   File "D:\Kodi\portable_data\addons\plugin.video.twitch\resources\lib\twitch_addon\addon\api.py", line 62, in valid_token
2022-04-24 15:28:10.408 T:14820   ERROR:     if token_check['client_id'] == self.client_id:
2022-04-24 15:28:10.408 T:14820   ERROR: KeyError: 'client_id'
2022-04-24 15:28:10.408 T:14820   ERROR: Twitch: None

Additional Information

Please provide any additional information that may be helpful.


BladeWDR commented 2 years ago

Hey i had this same issue

Reset your settings to default then go through the login process again, that worked for me.

If you look through the log it says invalid access token, guessing it's either unhappy because i recently changed my twitch handle, or the token just expired

jonisb commented 2 years ago

Thanks, got a new token and it works again. Any idea what happened? I'm pretty sure I got a new token when the API was changed on the plugin, and I didn't change anything related to Twitch.

BladeWDR commented 2 years ago

Sorry, not a clue.

On Wed, Apr 27, 2022, 2:08 AM jonisb @.***> wrote:

Thanks, got a new token and it works again. Any idea what happened? I'm pretty sure I got a new token when the API was changed on the plugin, and I didn't change anything related to Twitch.

— Reply to this email directly, view it on GitHub https://github.com/anxdpanic/plugin.video.twitch/issues/652#issuecomment-1110581005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIVP33PMYHIYL2IK3WUAXLVHDKVFANCNFSM5UGIQLDA . You are receiving this because you commented.Message ID: <anxdpanic/plugin .@.***>