1

I'm on Windows 10. I'm running a local web server that's listening on [::1]:5173. When attempting to connect using Firefox to http://localhost:5173, I get a connection reset error. Connecting to [::1]:5173 works however. Using the Firefox about:networking DNS lookup tool, localhost resolves to both 127.0.0.1 and [::1] Chrome connects to the localhost URL just fine.

Why isn't my localhost URL working correctly on Firefox?

5
  • When you say it's listening on [::1]:5173, are you implying that it is NOT also listening on IPv4? If so, your results make it sound like Firefox's Happy Eyeballs support is broken, at least for localhost.
    – Spiff
    Commented Feb 17, 2023 at 18:59
  • Correct, it's not listening on 127.0.0.1. If I make the server listen on that address Firefox can use localhost just fine.
    – logix
    Commented Feb 17, 2023 at 19:04
  • What happens if you leave it listening on IPv6 but not IPv4, but make it so "localhost" only resolves to IPv6? That will help you tell whether Firefox's localhost IPv6 support is completely broken, or if it's just not doing Happy Eyeballs.
    – Spiff
    Commented Feb 17, 2023 at 19:27
  • IPv6 addresses need to be enclosed in brackets. Try http://[::1] and http://[localhost]. (Not sure that the second one can work.)
    – harrymc
    Commented Feb 17, 2023 at 20:55
  • Try clearing hsts for the problematic urls. I had localhost:5173 not working (the cache was stuck on some old project), but 127.0.0.1:5173 was working fine. After I made my browser forget the localhost:5173 url it got resolved, and now it works without me having to use hard reload (ctrl + f5)
    – Seangle
    Commented Jun 21 at 23:46

0

You must log in to answer this question.

Browse other questions tagged .