Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
M
mopidy
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • funkwhale
  • mopidy
  • Issues
  • #8

Closed
Open
Opened Jun 15, 2020 by Georg Krause@georgkrauseMaintainer
  • Report abuse
  • New issue
Report abuse New issue

Crash with expired access token

2020-06-15 05:44:24,961 INFO [678:FunkwhaleBackend-3] pykka: Exception returned from FunkwhaleBackend (urn:uuid:5194a25a-00e8-40a6-99c3-f1016af20db1) to caller:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/requests_oauthlib/oauth2_session.py", line 478, in request
    url, http_method=method, body=data, headers=headers
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
    raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 193, in _actor_loop
    response = self._handle_receive(envelope.message)
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 299, in _handle_receive
    return callee(*message.args, **message.kwargs)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/library.py", line 96, in browse
    result, cache = handler(remaining)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/library.py", line 201, in browse_artists
    {"ordering": "name", "page_size": 50, "playable": "true"}
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/client.py", line 135, in list_artists
    response = self.session.get("artists/", params=filters)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/client.py", line 33, in request
    return super(SessionWithUrlBase, self).request(method, modified_url, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests_oauthlib/oauth2_session.py", line 497, in request
    self.auto_refresh_url, auth=auth, **kwargs
  File "/usr/local/lib/python3.7/dist-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
    self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 438, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/errors.py", line 405, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) 
2020-06-15 05:44:25,007 ERROR [678:Core-8] mopidy.core.library: FunkwhaleBackend backend caused an exception.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/requests_oauthlib/oauth2_session.py", line 478, in request
    url, http_method=method, body=data, headers=headers
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
    raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mopidy/core/library.py", line 17, in _backend_error_handling
    yield
  File "/usr/lib/python3/dist-packages/mopidy/core/library.py", line 114, in _browse
    result = backend.library.browse(uri).get()
  File "/usr/lib/python3/dist-packages/pykka/_threading.py", line 45, in get
    _compat.reraise(*self._data['exc_info'])
  File "/usr/lib/python3/dist-packages/pykka/_compat/__init__.py", line 29, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 193, in _actor_loop
    response = self._handle_receive(envelope.message)
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 299, in _handle_receive
    return callee(*message.args, **message.kwargs)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/library.py", line 96, in browse
    result, cache = handler(remaining)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/library.py", line 201, in browse_artists
    {"ordering": "name", "page_size": 50, "playable": "true"}
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/client.py", line 135, in list_artists
    response = self.session.get("artists/", params=filters)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_funkwhale/client.py", line 33, in request
    return super(SessionWithUrlBase, self).request(method, modified_url, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests_oauthlib/oauth2_session.py", line 497, in request
    self.auto_refresh_url, auth=auth, **kwargs
  File "/usr/local/lib/python3.7/dist-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
    self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 438, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/local/lib/python3.7/dist-packages/oauthlib/oauth2/rfc6749/errors.py", line 405, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) 
Assignee
Assign to
1.0.0
Milestone
1.0.0
Assign milestone
Time tracking
None
Due date
None
Reference: funkwhale/mopidy#8