#2635·msw

MSW stops handling requests after 5 mins in page hidden state

Author: pseaCreated Nov 28, 2025Updated Aug 6, 2026
Labelsbugscope:browserneeds:triage

Prerequisites

Environment check

  • I'm using the latest msw version
  • 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/

  1. ✅ Check the status of the MSW. See the response.
  2. ⚠️ Close developer tools if open.
  3. Minimize the window or switch the tab.
  4. ⏳ Wait 5 min before restoring the window.
  5. ❌ Check the status of the MSW again. See the error.
  6. ⛑️ Click the " Fix MSW" button to restore the mocking.
  7. ✅ 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