graphql-engine: Console error: [Minified React error] when metadata is in an inconsistent state

Running into an error loading the console on opening console/settings/metadata-status when metadata is in an inconsistent state.

Hasura server version: 2.0.3

Stacktrace:

Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Braw_body%7D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Ba (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4873555)
    at f (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4875244)
    at m (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4876357)
    at https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4878467
    at Ko (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4888040)
    at Xl (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4928519)
    at jl (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4919492)
    at zl (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4919417)
    at Ol (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4916267)
    at https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/vendor.js.gz:1:4867239

Screenshot from 2021-08-01 09-39-42

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 20 (9 by maintainers)

Most upvoted comments

I get the same now. It would be good anyway that app doesn’t redirect to console/settings/metadata-status page. It should just display error notification or alert.

We’re having the exact same issue on 2.0.1-2.0.5

Actually it might be easier to just list the steps.

  1. Create a new project on Hasura Cloud

  2. Create an environment variable REMOTE_GQL_ENDPOINT whose value is any valid graphql server (I used https://api.spacex.land/graphql)

  3. Go into the Hasura Console and create a remote schema using the env var REMOTE_GQL_ENDPOINT as the URL.

  4. Change the environment variable’s value to http://does.not.exist/graphql

  5. Go back to the Hasura Console and reload

  6. Bam, React error #31

In the devtools Network tab, I see several requests to https://issue-7328-repro-2.hasura.app/v1/metadata , and for one of them the response looks like this:

metadata-response

As you can see the message property of the inconsistent object is an object, but it looks like the frontend code expects it to be a string. Hopefully this explanation makes sense, if not I can make a short video if that would help.

Same for me. This error prevents me from opening the console using any route.

@adhendo Yep! https://github.com/hasura/graphql-engine/issues/7699

In our case, we were using . in one of our table names, changing to _ fixed the issue.

It seems like I may have gotten to this state in a few different ways, but one of them that I can repro consistently is that I have a remote schema that Hasura can’t access because I haven’t started that server yet. I made a minimal repro here: https://cloud.hasura.io/project/4f941bd6-c51c-4cc7-8595-268fe427c34a/console , let me know if I need to add you to that project so you can access it. [edit, nevermind, I just noticed your github profile lists your email, sent you an invite]