Skip to content

Commit 152e828

Browse files
flotwigRachel
and
Rachel
authored
fix(cli): filter CertVerifyProcBuiltin from stderr (#22342)
Co-authored-by: Rachel <[email protected]>
1 parent b865fd4 commit 152e828

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

cli/lib/exec/spawn.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ const isRenderWorkerRe = /\.RenderWorker-/
3030
// https://github.com/cypress-io/cypress/issues/19299
3131
const isDbusWarning = /Failed to connect to the bus:/
3232

33-
const GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe, isRenderWorkerRe, isDbusWarning]
33+
// Electron began logging these on self-signed certs with 17.0.0-alpha.4.
34+
// Once this is fixed upstream this regex can be removed: https://github.com/electron/electron/issues/34583
35+
// Sample:
36+
// [3801:0606/152837.383892:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for www.googletagmanager.com failed:
37+
// ----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=www.googletagmanager.com) -----
38+
// ERROR: No matching issuer found
39+
const isCertVerifyProcBuiltin = /(^\[.*ERROR:cert_verify_proc_builtin\.cc|^----- Certificate i=0 \(OU=Cypress Proxy|^ERROR: No matching issuer found$)/
40+
41+
const GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe, isRenderWorkerRe, isDbusWarning, isCertVerifyProcBuiltin]
3442

3543
const isGarbageLineWarning = (str) => {
3644
return _.some(GARBAGE_WARNINGS, (re) => {

cli/test/lib/exec/spawn_spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ describe('lib/exec/spawn', function () {
7171
7272
[1957:0406/160550.146820:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
7373
[1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
74+
75+
[3801:0606/152837.383892:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for www.googletagmanager.com failed:
76+
----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=www.googletagmanager.com) -----
77+
ERROR: No matching issuer found
7478
`
7579

7680
const lines = _

0 commit comments

Comments
 (0)