SvelteKit — “Problem loading page” on Firefox

David Wang
May 25, 2023

--

I recently started learning SvelteKit, but ran into an unexpected issue when I ran the server:

Unable to connect
Firefox can't establish a connection to the server at localhost:5173

Oddly, the URL worked fine on Chrome and Edge, but failed in Firefox, even when I went into incognito mode or cleared the browser cache.

Solution

What worked for me was the following:

  1. Go to about:config to view Firefox settings.
  2. Search for the network.dns.disableIPv6 setting, and make sure it’s set to false.

If that doesn’t work, you can also try checking about:serviceworkers for localhost and unregister any that appear (thanks to grygrflzr in the Svelte for this one!).

--

--

David Wang

Software engineer at Roblox, writing about interesting programming topics I come across