add-ons / plugin.video.vrt.nu

Kodi add-on to watch content from VRT MAX
https://www.facebook.com/groups/kodivlaanderen
GNU General Public License v3.0
110 stars 20 forks source link

Status check reports HTTP 403 issue on ResumePoints #746

Closed dagwieers closed 4 years ago

dagwieers commented 4 years ago

Describe the bug

I wasn't sure who is getting mails from the Status checks in GitHub CI, but it appears there are issues with the ResumePoints implementation.

In _get_new_user_xvrttoken() we get a HTTP 403 error.

The problem started this morning (2020-05-18 at 6:00): Go to https://github.com/add-ons/plugin.video.vrt.nu/runs/684661238

As was expected, this problem also affects the normal CI testing: https://github.com/dagwieers/plugin.video.vrt.nu/runs/684767237

The problem seem to be intermittent (2020-05-18 11:40): https://github.com/add-ons/plugin.video.vrt.nu/actions/runs/108006762

Only ResumePoints seems to be affected: https://github.com/add-ons/plugin.video.vrt.nu/runs/684805643?check_suite_focus=true

To Reproduce

Steps to reproduce the behavior:

  1. https://github.com/add-ons/plugin.video.vrt.nu/actions?query=workflow:Status

Expected behavior

No issues :)

Log (if available)

Run python -m unittest -v test_resumepoints.TestResumePoints.test_get_continue_episodes
test_get_continue_episodes (test_resumepoints.TestResumePoints)
Test items, sort and order ... ERROR
Notice: [plugin.video.vrt.nu] URL post: https://accounts.vrt.be/accounts.login

Notice: [plugin.video.vrt.nu] URL post data: b'loginID=***&password=***&sessionExpiration=-1&APIKey=3_qhEcPa5JGFROVwu5SWKqJ4mVOIkwlFNMSKwzPDAh8QZOtHqu6L4nD5Q7lk0eXOOG&targetEnv=jssdk'
======================================================================
Notice: [plugin.video.vrt.nu] URL get: https://token.vrt.be/vrtnuinitlogin?provider=site&destination=https://www.vrt.be/vrtnu/
ERROR: test_get_continue_episodes (test_resumepoints.TestResumePoints)
Notice: [plugin.video.vrt.nu] URL post: https://login.vrt.be/perform_login
Test items, sort and order
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/plugin.video.vrt.nu/plugin.video.vrt.nu/tests/test_resumepoints.py", line 46, in test_get_continue_episodes
    self._resumepoints.update(asset_id='contentdamvrt20191015winteruurr005a0001depotwp00162177', title='Winteruur', url='/vrtnu/a-z/winteruur/5/winteruur-s5a1/', watch_later=True, position=38, total=635, whatson_id='705308178527')
  File "/home/runner/work/plugin.video.vrt.nu/plugin.video.vrt.nu/resources/lib/resumepoints.py", line 68, in update
    self.refresh(ttl=5)
  File "/home/runner/work/plugin.video.vrt.nu/plugin.video.vrt.nu/resources/lib/resumepoints.py", line 57, in refresh
    headers = self.resumepoint_headers()
  File "/home/runner/work/plugin.video.vrt.nu/plugin.video.vrt.nu/resources/lib/resumepoints.py", line 36, in resumepoint_headers
    xvrttoken = TokenResolver().get_xvrttoken(token_variant='user')
  File "/home/runner/work/plugin.video.vrt.nu/plugin.video.vrt.nu/resources/lib/tokenresolver.py", line 81, in get_xvrttoken
    return self._get_new_user_xvrttoken()
  File "/home/runner/work/plugin.video.vrt.nu/plugin.video.vrt.nu/resources/lib/tokenresolver.py", line 242, in _get_new_user_xvrttoken
    opener.open(self._VRT_LOGIN_URL, data=data)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: 

----------------------------------------------------------------------
Ran 1 test in 1.569s

FAILED (errors=1)
##[error]Process completed with exit code 1.
dagwieers commented 4 years ago

This appears to be resolved with v2.3.4