cypress: Cypress doesn't open certain URLs - is blank screen

Current behavior:

After installing Cypress doesn’t open any URL, even their examples. Run with React.js.

Steps to reproduce: (app code and test code)

Cypress was installed as follows

npm install cypress --save-dev

and open

node_modules/.bin/cypress open

Code from example

context('Actions', () => {
  beforeEach(() => {
    cy.visit('https://example.cypress.io/commands/actions')
  })
//...//
})

Cypress open link http://localhost:50702/__/#/tests/integration/examples/actions.spec.js and nothing happens.

Versions

2.4.1

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 2
  • Comments: 32 (4 by maintainers)

Most upvoted comments

Yes, that is exactly what i have. The issue is starting late cypress 10 and all the versions above, when the url of 3RD PARTY single signon url to login, gets long with dynamic session variables, cy.forcevisit() does not work. When a single sign on url is short without dynamic elements i am having no problems.

Still not resolved, right?

@loettz can you provide a reproducible example?

is there an official fix for this issue from Cypress. I am using the latest and it’s kind of pretty annoying

A fix for ‘hollisterco’ site that others might be able to apply using a workaround from @dudziakm

Add to your commands.js

// -- Visit multiple domains in one test
Cypress.Commands.add('forceVisit', url => {
  cy.window().then(win => {
    return win.open(url, '_self');
  });
});

test.spec.js

describe('Hollisterco.com', () => {
  it('visits page & accepts cookies', () => {
    cy.forceVisit('https://www.hollisterco.com');
    cy.get('#site-cookie-banner .secondary-button').first().click();
    cy.get('#ccpa-hco-logo').should('exist')
  });
});

Screenshot: image

Greetings, any thoughts on this? I see the label changed to ready for work, do you guys have a brief overview about what the issue is or any thoughts on a work around in the mean time? Thanks!