Repository navigation
cypress v16: cy.intercept() freezes the command queue #34942
|
After The freeze happens at the cy.intercept() command itself in the queue. All commands before it run normally. The route is registered (visible in the Cypress Routes panel), but the queue never advances past the intercept call. But it worked fine with v15. In v16, it also works fine on Electron and with |
Replies: 2 comments 11 replies
|
The freeze occurs due to a race condition between Cypress's command queue and the HTTP/2 proxy stream synchronization in Chromium when routes are defined after navigation. 1. Root CauseIn Cypress v16, the network interception layer in Chromium was reworked around Chrome DevTools Protocol (CDP) When you call When
2. The Solution: Declare
|
|
This looks like a Cypress 16 regression on the new default network path for Chrome, not a problem in your test. For now, keep Why Electron and Cypress 16.0.0 made a CDP-based "browser network path" the default for Chrome, Chromium and Edge. Electron, Firefox and WebKit stay on the old HTTP/1 proxy, and Where it's stuck
What to do
|
Recreated the issue here. Turns out, when a message sent to Chrome’s DevTools Protocol (CDP) server exceeds limit, the intercept call hangs. See this comment for more details. So in my case, it’s the webpack bundle that’s exceeding the limit.
@muhammadmobi Thanks for helping dig into this!