Skip to content

Commit

Permalink
fix random cdp crash
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Dec 15, 2021
1 parent a661fb7 commit 5bb2bcd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/server/lib/browsers/chrome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,16 @@ const _continueRequest = (client, params, header?) => {
debug('continueRequest: %o', details)
}

client.send('Fetch.continueRequest', details).catch((err) => {
// swallow this error so it doesn't crash Cypress.
// an "Invalid InterceptionId" error can randomly happen in the driver tests
// when testing the redirection loop limit, when a redirect request happens
// to be sent after the test has moved on. this shouldn't crash Cypress, in
// any case, and likely wouldn't happen for standard user tests, since they
// will properly fail and not move on like the drive tests
debug('continueRequest failed, url: %s, error: %s', params.request.url, err?.stack || err)
})

interface HasFrame {
frame: Protocol.Page.Frame
}
Expand Down

0 comments on commit 5bb2bcd

Please sign in to comment.