Cypress: Opt out of sending exceptions to https://api.cypress.io/exceptions

Created on 5 Jun 2019  路  4Comments  路  Source: cypress-io/cypress

When an exception is thrown, it appears that it is reported to https://api.cypress.io/exceptions

I noted this when running debug logs, and I was never aware that this occurred before. It should be possible to opt-out of sending this information, which is a standard setting in most applications.

cypress:network:agent addRequest called for https://api.cypress.io/exceptions +827ms
  cypress:server:api request to url: POST https://api.cypress.io/exceptions with params: {"body":{"err":{"name":"TypeError","message":"Cannot read property 'passes' of undefined","stack":"TypeError: Cannot read property 'passes' of undefined\n    at Spec.Base.epilogue (<stripped-path>base.js:319:26)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:121:20)\n    at Runner.emit (events.js:211:7)\n    at Reporter.emit (<stripped-path>reporter.js:239:55)\n    at Object.server.startWebsockets.onMocha (<stripped-path>project.js:298:22)\n    at Socket.<anonymous> (<stripped-path>socket.js:235:36)\n    at emitTwo (events.js:126:13)\n    at Socket.emit (events.js:214:7)\n    at <stripped-path>socket.js:503:12\n    at _combinedTickCallback (internal<stripped-path>next_tick.js:131:7)\n    at process._tickCallback (internal<stripped-path>next_tick.js:180:9)\n"},"version":"3.3.3","osName":"darwin","osVersion":"18.6.0","osCpus":[{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":4240850,"nice":0,"sys":2171700,"idle":19296260,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":405060,"nice":0,"sys":275490,"idle":25025900,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":3776280,"nice":0,"sys":1593060,"idle":20337680,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":405460,"nice":0,"sys":245570,"idle":25055330,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":3391380,"nice":0,"sys":1305860,"idle":21009660,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":412440,"nice":0,"sys":223550,"idle":25070280,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":2899130,"nice":0,"sys":1034430,"idle":21773210,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":420540,"nice":0,"sys":203930,"idle":25081700,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":2506430,"nice":0,"sys":852440,"idle":22347800,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":426610,"nice":0,"sys":189060,"idle":25090410,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":2326920,"nice":0,"sys":745760,"idle":22633870,"irq":0}},{"model":"Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz","speed":2600,"times":{"user":429690,"nice":0,"sys":177820,"idle":25098480,"irq":0}}],"osMemory":{"free":217538560,"total":17179869184}},"headers":{"x-os-name":"darwin","x-cypress-version":"3.3.3"}}
cli api security 馃攼

Most helpful comment

Hey up dude, yeah that would be spot on fella, it would allow users to either globally turn it off, or add it into an environment specific configuration if people just wanted to turn it off in production for example.

No rush on this, I鈥檓 not overly sensitive about the data being sent but some of our clients may be.

All 4 comments

Hey, we discussed this internally and we're happy to expose a flag to turn this off. Would an environment variable to turn this off be good? Something like CYPRESS_CRASH_REPORTS=0 to disable it?

Hey up dude, yeah that would be spot on fella, it would allow users to either globally turn it off, or add it into an environment specific configuration if people just wanted to turn it off in production for example.

No rush on this, I鈥檓 not overly sensitive about the data being sent but some of our clients may be.

The code for this is done in cypress-io/cypress#4431, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Released in 3.3.2.

Was this page helpful?
0 / 5 - 0 ratings