meinaart / cypress-plugin-snapshots

Plugin for snapshot tests in Cypress.io
MIT License
497 stars 117 forks source link

Error running plugin #55

Closed RichieRunner closed 4 years ago

RichieRunner commented 5 years ago

I'm seeing the following error when running cypress open. I have configured plugins as specified.

Error running plugin

The following error was thrown by a plugin. We've stopped running your tests because a plugin crashed.

Error: listen EACCES 127.0.0.1:2121 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at Server.setupListenHandle [as _listen2] (net.js:1334:19) at listenInCluster (net.js:1392:12) at GetAddrInfoReqWrap.doListen [as callback] (net.js:1501:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)

meinaart commented 5 years ago

Are you allowed to run local servers? Otherwise you need to disable the server in the configuration. This does disable updating snapshots via the GUI.

Avgardyan commented 4 years ago

This appears to happen when the update snapshot server is not allowed to bind on the default port `2121.

I fixed it by changing the default port for the update snapshot server in cypress.json like so:

{
  "env": {
    "cypress-plugin-snapshots": {
      "serverPort": 8081 // Port number for  "update snapshot server"
    }
  }
}
RichieRunner commented 4 years ago

i have ran into the same issue, and tried changing the serverPort but still see EACCES 127.0.0.1:2121. I don't think it's reading from serverPort at all?

RichieRunner commented 4 years ago

solved; i had my cypress.json in the wrong place. this works