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

VRT NU add-on fails with HTTP 401 Unauthorized #748

Closed
dagwieers opened this issue May 18, 2020 · 9 comments
Closed

VRT NU add-on fails with HTTP 401 Unauthorized #748

dagwieers opened this issue May 18, 2020 · 9 comments
Labels
bug Something isn't working vrtmax Related to VRT MAX
Milestone

Comments

@dagwieers
Copy link
Collaborator

dagwieers commented May 18, 2020

Describe the bug

Due to a change at VRT NU on 2020-05-18 at 6:00, the Kodi add-on no longer works with existing VRT NU accounts. It seems the VRT NU website on first login welcomes you and asks to verify your profile information. Once you have done this on the website, your account will work again as expected.

To Reproduce

Steps to reproduce the behavior:

  1. Go to "My favourites" or "All programs"
  2. You will get a Kodi error
  3. The logs show an HTTP 401 Unauthorized error

Expected behavior

Your existing profile continues to work without issue.

Additional context

  • Operating system: LibreELEC v9.2.1
  • Kodi version: 18.6
  • Addon version: 2.3.2
  • Using a VPN: no
  • Country you are using the addon from: BE

Log (if available)

2020-05-18 12:02:37.608 T:1383588736  NOTICE: [plugin.video.vrt.nu] Access: plugin://plugin.video.vrt.nu/favorites
2020-05-18 12:02:37.803 T:1383588736  NOTICE: [plugin.video.vrt.nu] Got cached token '/storage/.kodi/userdata/addon_data/plugin.video.vrt.nu/tokens/vrtloginrt.tkn'
2020-05-18 12:02:37.806 T:1383588736  NOTICE: [plugin.video.vrt.nu] URL get: https://token.vrt.be/refreshtoken
2020-05-18 12:02:38.120 T:1383588736   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'urllib2.HTTPError'>
                                            Error Contents: HTTP Error 401: Unauthorized
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/addon_entry.py", line 14, in <module>
                                                run(argv)
                                              File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/addon.py", line 336, in run
                                                plugin.run(argv)
                                              File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 130, in run
                                                self._dispatch(self.path)
                                              File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 141, in _dispatch
                                                view_func(**kwargs)
                                              File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/addon.py", line 79, in favorites_menu
                                                VRTPlayer().show_favorites_menu()
                                              File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/vrtplayer.py", line 120, in show_favorites_menu
                                                self._favorites.refresh(ttl=ttl('indirect'))
                                              File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/favorites.py", line 41, in refresh
                                                xvrttoken = TokenResolver().get_xvrttoken(token_variant='user')
                                              File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/tokenresolver.py", line 78, in get_xvrttoken
                                                return self._get_fresh_token(refresh_token, 'X-VRT-Token', token_variant=token_variant)
                                              File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/tokenresolver.py", line 262, in _get_fresh_token
                                                opener.open(req)
                                              File "/usr/lib/python2.7/urllib2.py", line 435, in open
                                              File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
                                              File "/usr/lib/python2.7/urllib2.py", line 473, in error
                                              File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
                                              File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
                                            HTTPError: HTTP Error 401: Unauthorized
                                            -->End of Python script error report<--
@dagwieers dagwieers added bug Something isn't working vrtmax Related to VRT MAX labels May 18, 2020
@dagwieers dagwieers pinned this issue May 18, 2020
@dagwieers dagwieers unpinned this issue May 21, 2020
@dagwieers dagwieers pinned this issue May 21, 2020
@kheno
Copy link

kheno commented May 22, 2020

I also had the 401 error. I was able to fix this by opening the android vrtnu app. It asked me to update my vrt user profile. After that the eŕor disappeared.
Hope this helps.

@tmds
Copy link

tmds commented May 22, 2020

@dagwieers The vrtnu addon settings screen is empty for me. Could it be a consequence of this issue?
I tried reinstalling the addon (including clearing settings) but that didn't help.

@mediaminister
Copy link
Collaborator

mediaminister commented May 23, 2020

The vrtnu addon settings screen is empty for me.

Very strange, this looks like a skin problem. Do you use the standard Estuary skin?

It asked me to update my vrt user profile.

Indeed, everyone needs to update their VRT user profile using the VRT NU Android app or at https://www.vrt.be/vrtnu/
Currently, we cannot integrate registering or managing VRT NU-accounts in the add-on. It's recommended to check the VRT NU website or Android app first when you experience problems with your account in the VRT NU Kodi add-on.

@tmds
Copy link

tmds commented May 30, 2020

Very strange, this looks like a skin problem. Do you use the standard Estuary skin?

@mediaminister I had set my settings to show only 'basic' settings, which caused nothing to be visible for vrtnu plugin. I changed to a higher level, and now vrtnu plugin settings are visible again.

@michaelarnauts
Copy link
Contributor

Very strange, this looks like a skin problem. Do you use the standard Estuary skin?

@mediaminister I had set my settings to show only 'basic' settings, which caused nothing to be visible for vrtnu plugin. I changed to a higher level, and now vrtnu plugin settings are visible again.

Is this in Kodi Leia or Matrix?

@lebeno
Copy link

lebeno commented Jun 1, 2020

I found this issue because I also got the error, but I wonder how many "normal" users will take the same route by checking the logs en then checking github.

Although off-topic, I wonder if a more friendly error message can be popped up that would not need the user checking the logs. Or even better, giving the user a message like "Please log on the VRT NU website and verify your profile information to keep using this KODI plugin".

@lebeno
Copy link

lebeno commented Jun 1, 2020

I found this issue because I also got the error, but I wonder how many "normal" users will take the same route by checking the logs en then checking github.

Although off-topic, I wonder if a more friendly error message can be popped up that would not need the user checking the logs. Or even better, giving the user a message like "Please log on the VRT NU website and verify your profile information to keep using this KODI plugin".

Nice, just discovered that there is an effort to "Provide sensible errors on network issues"
#385 (comment)

@dagwieers
Copy link
Collaborator Author

dagwieers commented Jun 2, 2020

@lebeno Our main problem to have a very specific message for this problem is the lack of user credentials that still suffer from this. But we do want an error-dialog providing a specific error message, together with a hint how to solve it.

And in most cases that would include something like: Please log on to the VRT NU website with your username/password and see if your problem persists there.

Which in this case would solve the issue.

@mediaminister
Copy link
Collaborator

Fixed with #762 and #790

@mediaminister mediaminister added this to the v2.4.0 milestone Jul 17, 2020
@dagwieers dagwieers unpinned this issue Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vrtmax Related to VRT MAX
Projects
None yet
Development

No branches or pull requests

6 participants