Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance regression in 13.6.3 when using service workers that don't proxy every request #28868

Closed
ryanthemanuel opened this issue Feb 5, 2024 · 1 comment · Fixed by #28900
Assignees

Comments

@ryanthemanuel
Copy link
Collaborator

ryanthemanuel commented Feb 5, 2024

Current behavior

We fixed an issue in 13.6.3 involving service workers to ensure that we could capture those requests properly for Test Replay and intercepts. In the process, we broke situations where service workers are present but don't necessarily proxy all network traffic from a given page. This will cause those requests that don't go through the service worker to time out at 2 seconds.

Desired behavior

No requests should time out.

Test code to reproduce

This can be reproduced by using a service worker that does the following:

self.addEventListener('fetch', function() {
  return
})

or

self.addEventListener('fetch', function(event) {
  if (event.request.url.includes('<some pattern>') {
     event.respondWith(<something>)
  }
  return
})

Note that this issue can be resolved for now if all traffic is routed through the service worker (i.e. the above turns into)

self.addEventListener('fetch', function(event) {
  event.respondWith(fetch(event.request))
})

or

self.addEventListener('fetch', function(event) {
  if (event.request.url.includes('<some pattern>') {
     event.respondWith(<something>)
  } else {
	 event.respondWith(fetch(event.request))
  }
})

Cypress Version

13.6.4

Node version

all

Operating System

all

Debug Logs

No response

Other

No response

@jennifer-shehane jennifer-shehane added v13.6.4 🐛 type: performance 🏃‍♀️ Performance related stage: investigating Someone from Cypress is looking into this labels Feb 5, 2024
@ryanthemanuel ryanthemanuel changed the title Performance regression in 13.6.4 when using service workers that don't proxy every request Performance regression in 13.6.3 when using service workers that don't proxy every request Feb 20, 2024
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 13, 2024

Released in 13.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.7.0, please open a new issue.

@cypress-bot cypress-bot bot removed the stage: investigating Someone from Cypress is looking into this label Mar 13, 2024
@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Generally Available
Development

Successfully merging a pull request may close this issue.

3 participants