Got InvalidGrantError

When running experiment got error: oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) Offline user session not found.

It just popped up for hours until I killed the process.

Full log:

Unexpected error in ping thread.
Traceback (most recent call last):
  File "/home/pol/.local/lib/python3.6/site-packages/neptune/internal/threads/ping_thread.py", line 37, in run
    self.__backend.ping_experiment(self.__experiment)
  File "/home/pol/.local/lib/python3.6/site-packages/neptune/utils.py", line 210, in wrapper
    return func(*args, **kwargs)
  File "/home/pol/.local/lib/python3.6/site-packages/neptune/internal/backends/hosted_neptune_backend.py", line 611, in ping_experiment
    self.backend_swagger_client.api.pingExperiment(experimentId=experiment.internal_id).response()
  File "/home/pol/.local/lib/python3.6/site-packages/bravado/client.py", line 279, in __call__
    request_config=request_config,
  File "/home/pol/.local/lib/python3.6/site-packages/bravado/requests_client.py", line 399, in request
    self.authenticated_request(sanitized_params),
  File "/home/pol/.local/lib/python3.6/site-packages/bravado/requests_client.py", line 440, in authenticated_request
    return self.apply_authentication(requests.Request(**request_params))
  File "/home/pol/.local/lib/python3.6/site-packages/bravado/requests_client.py", line 445, in apply_authentication
    return self.authenticator.apply(request)
  File "/home/pol/.local/lib/python3.6/site-packages/neptune/oauth.py", line 90, in apply
    self.auth.refresh_token_if_needed()
  File "/home/pol/.local/lib/python3.6/site-packages/neptune/utils.py", line 210, in wrapper
    return func(*args, **kwargs)
  File "/home/pol/.local/lib/python3.6/site-packages/neptune/oauth.py", line 51, in refresh_token_if_needed
    self._refresh_token()
  File "/home/pol/.local/lib/python3.6/site-packages/neptune/oauth.py", line 54, in _refresh_token
    self.session.refresh_token(self.session.auto_refresh_url)
  File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-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 "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 415, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 425, in parse_token_response
    validate_token_parameters(params)
  File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 432, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 405, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) Offline user session not found

Hi,

Thants for letting us know. We already pinpointed what caused this issue and we’re working on a fix in a future version of neptune-client

Best,
Hubert