2

I have a barebone create-react-app with nothing but cypress installed through npm i cypress

When I run npx cypress open I get this error:

 ERR_FAILED (-2) loading 'http://localhost:49770/__launchpad/index.html'
Error: ERR_FAILED (-2) loading 'http://localhost:49770/__launchpad/index.html'
    at rejectAndCleanup (node:electron/js2c/browser_init:165:7500)
    at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:165:7875)
    at EventEmitter.emit (node:events:527:28)
    at EventEmitter.emit (node:domain:475:12)

What could be the reason for this? I have tried to stop the firewall and restart my PC but it didn't work.

  • I'm running into the same problem with 10.9.0 – Michael Rentmeister Oct 20 '22 at 16:08
  • Could be related to this github issue: https://github.com/cypress-io/cypress/issues/23835 – Michael Rentmeister Oct 20 '22 at 16:09
  • I have found the issue only occurs with electron, when I run the tests with chrome it's fine. The part giving me trouble is where the page is trying to pop open a new page while redirecting the current to an error page. The link that Michael provided says "we don't support running Cypress commands inside another window (popup or new tab)", so this seems consistent, though it is a different error than described here. – DavesPlanet Nov 30 '22 at 13:57

1 Answers1

3

https://lightrun.com/answers/cypress-io-cypress-1030-regression---test-runner-randomly-fails-when-running-electron-locally

I found a solution that worked for me. I was running the command in a cmd with admin privileges. According to this article, you need to run it in a cmd without admin rights.

Michael Rentmeister
  • 167
  • 1
  • 6
  • 24