Open duskmoon314 opened 3 years ago
On server, I get this:
$ curl -G 0.0.0.0:9693/apis/migrate/settings
{"migration_mode":"true"}
Is this a server problem?
I find a solution: use hasura cli on my pc
Can this be reopened? Its happening exactly the same to me.
But I think this is an error because if I want to configure the console to listen on any IP it should be smart enough to make a request to the IP of the server instead of send the request to 0.0.0.0
@x0y-gt OK
It would be great if this bug could be fixed. The current implementation makes it impossible to run the console in environments where you cannot control the public URL.
I'm for instance having issues setting it up on Gitpod.io. Gitpod automatically creates a public URL for each server process running on localhost, and this address cannot be customized. This makes it impossible to run hasura console, as the migration server ends up running on a different URL than the console server, but the console app makes requests to localhost.
Currently, I have to work around the issue by using JS user scripts through browser extensions, which manually redirect the requests to the correct migration server URL.
I think my hack is similar to @jbuverud
In chrome set a breakpoint at line 22 of the api-explorer source
When the breakpoint triggers adjust the configuration as necessary
window.__env.apiHost = "http://x.x.x.x"
Then continue from the breakpoint
Could this please allow a environment variable / .env file override?
Having the same exact problem... has anyone found a solution?
We recently added a flag to the CLI that should fix this. Could you folks try that out and let us know if it works for your use case?
@m-Bilal I still have problems trying to run hasura console in a docker container, in particular on windows with docker desktop, and this here seems to be one of the possible issues (https://github.com/hasura/graphql-engine/issues/2824#issuecomment-1482954035) I had to set --console-hge-endpoint=http://localhost:8080
to make anything work at all. On linux it mostly works, with some errors in the firefox developer console still though.
I might have a solution! I have been running into this same/similar issue, trying to launch the console from a VS Code SSH session. I found that VSC was porting 9695 automatically when the command was run, but was not porting 9693. I manually added that port to the forwarding, and now the call to http://localhost:9693/apis/migrate/settings
succeeds. I am not using any flags in the console command besides --project
, --secret
and --endpoint
.
It seems like this is new, either 9693 was getting automatically added to forwarded ports before, or the calls to the above URL were on 9695.
@andoks , sorry, I lost track of this issue. I'll be looking into it over the next 2 weeks
I'm following the doc Setting up Hasura migrations. I want to use
hasura console
, and try step 5.I am using a Ubuntu 16.04 server, having hasura engine and postgres in docker:
I use this command on a Ubuntu 16.04 server:
Then I tried to open the console, and got this:
It seems that the port for migrating isn't working correctly. How can I solve this problem?
my config.yaml:
hasura docker env: