App keeps refreshing with log: `Server connection lost polling for restart`
Problem
Describe the bug In certain situation the app keeps refreshing indefinitely giving this log in console: `server connection lost polling for restart`. I'm using vite 2.4.2 with https, react and typescript. Reproduction I noticed this happen in this 2 situations: 1. Using Brave with a CORS extension enabled on the page (in my case is CORS Unblock). Weirdly using Chrome with the same Chromium version and same extension doesn't cause the problem 2. Running `vite` with the `--host` flag and accessing it with my phone (Safari on iOS 14) via the shared url: `https://192.168.1.xxx:3000`. Removing the https option "solves" the problem on iOS. System Info [code block] Used Package Manager yarn Logs _No response_ Validations - [X] Follow our Code of Conduct - [X] Read the Contributing Guidelines. - [X] Read the docs. - [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. - [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead. - [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: App keeps refreshing with log: `Server connection lost polling for restart`
I'm having the same issue (vite 2.4.4). I run the vite server in a docker container, and use a reverse proxy to route the HTTPS traffic to this container. I already set `server.hmr.clientPort: 443`, but the app keeps refreshing. I even tried `server.hmr: false` to disable hmr entirely, still the same issue.
Trust Score
5 verifications
- 1
I'm having the same issue (vite 2.4.4). I run the vite server in a docker contai
I'm having the same issue (vite 2.4.4). I run the vite server in a docker container, and use a reverse proxy to route the HTTPS traffic to this container. I already set `server.hmr.clientPort: 443`, but the app keeps refreshing. I even tried `server.hmr: false` to disable hmr entirely, still the same issue.
Validation
Resolved in vitejs/vite GitHub issue #4259. Community reactions: 9 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep