-
-
Notifications
You must be signed in to change notification settings - Fork 8k
[v8] RunnableDevEnvironment: "transport was disconnected, cannot call fetchModule" logged when server closes during full-reload re-import #22011
Copy link
Copy link
Labels
p3-downstream-blockerBlocking the downstream ecosystem to work properly (priority)Blocking the downstream ecosystem to work properly (priority)
Description
Describe the bug
When a file in a RunnableDevEnvironment changes and has no HMR boundary, Vite sends full-reload to the environment's hot channel. The module runner receives this, clears its cache, and starts re-importing entrypoints. If server.close() is called (e.g. test teardown) while the re-import is in flight, the transport disconnects and logs:
[vite] An error happened during full reload
Error: transport was disconnected, cannot call "fetchModule"
The error is caught and doesn't crash the process — but on slow CI (Windows), the re-import attempt adds latency on every HMR event causing test suites to time out.
Reproduction
Steps to reproduce
- Checkout the repro
- Checkout the branch
bug/transport - Run
node repro.mjs
System Info
System:
OS: macOS 26.3.1
CPU: (12) arm64 Apple M4 Pro
Memory: 5.64 GB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.12.0 - /Users/ema/.nvm/versions/node/v24.12.0/bin/node
npm: 11.6.2 - /Users/ema/.nvm/versions/node/v24.12.0/bin/npm
pnpm: 10.28.0 - /Users/ema/.nvm/versions/node/v24.12.0/bin/pnpm
Browsers:
Firefox: 149.0
Safari: 26.3.1Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- 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 vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p3-downstream-blockerBlocking the downstream ecosystem to work properly (priority)Blocking the downstream ecosystem to work properly (priority)