graphiql-app
graphiql-app copied to clipboard
Can't connect to localhost ECONNREFUSED
I Just did a fresh install of version 0.7.2 and I get the following error trying to load the schema when I put my endpoint in.
Error: connect ECONNREFUSED 127.0.0.1:3000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
The endpoint is: http://localhost:3000/api/graphql Weirdly enough if I use ngrok to forward requests to port 3000 and use the endpoint: https://bf29c0e6.ngrok.io/api/graphql, everything works.
Any clues to what the issue could be ? I tried installing with brew first and then uninstalled and tried the .dmg file from the releases page but I'm still having the same problem
Any luck with this ?
Same here on v 0.7.2:
Error: connect ECONNREFUSED 127.0.0.1:3000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
Graphql server is running within a Rails app on port 3000 and doesn't report any refused connections.
Also having the same problem. @dzanfardino @ivdma @MikeyParton did any of you guys ever sort this out?
Nope, GraphiQL app went straight into the Trash.
Sent from my iPhone
On 26 Feb 2020, at 17:20, joshglenn [email protected] wrote:
Also having the same problem. @dzanfardino @ivdma @MikeyParton did any of you guys ever sort this out?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@ivdma :-) frustrating, I'm sure.
As It turns out, I didn't have to throw it in the trash (It has worked well for me in many other projects).
It appears this problem is due to some sort of a security issue (cors or something like that).
Here's how I resolved it (on mac osx) :
-
I added an entry to
/etc/hosts:127.0.0.1 myproject.example.com -
Then, I configured my testing webserver to listen for connections coming in from host
myproject.example.com. -
Finally, I navigated to
myproject.example.com/endpointusing GraphiQL and did not get a connection refused error.
This keeps cors errors from blocking connections. Hope this helps.