Search code examples
cypresscypress-session

Cypress giving error "WebSocket is closed before the connection is established"


When i visit baseURL, it will navigate to keycloak login, after entering login details, then it will navigate to production URL. So, I'm navigating back to baseURL. At that time, it will throw below error in console. Hence Page is keep on loading.

VM245 2.1fc033ba.chunk.js:2 WebSocket connection to 'wss://<proxy URL>' failed: 
WebSocket is closed before the connection is established.

I already setup below configuration in cypress.config.js file

e2e: {
    experimentalSessionAndOrigin:true,    
    experimentalSessionSupport:true,
  }

If i do same thing in manually, it will work but from cypress tool its not working. Is there any configuration I'm missing ?


Solution

  • Above issue is resolved in new version of Cypress 12.0.2 version.