CLI: `Error API error (400): {"errors":[{"message":"Cannot query field...`

I’m seeing the following when I run astro airflow deploy or when I initially try to authenticate.

Error: API error (400): {“errors”:[{“message”:“Cannot query field “id” on type “Workspace”. Did you mean “uuid”?”,“locations”:[{“line”:8,“column”:4}],“type”:“GraphQLError”,“timestamp”:1553709106571}]}

2019/03/27 17:51:46 API error (400): {“errors”:[{“message”:“Cannot query field “id” on type “Workspace”. Did you mean “uuid”?”,“locations”:[{“line”:8,“column”:4}],“type”:“GraphQLError”,“timestamp”:1553709106571}]}

This is most likely a CLI versioning mismatch that we’re currently seeing between versions v0.8.2 and v0.7.5 for Cloud customers.

  1. Check what version of the Astronomer CLI you’re currently running on Cloud by running:

astro version

  1. If you’re on v0.8.2, go ahead and revert back to v0.7.5 by running the following:

curl -sSL https://install.astronomer.io | sudo bash -s -- v0.7.5-2

While we work to upgrade our Cloud platform to v0.8, that should do the trick.

There was previously a known bug by which running the above command without the v0.7.5 tag would install the very latest CLI we have, even if it was alpha, and trigger the error above. We’ve made sure to since then correct that bug, but do let us know if you’re seeing unexpected behavior.

I also got this error when on v0.9.0. Reverting to v0.7.5-2 also fixed it.

1 Like

I’m also encountering this error, and it’s very disconcerting. There’s basically no way to figure out how to back out of this without coming here to the forums. It’s been months. Can’t you add something to the next cli tool upgrade to warn about this?

Hi @mplovepop - thanks for the feedback here. Totally hear your pain point. We’re upgrading Cloud very soon and will be seeing significantly less cli version compatibility errors as both the Cloud platform and CLI will be upgraded in tandem in the future.

With that said, this error will inevitably continue to continue to pop up for users that aren’t on the right version - the error message should be clear. Created a GitHub issue here in our cli repo for our team to handle a fix.