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

[cy.origin] Searching inhttps://everfihelp.force.com/foundry/s/ in a cy.origin block hangs the browser. #21572

Closed
mjhenkes opened this issue May 19, 2022 · 9 comments
Labels
E2E Issue related to end-to-end testing stale no activity on this issue for a long period topic: auth topic: cy.origin Problems or enhancements related to cy.origin command type: bug

Comments

@mjhenkes
Copy link
Member

Current behavior

The following test hangs the browser when run in a cy.origin block

it('visits force.com in a cy.origin block', () => {
    cy.visit('https://platform.everfi.net/')
    cy.origin('https://force.com/', () => {
      cy.visit('https://everfihelp.force.com/foundry/s/')
      cy.get('.search-input.search-input--right').type('blah')
      cy.get(
        '.slds-button.slds-button_icon.search-inputSearchButton.search-inputSearchButton--right.slds-button_icon-border',
      ).click()

      // cy.wait(2000);
      cy.contains('No results for "blah" in Knowledge').should('exist')
    })
  })

But when run by itself, the test executes correctly.

  it('visits force.com directly', () => {
    cy.visit('https://everfihelp.force.com/foundry/s/')
    cy.get('.search-input.search-input--right').type('blah')
    cy.get(
      '.slds-button.slds-button_icon.search-inputSearchButton.search-inputSearchButton--right.slds-button_icon-border',
    ).click()

    // cy.wait(2000);
    cy.contains('No results for "blah" in Knowledge').should('exist')
  })

I've narrowed the issue down to have something to do with actually clicking the search button and the test will run correctly if that is commented out.

  it('visits force.com in a cy.origin block', () => {
    cy.visit('https://platform.everfi.net/')
    cy.origin('https://force.com/', () => {
      cy.visit('https://everfihelp.force.com/foundry/s/')
      cy.get('.search-input.search-input--right').type('blah')
      // cy.get(
      //   '.slds-button.slds-button_icon.search-inputSearchButton.search-inputSearchButton--right.slds-button_icon-border',
      // ).click()

      // // cy.wait(2000);
      // cy.contains('No results for "blah" in Knowledge').should('exist')
    })
  })

Desired behavior

Cypress should not hang when testing.

Test code to reproduce

See above.

Cypress Version

9.6.1

Other

No response

@mjhenkes mjhenkes changed the title [cy.origin] Searching https://everfihelp.force.com/foundry/s/ in a cy.origin block hangs the browser. [cy.origin] Searching inhttps://everfihelp.force.com/foundry/s/ in a cy.origin block hangs the browser. May 19, 2022
@emilyrohrbough emilyrohrbough added topic: cy.origin Problems or enhancements related to cy.origin command experiment: origin labels May 19, 2022
@AtofStryker
Copy link
Contributor

I spent quite a bit of time on this last week. I could not determine a root cause, but hitting the search button when inside a cy.origin block causes the browser and the server to lock up, with some responses returning a status code 200 but without a body. There is also usage of some iframes inside the code that leverage post message for communication. Maybe there is some conflict there, but debugging our communicator did not yield anything promising.

@AtofStryker
Copy link
Contributor

Once #20685 is resolved we should revisit this to see if the issue is resolved

@mjhenkes
Copy link
Member Author

Check again with an updated version of electron (18.3 at least)

@idanElitzur
Copy link

Still happens to me with cypress 10.7.0.
Can you please post some reference how to handle this issue?
thanks

@AtofStryker
Copy link
Contributor

Hey @idanElitzur. We currently do not have a workaround for this issue. We have spent a few weeks investigating this issue, but haven't been able to determine a root cause. Definitely a frustrating one. We have some significant improvements coming to cy.origin in the coming weeks, and what I am hoping is that some of the changes either help resolve this issue, or eliminate a few things that we know are problems. I have tried this with #23297 and didn't see any improvements, but as we gain further developments on this we will update the issue!

@nagash77 nagash77 added E2E Issue related to end-to-end testing topic: auth and removed E2E-auth labels Nov 8, 2022
@andreynav
Copy link

June, 1 2023, version [v12.13.0] - the bug still exists

@ohlori
Copy link

ohlori commented Jun 22, 2023

Bug still exists in v12.14.0

@AtofStryker AtofStryker removed their assignment Jun 26, 2023
@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 20, 2024
@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 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing stale no activity on this issue for a long period topic: auth topic: cy.origin Problems or enhancements related to cy.origin command type: bug
Projects
None yet
Development

No branches or pull requests

10 participants