Skip to content

ee_Initialize() hides relevant error message #388

@MatthieuStigler

Description

@MatthieuStigler

runnign ee_Initialize(), I get error message: It looks like your EE credential has expired. Try running ee_Authenticate() again or clean your credentials ee_clean_user_credentials().

But looking it it carefully, this is not the problem. The real error message is:

Google Earth Engine API has not been used in project XXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/earthengine.googleapis.com/overview?project=XXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

But this is hidden by the code below... it might be more informative to return the initial error message, rather than trying to guess the issue?

  ee_user <- tryCatch({
    rgee:::ee_check_root_folder()
  }, error=function(e) {
    stop(
      "It looks like your EE credential has expired. Try running ee_Authenticate() again",
      " or clean your credentials ee_clean_user_credentials()."
    )
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions