Stackblitz Live Preview refresh failures: step‑by‑step diagnostic guide
When Stackblitz Live Preview stops updating, use this diagnostic checklist to isolate network, build, or cache causes and restore instant feedback.
23 Nov 2025, 04:31 UTC

Live Preview stalls in Stackblitz – diagnostic guide
\nProblem: You're editing a file in Stackblitz's web IDE, but the Live Preview pane stays blank or shows the old code. No changes appear even after saving.
\nTakeaway: Before digging into settings, verify that the WebSocket connection to wss://preview.stackblitz.io is alive and that no build or cache issue is blocking the update.
Recognizable condition
\nLive Preview not updating after file edits.
\nDiagnostic table
\n| Likely cause | \nQuick symptom check | \n
|---|---|
| WebSocket blocked | \nNo wss:// preview.stackblitz.io connection in DevTools Network | \n
| File watcher skipped | \nTerminal shows no watcher activity | \n
| Build not triggered | \nBuild output panel empty or failed | \n
| Browser cache stale | \nPreview unchanged after edits | \n
| Project size throttling | \nSize warning on project dashboard | \n
| Custom dev server misconfigured | \nPreview fails to load custom assets | \n
Ordered checks
\n- \n
- \n
WebSocket connectivity. Open the browser's Developer Tools Network tab, filter by ws or wss, and confirm a persistent connection to
\nwss://preview.stackblitz.io. If the connection is absent or drops immediately, a network proxy or firewall may be blocking it. Where to run: Any browser with DevTools enabled on the Stackblitz project. Required permissions: None; the IDE and browser handle the connection. Expected check: A stable connection with periodic message frames. Relevant risk: Closing the DevTools tab terminates the inspection session but not the underlying connection. \n - \n
File watcher status. Stackblitz automatically watches source files for changes. If a file is locked, binary, or exceeds watch limits, updates may not trigger. Open the integrated terminal; look for watcher startup messages. Where to run: Stackblitz terminal tab. Required permissions: None. Expected check: No watcher error lines; the watcher is active. Relevant risk: Misinterpreting normal startup noise as a problem.
\n \n - \n
Build trigger. Click the Build button in the UI or press Ctrl+Shift+B. Observe the Build output panel. If the build fails or is skipped, the preview won't refresh. Where to run: Stackblitz web IDE. Required permissions: None. Expected check: Successful build log entry with no errors. Relevant risk: Repeated builds consume project quota.
\n \n - \n
Browser cache. Open the project in an incognito window, or clear the browser cache for stackblitz.io. Cached HTML/JS can serve stale preview content. Where to run: Browser settings or incognito window. Required permissions: None. Expected check: Preview updates in incognito window. Relevant risk: Incognito may disable some browser extensions that affect the IDE.
\n \n - \n
Project size. If the repository exceeds Stackblitz's implicit size limit (roughly 500 MB of source), live-update throttling may occur. Check the project dashboard for size warnings. Where to run: Project settings page within Stackblitz. Required permissions: None. Expected check: No size-warning banner. Relevant risk: Splitting the project may be required for large codebases.
\n \n - \n
Custom dev server. If using a custom dev server (e.g., webpack-dev-server) instead of Stackblitz's default, ensure it's configured to serve the preview context. Review .stackblitzrc for a serve command. Where to run: Project root, edit .stackblitzrc. Required permissions: Write access to the project's configuration files (handled by the IDE). Example serve config:
\nserve: viteor{ serve: vite }. Expected check: Custom server logs indicate listening on the preview port. Relevant risk: Incorrect config can break the preview entirely. \n
Fixes tied to findings
\n- \n
- WebSocket closed: Disable corporate proxy or switch to a network that permits wss://preview.stackblitz.io. If using a VPN, split‑tunnel the Stackblitz domain. \n
- File watcher stale: Reload the project tab. Add a trivial comment to a source file and save to re‑engage the watcher. \n
- Build not running: Ensure package.json includes a valid start script. Stackblitz defaults to Vite or Next.js; if custom, add a serve command to .stackblitzrc. \n
- Caching: Incognito window usually resolves. If not, clear browser cookies for stackblitz.io. \n
- Project size: Split the repository into micro‑modules, or remove dev dependencies not needed for preview. \n
- Custom dev server: Update .stackblitzrc with the correct serve command, e.g.,
serve: viteor{ serve: vite }. \n
Escalation criteria
\nIf none of the above restore live preview after 30 minutes of troubleshooting, and the project uses a non‑standard dev server, contact Stackblitz support with the project ID and network configuration. Include the WebSocket logs from DevTools.
\nLimitations
\n- \n
- Stackblitz's internal build cache is not manually clearsable. \n
- Project size limits may auto‑throttle live preview. \n
- This guide assumes the default Stackblitz web IDE; command‑line or offline modes behave differently. \n
- Custom dev servers may require additional configuration beyond this guide's scope. \n
Verification – practical way
\nAfter each fix, edit a source file, wait 2‑3 seconds, and confirm the preview updates. If using an incognito window, compare results between normal and private windows.
\n0 replies
A thoughtful contribution can make all the difference. Be the first to share one.