Graphql-engine: Hasura CLI error: version check: failed to get version from server

Created on 25 Jul 2019  路  20Comments  路  Source: hasura/graphql-engine

I get this anytime I try to run hasura cli, for example

$ hasura migrate create "init" --from-server
time="2019-07-25T11:23:55-07:00" level=fatal msg="version check: failed to get version from server: failed making version api call: Get meshconnect-development.herokuapp.com/v1/version: unsupported protocol scheme \"\""

same error if I try to run hasura console

Thanks for any ideas, tips, etc.

cli question

Most helpful comment

I Have this prolem I checked the config and url is correct. The server is in hosted environment on a docker image

All 20 comments

@vonwao In you config.yaml, can you add the endpoint with complete url? i.e. endpoint: https://meshconnect-development.herokuapp.com and see if the issue still happens?

@vonwao just wanted to check in if you were able to resolve this issue? 馃檪

@vonwao I'm closing the issue. Feel free to re-open if you would like to add something 馃檪

I have also encountered this problem

@CkCreative Can you confirm if your URL is of the form https://<your-app>?

@shahidhk thanks a lot, it worked.

Hello.

I met the same problem with hasura console on the docker image hasura/graphql-engine:v1.1.0.cli-engine while the docker image hasura/graphql-engine:v1.1.0 works perfectly.

Did I miss a flag ?

Here is my config.yaml:

admin_secret: ***
endpoint: http://localhost:8011

@b3j0f Can you check if your server is running?

Hello. Things went back to normal. Sorry for inconvenience...

I Have this prolem I checked the config and url is correct. The server is in hosted environment on a docker image

Also having this problem on remote url

I had the following error several times trying to export metadata from a Hasura Cloud project (Heroku Postgres):

FATA[0025] version check: failed to get version from server: failed making version api call: Get https://my-app-name.hasura.app/v1/version: dial tcp: lookup my-app-name.hasura.app on XXX.XXX.X.X:XX: server misbehaving

Eventually it did work, but in an unexpected manner: instead of several .yaml files under a metadata directory, I received a single metadata.yaml under migrations

I was encountering this bug too (Hasura hosted on Heroku) but it's just been fixed on its own.
Since I was getting it when deploying via Github Actions, I first I tried to reproduce it with the hasura CLI on my machine.
It worked on my machine so I tried to start the deployment on Github Actions again and it worked.

Hi, I am currently facing this issue on one of my servers, while all others (with the same setup) have no issues.
I see that for most people here the issue resolves itself but I don't want to rely on this.

I can confirm the server is running as it should, and that the secret and url are set correctly in the config.

Is there any update on what might cause this?

Hi, I am currently facing this issue on one of my servers, while all others (with the same setup) have no issues.
I see that for most people here the issue resolves itself but I don't want to rely on this.

I can confirm the server is running as it should, and that the secret and url are set correctly in the config.

Is there any update on what might cause this?

Are all your servers using the same Hasura GraphQL Engine version ?
My assumption is that this problem occurs when your Hasura CLI and your Hasura GraphQL Engine are the not same version...

For example, I got the problem when my CLI was 1.3.0 while one of my servers was 1.2.0.

Hi @arnaud-cortisse, thank you for your reply.

The versions were in fact mismatching. However, after downgrading the cli the issue was still there.

What I forgot to mention is that before the weekend I was able to access the server that is now not connecting to hasura console, and since then nothing changed. No work was done/released.

Update: So as expected the issue fixed itself on my end after 24h. No changes were done, and my laptop didn't even reboot.

So when I ran into this issue it was because I was setting some env var wrong

FROM hasura/graphql-engine:v1.3.2.cli-migrations-v2 as base
# https://hasura.io/docs/1.0/graphql/core/migrations/advanced/auto-apply-migrations.html#cli-migrations-image

# copy migrations and metadata in
COPY ./metadata /hasura-metadata
COPY ./migrations /hasura-migrations

# ENV HASURA_GRAPHQL_DATABASE_URL postgres://postgres:password@localhost:5432/dbname
# ENV HASURA_GRAPHQL_ADMIN_SECRET accessKey
# ENV HASURA_GRAPHQL_ENDPOINT http://hasura:80
# ENV HASURA_GRAPHQL_INSECURE_SKIP_TLS_VERIFY true

commenting all of the ENV out fixed it.

Not sure which one broke everything but it was likely the dburl or the insecure bit.

For the record im using a helm chart

https://github.com/williscool/hasura-k8s-stack/tree/master/hasura-chart

and was using the above docker file in it.

Making sure to NOT set the env vars in the Dockerfile ...

and ONLY setting them in the helm values was what fixed for me. hope it helps someone else.

lost half a day to this

This issue was fixed for me in the update to 1.3.3.

I'm running version 1.3.3 and I just faced this issue.

FATA[0022] version check: failed to get version from server: failed making version api call: Get "https://my-app.hasura.app/v1/version": net/http: TLS handshake timeout

In fact this error message comes from several possible issues...

Is it possible to get more specific message instead of a generic one ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sachaarbonel picture sachaarbonel  路  3Comments

leoalves picture leoalves  路  3Comments

tirumaraiselvan picture tirumaraiselvan  路  3Comments

cpursley picture cpursley  路  3Comments

anisjonischkeit picture anisjonischkeit  路  3Comments