Skip to content

Comments

fix(navigation): resolve wait on canceled requests#32309

Open
adamalston wants to merge 7 commits intocypress-io:developfrom
adamalston:19326-inflight
Open

fix(navigation): resolve wait on canceled requests#32309
adamalston wants to merge 7 commits intocypress-io:developfrom
adamalston:19326-inflight

Conversation

@adamalston
Copy link
Contributor

@adamalston adamalston commented Aug 21, 2025

Additional details

I left a TODO with some questions that hopefully someone can answer.

Steps to test

Revert the fix and check that the test fails.

How has the user experience changed?

N/A

PR Tasks


Note

Bug fix: resolve waits on navigation-canceled requests

  • On navigation start, mark in-flight intercepted requests without a response/error as state: 'Errored' with a cancellation error to unblock cy.wait()
  • Add e2e test validating cy.wait('@alias') resolves after navigation cancels the request
  • Update cli/CHANGELOG.md with the bugfix note

Written by Cursor Bugbot for commit 07e5542. This will update automatically on new commits. Configure here.

@cypress-app-bot
Copy link
Collaborator

@adamalston
Copy link
Contributor Author

adamalston commented Sep 12, 2025

Regarding the changes in a623e1f:

  • The pre-commit hook would not pass without the update in packages/electron/lib/print-node-version.ts.
  • I did not make the change in npm/cypress-schematic/src/schematics/utils/index.ts. It appears to have been made automatically.
  • I did not move the changelog entry. I don't seen any benefit in moving it and creating additional conflicts before the code is reviewed.

markRequestAsCancelled(request)
})
} catch (_) {
// TODO: Should I use `$errUtils.logError` or another method from
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My opinion @adamalston would be to do nothing since an error in the Cypress log would likely confuse the user. @jennifer-shehane anything you want to add here?

@jennifer-shehane
Copy link
Member

@adamalston Any updates here?

@adamalston
Copy link
Contributor Author

Hi @jennifer-shehane, I don't have any updates. When I originally opened this pull request, the tests appeared to be passing. In more recent commits, they now appear to be failing. I'm not sure whether the failures are related to my changes or something that was pulled in via a merge from develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cancelled network requests fail to resolve with cy.wait

4 participants