Skip to content

Commit e463fdb

Browse files
cacieprinsjennifer-shehaneAtofStryker
authored
fix: Redirect spammy electron stderr to a debug sink (#32188)
* wip: system test to reproduce * system test for alsa stderr * split cypress from 3rd party stderr at parent process to electron child * rm garbage warning regexes * fix newline behavior when parsing internal stderr * migrate left over console errors * clean up system test name * fix typed import * extract stderr splitting to separate pkg so runner can use @packages/error * rm new err log from packherd-quire * handle backpressure * docs * some unit tests & coverage for stderr-filtering * unit tests * no longer test regexp specific output in spawn unit tests * filter enabled debug namespaces rather than just cypress namespacesc * revise stream splitting et al * try to fix v8 snapshot build?? * fix console.log assertion * add missing eslint config * rm unused spies * fix regexp for optional leading wsp and ansi on debug entries * update unit tests because sinon * lint * colon.. * build stderr-filtering before checking if binary exists * adds TagStream transform stream, fixes stderr from child proc config * add build-prod script for stderr-filtering * changelog * properly handle backpressure in prefixed content transform stream * use standard tsconfig? * better tsconfig * Add pkgStderrFiltering to monorepoPaths * add \"files\" manifest * pipe all stderr to stderr when CYPRESS_INTERNAL_DEBUG_ELECTRON is enabled * rm explicit build of stderr-filtering in check-if-binary-exists step * ensure all dependencies of scripts/ are built before scripts are executed in the check-if-binary-exists command * fix dev version ref * swap logic * add stdin piping * fix exec name on the run-on-dependencies command to be more useful * use correct env * rm obsolete type refs * simplify stderr-filtering public iface, pipe cy-in-cy stderr through filtering tx * bust cache * fix mocks * fix v8-snapshot * move stderrfiltering to dev pkg in cli * skip integrity check in ci, if they are out of date things should fail anyway * copypasta over a portion of stderr-filtering to cli, since cli cannot import @packages * Delete issues.md * rm special filtering for cy in cy * rm too narrow rules file --------- Co-authored-by: Jennifer Shehane <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]> Co-authored-by: Bill Glesias <[email protected]>
1 parent 01683b8 commit e463fdb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2588
-315
lines changed

.circleci/cache-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Bump this version to force CI to re-create the cache from scratch.
2-
8-13-2025
2+
8-19-2025

.circleci/workflows.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,13 +1268,32 @@ commands:
12681268
12691269
check-if-binary-exists:
12701270
steps:
1271+
- run-on-dependencies:
1272+
package: internal-scripts
1273+
command: build
12711274
- run:
12721275
name: Check if binary exists, exit if it does
12731276
command: |
12741277
source ./scripts/ensure-node.sh
12751278
yarn gulp e2eTestScaffold
12761279
yarn check-binary-on-cdn --version $(node ./scripts/get-next-version.js) --type binary --file cypress.zip
12771280
1281+
run-on-dependencies:
1282+
parameters:
1283+
package:
1284+
description: Package to build all dependencies for. All dependencies in the
1285+
dependency chain must have a build script.
1286+
type: string
1287+
command:
1288+
description: Command to run on the dependencies.
1289+
type: string
1290+
steps:
1291+
- run:
1292+
name: Exec << parameters.command >> recursively on << parameters.package >>
1293+
dependencies.
1294+
command: |
1295+
yarn lerna run <<parameters.command>> --scope=<<parameters.package>> --include-dependencies
1296+
12781297
build-and-package-binary:
12791298
steps:
12801299
- run:

cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ _Released 08/12/2025 (PENDING)_
3939
- Fixed an issue where `.fixture()` would not return updated content after the underlying file was modified via `.writeFile()`. The fixture cache is now properly invalidated when the backing file is written to, ensuring updated content is returned in subsequent `.fixture()` calls. Fixes [#4716](https://github.com/cypress-io/cypress/issues/4716).
4040
- Fixed an issue where `.fixture()` calls with a specified encoding would sometimes still attempt to parse the file based on its extension. Files with an explicit encoding are now always treated as raw content. Fixes [#32139](https://github.com/cypress-io/cypress/issues/32139).
4141
- Fixed an issue where `.fixture()` calls with different encoding options would return inconsistent content based on execution order. Fixes [#32138](https://github.com/cypress-io/cypress/issues/32138).
42+
- Filters content written to stderr to prevent Electron from spamming with inconsequential errors/warnings. This stderr content can be viewed by enabling the `cypress:internal-stderr` debug namespace. Fixes [#32070](https://github.com/cypress-io/cypress/issues/32070)
4243
- Fixed an issue where Angular Component Testing was printing extraneous warnings to the console by default. By default, errors only will now print to the console. This can still be overridden by passing in a custom webpack config or setting the `verbose` option inside your `angular.json`. Addresses [#26456](https://github.com/cypress-io/cypress/issues/26456).
4344
- Fixed an issue where `ts-loader` was improperly being detected inside `@cypress/webpack-preprocessor`. Fixes [#32265](https://github.com/cypress-io/cypress/issues/32265).
4445

cli/lib/exec/spawn.js

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -4,126 +4,13 @@ const cp = require('child_process')
44
const path = require('path')
55
const Promise = require('bluebird')
66
const debug = require('debug')('cypress:cli')
7-
const debugVerbose = require('debug')('cypress-verbose:cli')
8-
97
const util = require('../util')
108
const state = require('../tasks/state')
119
const xvfb = require('./xvfb')
1210
const verify = require('../tasks/verify')
1311
const errors = require('../errors')
1412
const readline = require('readline')
1513

16-
const isXlibOrLibudevRe = /^(?:Xlib|libudev)/
17-
const isHighSierraWarningRe = /\*\*\* WARNING/
18-
const isRenderWorkerRe = /\.RenderWorker-/
19-
// This is a warning that occurs when running in a container on Linux.
20-
// https://github.com/cypress-io/cypress/issues/29563
21-
// Example:
22-
// [437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)
23-
const isOOMScoreWarningRe = /Failed to adjust OOM score of renderer with pid/
24-
25-
// Chromium (which Electron uses) always makes several attempts to connect to the system dbus.
26-
// This works fine in most desktop environments, but in a docker container, there is no dbus service
27-
// and Chromium emits several error lines, similar to these:
28-
29-
// [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
30-
// [1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
31-
32-
// These warnings are absolutely harmless. Failure to connect to dbus means that electron won't be able to access the user's
33-
// credential wallet (none exists in a docker container) and won't show up in the system tray (again, none exists).
34-
// Failure to connect is expected and normal here, but users frequently misidentify these errors as the cause of their problems.
35-
36-
// https://github.com/cypress-io/cypress/issues/19299
37-
const isDbusWarning = /Failed to connect to the bus:/
38-
39-
// Electron began logging these on self-signed certs with 17.0.0-alpha.4.
40-
// Once this is fixed upstream this regex can be removed: https://github.com/electron/electron/issues/34583
41-
// Sample:
42-
// [3801:0606/152837.383892:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for www.googletagmanager.com failed:
43-
// ----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=www.googletagmanager.com) -----
44-
// ERROR: No matching issuer found
45-
const isCertVerifyProcBuiltin = /(^\[.*ERROR:cert_verify_proc_builtin\.cc|^----- Certificate i=0 \(OU=Cypress Proxy|^ERROR: No matching issuer found$)/
46-
47-
/**
48-
* Electron logs benign warnings about Vulkan when run on hosts that do not have a GPU. This is coming from the primary Electron process,
49-
* and not the browser being used for tests.
50-
* Samples:
51-
* Warning: loader_scanned_icd_add: Driver /usr/lib/x86_64-linux-gnu/libvulkan_intel.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
52-
* Warning: loader_scanned_icd_add: Driver /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so supports Vulkan 1.1, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
53-
* Warning: loader_scanned_icd_add: Driver /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this verison of Vulkan (Policy #LDP_DRIVER_7)
54-
* Warning: Layer VK_LAYER_MESA_device_select uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
55-
*/
56-
57-
const isHostVulkanDriverWarning = /^Warning:.+(#LDP_DRIVER_7|VK_LAYER_MESA_device_select).+/
58-
59-
/**
60-
* Electron logs benign warnings about Vulkan when run in docker containers whose host does not have a GPU. This is coming from the primary
61-
* Electron process, and not the browser being used for tests.
62-
* Sample:
63-
* Warning: vkCreateInstance: Found no drivers!
64-
* Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
65-
* at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
66-
* at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
67-
* at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
68-
* at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
69-
* at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
70-
*/
71-
72-
const isContainerVulkanDriverWarning = /^Warning: vkCreateInstance/
73-
74-
const isContainerVulkanStack = /^\s*at (CheckVkSuccessImpl|CreateVkInstance|Initialize|Create|operator).+(VulkanError|BackendVk).cpp/
75-
76-
/**
77-
* In Electron 32.0.0 a new debug scenario log message started appearing when iframes navigate to about:blank. This is a benign message.
78-
* https://github.com/electron/electron/issues/44368
79-
* Sample:
80-
* [78887:1023/114920.074882:ERROR:debug_utils.cc(14)] Hit debug scenario: 4
81-
*/
82-
const isDebugScenario4 = /^\[[^\]]+debug_utils\.cc[^\]]+\] Hit debug scenario: 4/
83-
84-
/**
85-
* In Electron 32.0.0 a new EGL driver message started appearing when running on Linux. This is a benign message.
86-
* https://github.com/electron/electron/issues/43415
87-
* Sample:
88-
* [78887:1023/114920.074882:ERROR:gl_display.cc(14)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.
89-
*/
90-
const isEGLDriverMessage = /^\[[^\]]+gl_display\.cc[^\]]+\] EGL Driver message \(Error\) eglQueryDeviceAttribEXT: Bad attribute\./
91-
92-
/**
93-
* Mesa/GLX related warnings that occur in certain Linux environments without proper GPU support
94-
* or when running in containers. These are benign warnings that don't affect functionality.
95-
* Samples:
96-
* error: XDG_RUNTIME_DIR is invalid or not set in the environment.
97-
* MESA: error: ZINK: failed to choose pdev
98-
* glx: failed to create drisw screen
99-
*/
100-
const isXdgRuntimeError = /^error: XDG_RUNTIME_DIR is invalid or not set/
101-
const isMesaZinkError = /^MESA: error: ZINK: failed to choose pdev/
102-
const isGlxDriverError = /^glx: failed to create drisw screen/
103-
104-
const GARBAGE_WARNINGS = [
105-
isXlibOrLibudevRe,
106-
isHighSierraWarningRe,
107-
isRenderWorkerRe,
108-
isOOMScoreWarningRe,
109-
isDbusWarning,
110-
isCertVerifyProcBuiltin,
111-
isHostVulkanDriverWarning,
112-
isContainerVulkanDriverWarning,
113-
isContainerVulkanStack,
114-
isDebugScenario4,
115-
isEGLDriverMessage,
116-
isXdgRuntimeError,
117-
isMesaZinkError,
118-
isGlxDriverError,
119-
]
120-
121-
const isGarbageLineWarning = (str) => {
122-
return _.some(GARBAGE_WARNINGS, (re) => {
123-
return re.test(str)
124-
})
125-
}
126-
12714
function isPlatform (platform) {
12815
return os.platform() === platform
12916
}
@@ -161,8 +48,6 @@ function getStdio (needsXvfb) {
16148
}
16249

16350
module.exports = {
164-
isGarbageLineWarning,
165-
16651
start (args, options = {}) {
16752
const needsXvfb = xvfb.isNeeded()
16853
let executable = state.getPathToExecutable(state.getBinaryDir())
@@ -316,13 +201,6 @@ module.exports = {
316201
child.stderr.on('data', (data) => {
317202
const str = data.toString()
318203

319-
// bail if this is warning line garbage
320-
if (isGarbageLineWarning(str)) {
321-
debugVerbose(str)
322-
323-
return
324-
}
325-
326204
// if we have a callback and this explicitly returns
327205
// false then bail
328206
if (onStderrData && onStderrData(str)) {

cli/test/lib/exec/spawn_spec.js

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require('../../spec_helper')
22

3-
const _ = require('lodash')
43
const cp = require('child_process')
54
const os = require('os')
65
const tty = require('tty')
@@ -66,72 +65,6 @@ describe('lib/exec/spawn', function () {
6665
sinon.stub(state, 'getPathToExecutable').withArgs(defaultBinaryDir).returns('/path/to/cypress')
6766
})
6867

69-
context('.isGarbageLineWarning', () => {
70-
it('returns true', () => {
71-
const str = `
72-
[46454:0702/140217.292422:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete
73-
[46454:0702/140217.292466:ERROR:gles2_cmd_decoder.cc(17788)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
74-
[46454:0702/140217.292526:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incomplete
75-
[46454:0702/140217.292555:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete
76-
[46454:0702/140217.292584:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incomplete
77-
[46454:0702/140217.292612:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete'
78-
79-
[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
80-
[1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
81-
82-
[3801:0606/152837.383892:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for www.googletagmanager.com failed:
83-
----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=www.googletagmanager.com) -----
84-
ERROR: No matching issuer found
85-
86-
Warning: loader_scanned_icd_add: Driver /usr/lib/x86_64-linux-gnu/libvulkan_intel.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
87-
Warning: loader_scanned_icd_add: Driver /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so supports Vulkan 1.1, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
88-
Warning: loader_scanned_icd_add: Driver /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this verison of Vulkan (Policy #LDP_DRIVER_7)
89-
Warning: Layer VK_LAYER_MESA_device_select uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
90-
91-
Warning: vkCreateInstance: Found no drivers!
92-
Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
93-
at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
94-
at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
95-
at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
96-
at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
97-
at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
98-
99-
[78887:1023/114920.074882:ERROR:debug_utils.cc(14)] Hit debug scenario: 4
100-
101-
[18489:0822/130231.159571:ERROR:gl_display.cc(497)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.
102-
103-
[437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)
104-
`
105-
106-
const lines = _
107-
.chain(str)
108-
.split('\n')
109-
.invokeMap('trim')
110-
.compact()
111-
.value()
112-
113-
_.each(lines, (line) => {
114-
expect(spawn.isGarbageLineWarning(line), `expected line to be garbage: ${line}`).to.be.true
115-
})
116-
})
117-
118-
it('returns true for XDG runtime dir warnings', () => {
119-
expect(spawn.isGarbageLineWarning('error: XDG_RUNTIME_DIR is invalid or not set')).to.be.true
120-
})
121-
122-
it('returns true for MESA ZINK errors', () => {
123-
expect(spawn.isGarbageLineWarning('MESA: error: ZINK: failed to choose pdev')).to.be.true
124-
})
125-
126-
it('returns true for GLX driver errors', () => {
127-
expect(spawn.isGarbageLineWarning('glx: failed to create drisw screen')).to.be.true
128-
})
129-
130-
it('returns true for OOM score adjustment warnings', () => {
131-
expect(spawn.isGarbageLineWarning('[437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)')).to.be.true
132-
})
133-
})
134-
13568
context('.start', function () {
13669
// ️️⚠️ NOTE ⚠️
13770
// when asserting the calls made to spawn the child Cypress process
@@ -522,55 +455,6 @@ describe('lib/exec/spawn', function () {
522455
return spawn.start()
523456
})
524457

525-
it('does not write to process.stderr when from xlib or libudev', function () {
526-
const buf1 = Buffer.from('Xlib: something foo')
527-
const buf2 = Buffer.from('libudev something bar')
528-
const buf3 = Buffer.from('asdf')
529-
530-
this.spawnedProcess.stderr.on
531-
.withArgs('data')
532-
.onFirstCall()
533-
.yields(buf1)
534-
.onSecondCall()
535-
.yields(buf2)
536-
.onThirdCall()
537-
.yields(buf3)
538-
539-
this.spawnedProcess.on.withArgs('close').yieldsAsync(0)
540-
541-
sinon.stub(process.stderr, 'write').withArgs(buf3)
542-
os.platform.returns('linux')
543-
xvfb.isNeeded.returns(true)
544-
545-
return spawn.start()
546-
.then(() => {
547-
expect(process.stderr.write).not.to.be.calledWith(buf1)
548-
expect(process.stderr.write).not.to.be.calledWith(buf2)
549-
})
550-
})
551-
552-
it('does not write to process.stderr when from high sierra warnings', function () {
553-
const buf1 = Buffer.from('2018-05-19 15:30:30.287 Cypress[7850:32145] *** WARNING: Textured Window')
554-
const buf2 = Buffer.from('asdf')
555-
556-
this.spawnedProcess.stderr.on
557-
.withArgs('data')
558-
.onFirstCall()
559-
.yields(buf1)
560-
.onSecondCall(buf2)
561-
.yields(buf2)
562-
563-
this.spawnedProcess.on.withArgs('close').yieldsAsync(0)
564-
565-
sinon.stub(process.stderr, 'write').withArgs(buf2)
566-
os.platform.returns('darwin')
567-
568-
return spawn.start()
569-
.then(() => {
570-
expect(process.stderr.write).not.to.be.calledWith(buf1)
571-
})
572-
})
573-
574458
// https://github.com/cypress-io/cypress/issues/1841
575459
// https://github.com/cypress-io/cypress/issues/5241
576460
;['EPIPE', 'ENOTCONN'].forEach((errCode) => {

npm/cypress-schematic/src/builders/cypress/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export function startDevServer ({
114114
// for instance @nguniversal/builders:ssr-dev-server.
115115
// see https://github.com/nrwl/nx/blob/f930117ed6ab13dccc40725c7e9551be081cc83d/packages/cypress/src/executors/cypress/cypress.impl.ts
116116
if (builderName !== '@nguniversal/builders:ssr-dev-server') {
117+
// eslint-disable-next-line no-console
117118
console.info(`Passing watch mode to DevServer - watch mode is ${watch}`)
118119
overrides = {
119120
watch,

npm/cypress-schematic/src/schematics/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ function generateCTSpec ({ tree, appPath, component }: { tree: Tree, appPath: st
6969
const componentFilename = component['name'].split('.')[0]
7070
const componentName = componentMatch ? componentMatch[0] : componentFilename
7171

72+
// eslint-disable-next-line no-console
7273
console.log(`Creating new component spec for: ${componentName}\n`)
7374

7475
return tree.create(`${appPath}/${componentFilename}.component.cy.ts`, ctSpecContent({ componentName, componentFilename }))

packages/data-context/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@babel/parser": "7.28.0",
2222
"@graphql-tools/batch-execute": "^8.4.6",
2323
"@graphql-tools/delegate": "8.2.1",
24+
"@packages/stderr-filtering": "0.0.0-development",
2425
"@packages/telemetry": "0.0.0-development",
2526
"@urql/core": "2.4.4",
2627
"@urql/exchange-execute": "1.1.0",

packages/data-context/src/DataContext.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import type { IncomingHttpHeaders } from 'http'
3838
import type { App as ElectronApp } from 'electron'
3939
import { globalPubSub } from '.'
4040
import { ProjectLifecycleManager } from './data/ProjectLifecycleManager'
41+
import { logError } from '@packages/stderr-filtering'
4142
import type { CypressError } from '@packages/errors'
4243
import { resetIssuedWarnings } from '@packages/config'
4344

@@ -290,9 +291,7 @@ export class DataContext {
290291
}
291292

292293
logTraceError (e: unknown) {
293-
// TODO(tim): handle this consistently
294-
// eslint-disable-next-line no-console
295-
console.error(e)
294+
logError(e)
296295
}
297296

298297
onError = (cypressError: CypressError, title: string = 'Unexpected Error') => {

packages/data-context/src/actions/ProjectActions.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { getError } from '@packages/errors'
1414
import { resetIssuedWarnings } from '@packages/config'
1515
import type { RunSpecErrorCode } from '@packages/graphql/src/schemaTypes'
1616
import debugLib from 'debug'
17+
import { logError } from '@packages/stderr-filtering'
1718

1819
export class RunSpecError extends Error {
1920
constructor (public code: typeof RunSpecErrorCode[number], msg: string) {
@@ -209,9 +210,7 @@ export class ProjectActions {
209210
}
210211
})
211212
} catch (e) {
212-
// TODO(tim): remove / replace with ctx.log.error
213-
// eslint-disable-next-line
214-
console.error(e)
213+
logError(e)
215214
throw e
216215
}
217216
}

0 commit comments

Comments
 (0)