swa
does not recognize that the api is started when localhost
resolves to ::1
#646
Open
1 of 2 tasks
Labels
Are you accessing the CLI from the default port
:4280
?--port
) and accessing the CLI from that port:4280
Describe the bug
When starting my static web app, which has both static files and functions,
swa
get's stuck waiting for the api onhttp://localhost:7071
even when the azure function core tools have started the api. It seems this happens becauselocalhost
resolves to::1
(The IPv6 loopback address) on my system, while the api is started on127.0.0.1
(IPv4 loopback address).My workaround is to specify the
host
property inswa-cli.config.json
or the--host
flag to be127.0.0.1
.To Reproduce
Steps to reproduce the behavior:
localhost
resolves to::1
. The most consistent test for this in this case is to see which IP addresswait-on
resolves (swa
useswait-on
) by runningnpx wait-on -v tcp:localhost:7071
swa-cli.config.json
withoutputLocation
andapiLocation
as needed, but withouthost
or similar.swa start
Expected behavior
swa
should successfully start up. In particular the message below is expected.Desktop (please complete the following information):
uname -a
:Linux xps13 6.1.5-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 12 15:52:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: