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.11k stars 2.76k forks source link

HASURA_GRAPHQL_ADMIN_SECRET Error in $: object key > 34: Failed reading: satisfy #7606

Open ccalvarez opened 3 years ago

ccalvarez commented 3 years ago

Version Information

Server Version: v2.0.0-beta.2 CLI Version (for CLI related issue): not CLI related issue

Environment

System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Binaries:
Node: 14.17.5 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD

What is the expected behaviour?

Hasura GraphQL Engine docker container to start.

Keywords

HASURA_GRAPHQL_ADMIN_SECRET Failed reading

What is the current behaviour?

docker container does not start, enters "RESTARTING" status, and the docker container logs contain this error:

Fatal Error:- Environment variable HASURA_GRAPHQL_JWT_SECRET: Error in $: object key > 34: Failed reading: satisfy

How to reproduce the issue?

In a PowerShell terminal, run this docker run command:

docker run --name hasura-with-jwt -d --restart unless-stopped -p 8080:8080 -e HASURA_GRAPHQL_DATABASE_URL=postgres://hasurauser:myPassword@192.168.1.1:5432/TestDatabase -e HASURA_GRAPHQL_ENABLE_CONSOLE=true -e HASURA_GRAPHQL_ENABLE_TELEMETRY=false -e HASURA_GRAPHQL_ADMIN_SECRET=mySecret -e HASURA_GRAPHQL_JWT_SECRET='{"type":"HS256", "key": "3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R"}' hasura/graphql-engine:v2.0.0-beta.2

Screenshots or Screencast

image

Please provide any traces or logs that could help here.

Any possible solutions?

Can you identify the location in the source code where the problem exists?

No.

If the bug is confirmed, would you be willing to submit a PR?

No.

Thank you.

apgiorgi commented 2 years ago

Same here: Hasura v2.0.10 on k8s, using Firebase auth.

HASURA_GRAPHQL_JWT_SECRET:

{
  "type":"RS256",
  "jwk_url": "https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com",
  "audience": [
    "gcp-project-id",
  ],
}
jdinartejesus commented 2 years ago

I've the same issue, there are any solutions so far?

Jaikant commented 1 year ago

Seeing the same issue, is it because the environment variable (json) is a string and not a real json?

Jaikant commented 1 year ago

Seeing the same issue, is it because the environment variable (json) is a string and not a real json?

The issue was because the JSON had a comma after the last key/value pair :)