graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

json parse error on console when connecting to local v3 engine

Open imperfect-fourth opened this issue 1 year ago • 4 comments

Steps to reproduce:

  1. Sign out of hasura console
  2. follow steps 1-3 listed on page Create a supergraph
  3. Opening the link in step 3(https://console.hasura.io/local/graphql?url=http://localhost:3000) given on the above page redirects you to login page. After successful login, you're redirected to the console, which then throws the json parse error.

https://github.com/user-attachments/assets/afb84d70-5c88-4adf-b9a6-da7a6592d60e

browser console logs:

image

imperfect-fourth avatar Jul 15 '24 11:07 imperfect-fourth

I just ran through the steps on the docs and could not reproduce this issue. Works for me as indicated in the docs.

m4ttheweric avatar Jul 15 '24 18:07 m4ttheweric

@m4ttheweric did you sign out of the console first?

imperfect-fourth avatar Jul 15 '24 18:07 imperfect-fourth

Yes. I had to go through the login process as you described.

m4ttheweric avatar Jul 15 '24 18:07 m4ttheweric

I can reproduce this issue when localhost:3000 is up with a different server (health check returns 200, but introspection fails). This means the console shows this error when the introspection query fails.

image

We should improve the logic for displaying the connected tag. Currently, it shows when /health returns 200. Let’s ensure it returns a proper OK before showing the connected tag.

I think this is also an opportunity for us to enhance the developer experience by better indicating whether the engine setup is correct or not.

soorajshankar avatar Jul 30 '24 13:07 soorajshankar