gee-community / qgis-earthengine-plugin

Integrates Google Earth Engine and QGIS using Python API
http://qgis-ee-plugin.appspot.com
MIT License
454 stars 116 forks source link

Uncaught google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n "error": "invalid_grant",\n "error_description": "Bad Request"\n}') #96

Closed Almavin closed 2 years ago

Almavin commented 3 years ago

Steps to reproduce

  1. First
  2. Second
  3. Third
Traceback (most recent call last):
  File "C:/Users/Nzumi/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_plugin.py", line 125, in updateLayers
    import ee
  File "C:/Users/Nzumi/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\__init__.py", line 36, in __wrapping_ee_import__
    _module_.Initialize()
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\__init__.py", line 123, in Initialize
    http_transport=http_transport)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 210, in initialize
    _install_cloud_api_resource()
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 287, in _install_cloud_api_resource
    http_transport=_http_transport)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\_cloud_api_utils.py", line 149, in build_cloud_resource
    model=alt_model)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient\_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient\discovery.py", line 246, in build
    requested_url, discovery_http, cache_discovery, cache, developerKey
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient\discovery.py", line 305, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google_auth_httplib2.py", line 187, in request
    self._request, method, uri, request_headers)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\auth\credentials.py", line 124, in before_request
    self.refresh(request)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\credentials.py", line 183, in refresh
    self._scopes,
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\_client.py", line 248, in refresh_grant
    response_data = _token_endpoint_request(request, token_uri, body)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\_client.py", line 124, in _token_endpoint_request
    _handle_error_response(response_body)
  File "C:\Users\Nzumi\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\oauth2\_client.py", line 60, in _handle_error_response
    raise exceptions.RefreshError(error_details, response_body)
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n  "error": "invalid_grant",\n  "error_description": "Bad Request"\n}')

ee_plugin 0.0.4, QGIS 3.16.3-Hannover on Windows 10

cauamiranda commented 2 years ago

I'm having the same issue, can anyone help?

gena commented 2 years ago

Try to re-authenicate Earth Engine:

gena commented 2 years ago

Closing for no activity, should be fixed in v0.0.5