Noisy HTTP / XHR requests in Cypress logs
See original GitHub issueEnvironment
- cypress v10.9.0
- cypress-io/github-action v4
Summary
I’m not sure which version this started happening in, but I noticed within the last 2-3 weeks that every HTTP request is being logged between it
blocks, making it very hard to navigate Cypress CI logs in GH Actions summaries. This not only makes them super long, but difficult to pinpoint failures + reasons.
At a glance, I wasn’t able to find any configuration options in Cypress or the action to keep the noise down. There is a related issue (https://github.com/cypress-io/cypress/issues/7362) in the Cypress repo with similar complaints where there’s too much HTTP noise in the command log, and unfortunately the only workarounds are janky and unofficial, causing important functionality like stubbing/interception to quit working properly, or needing to introduce super gross jQuery hackery to hide what could be put behind a configuration option.
Any help / suggestions would be appreciated!
Here’s an example of what we’re seeing, with no configuration changes since we started seeing this:
Issue Analytics
- State:
- Created 9 months ago
- Reactions:4
- Comments:5 (1 by maintainers)
Top GitHub Comments
@kryshenp I found the culprit on my end — it’s a real face-palmer too:
Vercel’s
serve
package now defaults to logging all HTTP requests when it gets hit. We’ve been using this to serve our static build in the container.They offer an option in
14.1.2
to suppress these logs by passing--no-request-logging
, which has worked magically!Closing this thread for now, but feel free to re-open if you suspect there is a different cause for your noisy logs. When in doubt, check your web server used in CI.
@docmars
Thanks for sharing!
I have an open PR here (https://github.com/cypress-io/github-action/pull/658) which also updates one of the examples to use serve 14.1.2. Now you point it out, I also notice the new log lines (see run 3679237962 => start => Cypress tests, Lines 58-60). Since the example test is very simple there weren’t many additional logging lines displayed.