hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.15k stars 2.76k forks source link

console errors #10286

Open sasog23 opened 4 months ago

sasog23 commented 4 months ago

gql.assist.si-1718097838971.log

https://v1/graphql image

image

i have problem with hasura console api, slow behaviour

banool commented 3 months ago

I'm getting the same error. I've tried it with and without HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: "/srv/console-assets".

banool commented 3 months ago

The problem was it couldn't connect to the DB mentioned in the metadata. Very bizarre errors from Hasura though in this case.

MrCox007 commented 3 months ago

Getting the same error, can connect to db. v hasura/graphql-engine:v2.40.2.cli-migrations-v3 The issues started on v2.31.0

frink commented 3 months ago

I've been seeing similar problems running v2.40.2-ce.cli-migrations-v3.ubi

image

I think there are at least two problems. I'm noticing that the .gz files aren't serving correctly and also that I'm getting the telemetry ping even though I've got it switched off with HASURA_GRAPHQL_ENABLE_TELEMETRY: "false".

I've noticed that the Font Awesome CSS is NOT zipped but simply minified. (See: /console/assets/common/css/font-awesome.min.css.gz) It's also looking for /console/assets/versioned/main.css.gz when there is none. There is a main.js.gz however. It is also looking for a /console/assets/versioned/vendor.js.gz. Perhaps that is supposed to be vendor.d468ed0636cb3654.js.gz. I don't know how much of this is and isn't related to one another...

It should be noted that I'm running a pretty custom CLI command too:

    echo "version: 3" > config.yaml

    hasura-cli console \
    --no-browser \
    --address ${CONSOLE_DOMAIN} \
    --api-port 80 \
    --api-host http://${CONSOLE_DOMAIN} \
    --console-port 9695 \
    --endpoint http://hasura:8080 \
    --static-dir /srv/console-assets \
    --console-hge-endpoint http://${CONSOLE_DOMAIN}

With Caddy proxying everything through port 80

  :80 {
        root /usr/share/caddy
        encode gzip
        file_server

        route /console* {
                reverse_proxy hasura:9695
        }

        route /console/assets/* {
                reverse_proxy hasura:8080
        }

        route /v1/version {
                reverse_proxy hasura:8080
        }

        route /v1/graphql {
                reverse_proxy hasura:8080
        }

        route /v1/metadata {
                reverse_proxy hasura:8080
        }

        route /v1/* {
                rewrite /v1/* /api/rest/*
                reverse_proxy hasura:8080
        }

        route /v1alpha1/config {
                reverse_proxy hasura:8080
        }

        route /v2/query {
                reverse_proxy hasura:8080
        }

        route /api/* {
                reverse_proxy hasura:8080
        }

        route /apis/migrate* {
                reverse_proxy hasura:9695
        }
}

I should also note that if I try to sever the assets over 9695 it just gives me the Console homepage no matter what URL. So that looks like yet another bug. Ultimately this configuration is usable but with a few silent scripting errors in the console.