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

REST Endpoint - Unable to modify

Open bluee opened this issue 3 years ago • 15 comments

Version Information

Server Version: CLI Version (for CLI related issue): v2.12.0, v2.13.0-beta.1

Environment

Ubuntu, OSS Docker + Caddy as Proxy

What is the current behaviour?

When you edit a REST endpoint and click Modify Hasura tries to save to https://data.undefined/v1/graphql instead of correct endpoint. Creating a new endpoint still works.

What is the expected behaviour?

Click Modify and it will save the current or modified GraphQL Request

How to reproduce the issue?

  1. Go to API > REST > Select a endpoint > Edit endpoint
  2. Click Modify
  3. Network requests will go to data.undefined

Screenshots or Screencast

image

Please provide any traces or logs that could help here.

N/A

Any possible solutions?

No

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

Keywords

  • data.undefined
  • REST
  • Endpoint

bluee avatar Oct 04 '22 05:10 bluee

We are looking into this. Can you confirm if it was working on any prior versions of Hasura?

tirumaraiselvan avatar Oct 04 '22 06:10 tirumaraiselvan

It was working in a prior version. I can't remember which version but at least v2.0.7.

bluee avatar Oct 04 '22 08:10 bluee

Hello, it was working on version v2.11.2, we update today and this problem begin to occur. We roll back console to v2.11.2 and leave the server on v2.12.0 and the problem still occurs, so it's seems related.

Moreover http://hasura-console/rstatic/dist/2.js is not a javascript file, it includes an html file with script section containing a window.__env with hasura settings

luhhujbb avatar Oct 06 '22 13:10 luhhujbb

Hey folks

Can you share the metadata (or even better, the hasura directory) of your Hasura setup? If it's confidential, you can email it to me [email protected] as well.

We tried reproducing this but couldn't hit this error...yet.

tirumaraiselvan avatar Oct 07 '22 09:10 tirumaraiselvan

Hello, we tried to upgrade to v2.13.0.beta1

(missing: https://hasura-console/rstatic/dist/2.js)
    e https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1310 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1310 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1308 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1308 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1306 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1306 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1305 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1305 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1184 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1184 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    197 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1243 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1243 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1232 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1232 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1361 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    1361 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    1353 https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/main.js.gz:1
    c https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    r https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    t https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    <anonymous> https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
    <anonymous> https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.12/vendor.js.gz:1
vendor.js.gz:1:978

We also tried to rollback to v2.11.2 both console and engine and it shows the same error, ie it's always lock to v2.12 assets. So now we have this error on all versions.

Console is loaded without metadata since it's just used as an internal fronted to Hasura.

luhhujbb avatar Oct 07 '22 10:10 luhhujbb

@luhhujbb Just to confirm, you were hitting the same issue with REST Endpoint as the original comment? Or is it a separate issue?

tirumaraiselvan avatar Oct 07 '22 11:10 tirumaraiselvan

@tirumaraiselvan the issue with REST endpoint is a particular case of my issue which affect the whole console (Rest/Data/Actions), when I open network tab of my browser developer tools, there are erros with "data.undefined"

luhhujbb avatar Oct 07 '22 11:10 luhhujbb

Hey Folks,

Thanks for reporting the issue, the request to "data.undefined" was not related to modifying a REST endpoint, this was a bug which is fixed here.

soorajshankar avatar Oct 10 '22 10:10 soorajshankar

This issue is still present on v2.13.0 release and v2.14.0.beta.1

luhhujbb avatar Oct 12 '22 13:10 luhhujbb

More details:

  • https://hasura-console/rstatic/dist/2.js is still not a javascript file it's an html file so it's no correctly loaded. It implies a chunkLoadError
  • data.undefined endpoint error still occurs

luhhujbb avatar Oct 12 '22 13:10 luhhujbb

@luhhujbb Can you share a screenshot of what you are trying to do? And where you get the error? We haven't been able to reproduce this... can you share some steps to reproduce this?

tirumaraiselvan avatar Oct 13 '22 09:10 tirumaraiselvan

@tirumaraiselvan I simply do

  • hasura consoleand monitor network call from my browser developer tools (local console)
  • I also run console in standalone mode using the docker image v2.14.0.beta.1 with a dedicated config.yaml (remote console), some feature are not available here because of limitation of console configuration (no possibility to specify api-url, only api-port but this is not an issue here): docker run -p 127.0.0.1:8080:8080/tcp --volume /path/to/config.yaml:/config.yaml--entrypoint /bin/hasura-cli hasura/graphql-engine:v2.14.0-beta.1.cli-migrations-v3 console --console-port 8080 --address 0.0.0.0 --api-port 8081 --no-browser Then connect to the console on localhost:8080 Nothing complicated here.

luhhujbb avatar Oct 13 '22 10:10 luhhujbb

Thanks @luhhujbb!

Just to clarify, what we are trying to understand is the point where it blocks you from modifying the REST endpoint? Is it anyway related to the save/modify button showing indefinite loading mask?

Also, the network failure on data.undefined is a known and unrelated issue and it will not block any console functionality - the fix will be available from the next release.

soorajshankar avatar Oct 13 '22 11:10 soorajshankar

@soorajshankar as explained here I mention both problem.

@tirumaraiselvan the issue with REST endpoint is a particular case of my issue which affect the whole console (Rest/Data/Actions), when I open network tab of my browser developer tools, there are erros with "data.undefined"

The REST saving seems to be fixed on local console, and has never worked using a "remote console". The data.undefined issue make the console absolutely unusable on a remote way even with reduce functionality due to the missing "api-url" limitation.

Maybe all this is related to #9040

luhhujbb avatar Oct 13 '22 12:10 luhhujbb

I'm getting the same error console error on click to modify image version 2.13.0

andrefilipin avatar Oct 17 '22 14:10 andrefilipin

The REST saving seems to be fixed on local console, and has never worked using a "remote console".

Hey @luhhujbb, I'm finding it a bit hard to find the specifics here, Could you explain the UX behaviour here? Is it anyway related to the save/modify button showing indefinite loading mask?

The data.undefined issue make the console absolutely unusable on a remote way even with reduce functionality due to the missing "api-url" limitation.

To make it more clear, if you observe the failing GraphQL payload, it has nothing to do with any user actions and can be considered non-harmful - it is fixed and will be available from the next release. (The network errors are happening multiple times because of the retry mechanism, if you notice its happening from the time of logging in and trying to fetch some survey questions)

Here is how I tried reproducing this issue with CLI console, and the functionality seem to be working for me.

https://user-images.githubusercontent.com/8408875/196668782-44cd5847-cdb5-4b10-9fd5-8df0bd757289.mov


I'm getting the same error console error on click to modify image version 2.13.0

@andrefilipin, this seem to be a different error, could you create an issue with the steps to reproduce this?

soorajshankar avatar Oct 19 '22 11:10 soorajshankar

@soorajshankar cli console is what I call "local console" and as I explain this issue seems to be fixed, to get the "remote console" behavior use the docker command I've provided. So yes, you will not reproduce this issue using cli console.

luhhujbb avatar Oct 19 '22 13:10 luhhujbb

We face the same issue on the latest version - v2.16.0-beta.1.There are multiple requests to the non-existing hostname (data.undefined).

johnbizokk avatar Dec 08 '22 14:12 johnbizokk

Folks, I can think of a corner case, to verify that I need the following information

  1. Is this happening when you try to modify a REST endpoint that was created with an earlier version of Hasura?
  2. If so, could you add some description and try if there is no description provided?

soorajshankar avatar Dec 28 '22 06:12 soorajshankar