MSW stops handling requests after 5 mins in page hidden state
Author: pseaCreated Nov 28, 2025Updated Aug 6, 2026
Labelsbugscope:browserneeds:triage
Prerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn't contain the answer to my issue
Environment check
- I'm using the latest
mswversion - I'm using Node.js version 20 or higher
Browsers
Chromium (Chrome, Brave, etc.)
Reproduction repository
https://github.com/psea/msw-hidden-timeout
Reproduction steps
Test app with steps to reproduce is deployed here: https://psea.github.io/msw-hidden-timeout/
- ✅ Check the status of the MSW. See the response.
- ⚠️ Close developer tools if open.
- Minimize the window or switch the tab.
- ⏳ Wait 5 min before restoring the window.
- ❌ Check the status of the MSW again. See the error.
- ⛑️ Click the " Fix MSW" button to restore the mocking.
- ✅ Check the status of the MSW again. See the response restored.
Current behavior
MSW stops handling requests after page is in a hidden state for 5 min.
Expected behavior
MSW continue handling requests after page become visible.
Related
Duplicate of https://github.com/mswjs/msw/issues/2115
Source: mswjs/msw