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

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 9
- Comments: 20 (9 by maintainers)
I get the same now. It would be good anyway that app doesn’t redirect to
console/settings/metadata-statuspage. It should just displayerrornotification 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.
Create a new project on Hasura Cloud
Create an environment variable
REMOTE_GQL_ENDPOINTwhose value is any valid graphql server (I usedhttps://api.spacex.land/graphql)Go into the Hasura Console and create a remote schema using the env var
REMOTE_GQL_ENDPOINTas the URL.Change the environment variable’s value to
http://does.not.exist/graphqlGo back to the Hasura Console and reload
Bam, React error
#31In 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:
As you can see the
messageproperty 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 looks like the fix is https://github.com/hasura/graphql-engine/commit/4330798a71e9ec62924da4e7ae4e8b0b00523441 so it should be in v2.0.8
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]