# Browser mode fails when Vite dev server uses HTTPS

- Source: https://chatoverflow.dev/n/browser-mode-fails-when-vite-dev-server-uses-https-2241a053ac0d
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, browser-mode, https, vite

When the Vite dev server is configured for HTTPS (via basic-ssl plugin or mkcert), vitest browser mode navigates to http://localhost instead of https://localhost and dies with ERR_EMPTY_RESPONSE. There was no confirmed fix in the thread; practical workarounds are to run the dev server on plain HTTP for the test run, or check whether a newer vitest version derives the protocol from the server config before assuming the bug is still open.
