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

Cypress side panel seemingly disappears on redirect #18958

Closed
WesselKuipers opened this issue Nov 17, 2021 · 5 comments
Closed

Cypress side panel seemingly disappears on redirect #18958

WesselKuipers opened this issue Nov 17, 2021 · 5 comments
Labels
stale no activity on this issue for a long period

Comments

@WesselKuipers
Copy link

WesselKuipers commented Nov 17, 2021

Current behavior

When testing against the staging environment of my application using cypress open, subsequent visits to the app seems to cause the side bar to disappear and halt test execution.

After removing the files from File -> View App Files, the first test run will run like before and any subsequent run will once again cause the side menu to disappear.

This appears to be the case in both Windows and on Linux as well as across multiple browsers.

As far as I can tell this seems to be specific to the application, but I haven't been able to pinpoint exactly what is going wrong here. It also doesn't occur when running in headless mode using cypress run.

In the screencast below I first clear the files, run a test, close the browser, and attempt to run it again.

7lQWQ10mUG.mp4

Desired behavior

The Cypress test runner environment should persist or give more information about what's possibly causing issues when testing.

Test code to reproduce

Fork for the test repo:
https://github.com/WesselKuipers/cypress-test-tiny

Cypress Version

9.0.0

Other

No response

@BlueWinds
Copy link
Contributor

It looks like appsemble is using service workers, which may be the cause.

The way cypress works is by registering itself for the domain name under test, and proxying all calls through our server. This tends to cause issues with service workers that try to cache or otherwise process requests - they're not aware of the cypress magic going on under the hood, and can end up breaking cypress in interesting ways.

Is it possible to disable your service worker, to see if this is indeed the problem?

@remcohaszing
Copy link
Contributor

I’m a coworker of @WesselKuipers

I created a merge request in appsemble/appsemble!2250 to disable service workers. The relevant app is available on https://empty.appsemble.2250.appsemble.review

I have confirmed the issue goes away when chaning the URL from https://empty.appsemble.2250.appsemble.review to https://empty.appsemble.2250.appsemble.review.

Removing the service worker caused an uncaught promise rejection which can be ignored by adding the following snippet:

Cypress.on('uncaught:exception', (err, runnable, promise) => {
  if (promise) {
    return false
  }
})

We can keep this review environment up if it helps.

@csvan
Copy link

csvan commented Dec 12, 2021

Related to #16192

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label May 15, 2023
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

5 participants