-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connect ECONNREFUSED 127.0.0.1:4200 #228
Comments
Could you please clarify if you're using a "TryIt" feature of the extension or "Try It Out" from SwaggerUI documentation preview window? |
@ak1394 I use “Try it” |
Looks like we need to get a bit more of the information regarding your setup. All HTTP clients have to resolve a hostname to an IP address to perform the connection, and that's what happens under the hood in this extension as well. Let's try to figure out details of your configuration, so we can see what can be done about it. What OS you're on? If you 'ping' localhost what address does it resolve to? Do you have 'curl' command on your system so we can diagnose issue further? |
macOS Ventura 13.4 |
Thanks! Could you do the following to help further diagnose the issue:
Please send the output of the commands in steps 2, 3 and 5 |
1.a Server launched on
3.a.1
3.a.2
1.b Server launched on
3.b.1
3.b.2
|
Thanks for providing the info! It looks like when you start your server on For some reason the extension does not try to connect to I'll look into fixing the extension, and will update the ticket once it's done. |
I've looked into it, and the issue is caused by bad support for hosts with multiple IP addresses in the version of NodeJS that VS Code uses. It should be resolved soon when VS Code upgrades to a newer version of Electron (that has never version of NodeJS) microsoft/vscode#184021 At the same time, maybe it worth looking at the app that your connecting to. When you launch it on localhost it opens listening socket on IPv6 In any case, I hope that Electron update happens soon and it resolves the issue. |
Thanks a lot, @ak1394 I appreciate your time and effort. I’ll close the issue. |
When I launch a server on
http://localhost:4200
(localhost resolves to 127.0.0.1), OpenAPI (Swagger) Editor attempts to connect tohttp://127.0.0.1:4200
, which resolves in error:The issue isn’t the extension per se but due to our organization’s security rules. If I launch the server explicitly on
http://127.0.0.1:4200
, I won’t get the error.However, I expressly specified the server URL in the openapi.yaml file to be
http://localhost:4200
, so I would expect the extension to request that address, not the resolved address.OpenAPI (Swagger) Editor should use the exact instructions from the openapi.yaml file.
The text was updated successfully, but these errors were encountered: