vscode-restclient icon indicating copy to clipboard operation
vscode-restclient copied to clipboard

Cannot resolve .local addresses: getaddrinfo EAI_AGAIN

Open karlp opened this issue 10 months ago • 1 comments

  • REST Client Version: 0.25.1
  • VSCode Version: 1.96.4
  • OS Version: linux (fedora 40)

Steps to Reproduce:

  1. create a basic test file such as
GET http://whatever.local/api/v1/blah
  1. click "send request"

Expect to get ~equivalent behaviour to using curl on the command line. Instead, get getaddrinfo EAI_AGAIN whatever.local error

Example of curl on the same system:

$ curl -v http://whatever.local/api/v1/blah
* Host whatever.local:80 was resolved.
* IPv6: (none)
* IPv4: 192.168.88.28
*   Trying 192.168.88.28:80...
* Connected to whatever.local (192.168.88.28) port 80
> GET /api/v1/blah HTTP/1.1
<<<snipped more>>>

Presumably vscode is doing it's own resolution?

karlp avatar Feb 05 '25 15:02 karlp

It appears this is a flatpak issue, though I've no idea how to fix it : <

$ flatpak run --share=network --devel --command=curl org.fedoraproject.Platform http://whatever.local/api/v1/blah
curl: (6) Could not resolve host: whatever.local
$ ping whatever.local
PING fwupd-otademo.local (192.168.88.28) 56(84) bytes of data.
64 bytes from 192.168.88.28: icmp_seq=1 ttl=64 time=2.80 ms
...
$ flatpak run --share=network --devel --command=curl org.fedoraproject.Platform http://192.168.88.28/api/v1/blah
{
// Some valid response
}

karlp avatar Feb 05 '25 15:02 karlp