Skip to content

fix: Redirect spammy electron stderr to a debug sink #32188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
3e772ee
wip: system test to reproduce
cacieprins Aug 7, 2025
d830ed8
system test for alsa stderr
cacieprins Aug 8, 2025
5f8528a
split cypress from 3rd party stderr at parent process to electron child
cacieprins Aug 8, 2025
f618cd6
rm garbage warning regexes
cacieprins Aug 8, 2025
de717a7
fix newline behavior when parsing internal stderr
cacieprins Aug 8, 2025
5fa8203
migrate left over console errors
cacieprins Aug 8, 2025
734e611
clean up system test name
cacieprins Aug 8, 2025
866415f
fix typed import
cacieprins Aug 8, 2025
87d5fa9
extract stderr splitting to separate pkg so runner can use @packages/…
cacieprins Aug 8, 2025
7d9898e
rm new err log from packherd-quire
cacieprins Aug 11, 2025
dd646b3
handle backpressure
cacieprins Aug 11, 2025
a3f935e
docs
cacieprins Aug 11, 2025
a893e29
some unit tests & coverage for stderr-filtering
cacieprins Aug 11, 2025
69487a0
unit tests
cacieprins Aug 11, 2025
b2ab667
no longer test regexp specific output in spawn unit tests
cacieprins Aug 12, 2025
a60d4f8
filter enabled debug namespaces rather than just cypress namespacesc
cacieprins Aug 13, 2025
c5eae1c
revise stream splitting et al
cacieprins Aug 13, 2025
2bbf290
try to fix v8 snapshot build??
cacieprins Aug 13, 2025
53764e9
Merge branch 'develop' into fix/audio-error-stdout
cacieprins Aug 14, 2025
bb32eb6
fix console.log assertion
cacieprins Aug 14, 2025
3bf6824
add missing eslint config
cacieprins Aug 14, 2025
256ee49
rm unused spies
cacieprins Aug 14, 2025
bc87235
fix regexp for optional leading wsp and ansi on debug entries
cacieprins Aug 14, 2025
4760d92
update unit tests because sinon
cacieprins Aug 14, 2025
7139dfc
lint
cacieprins Aug 14, 2025
ecd3ebd
colon..
cacieprins Aug 14, 2025
3f205cc
build stderr-filtering before checking if binary exists
cacieprins Aug 15, 2025
b5a2877
adds TagStream transform stream, fixes stderr from child proc config
cacieprins Aug 15, 2025
0415b4e
add build-prod script for stderr-filtering
cacieprins Aug 15, 2025
443f669
changelog
cacieprins Aug 15, 2025
b5035ac
Merge branch 'develop' into fix/audio-error-stdout
cacieprins Aug 15, 2025
2cc0265
properly handle backpressure in prefixed content transform stream
cacieprins Aug 15, 2025
a49a6ea
use standard tsconfig?
cacieprins Aug 15, 2025
62589f9
better tsconfig
cacieprins Aug 15, 2025
09d5937
Add pkgStderrFiltering to monorepoPaths
jennifer-shehane Aug 15, 2025
3953456
add \"files\" manifest
cacieprins Aug 18, 2025
b24aa0b
pipe all stderr to stderr when CYPRESS_INTERNAL_DEBUG_ELECTRON is ena…
cacieprins Aug 18, 2025
33e6b54
Merge branch 'develop' into fix/audio-error-stdout
jennifer-shehane Aug 18, 2025
b1f1b69
rm explicit build of stderr-filtering in check-if-binary-exists step
cacieprins Aug 18, 2025
7ae230e
ensure all dependencies of scripts/ are built before scripts are exec…
cacieprins Aug 18, 2025
0ddf849
fix dev version ref
cacieprins Aug 18, 2025
72a6a34
swap logic
cacieprins Aug 18, 2025
b241c67
add stdin piping
cacieprins Aug 18, 2025
8a4f1ea
fix exec name on the run-on-dependencies command to be more useful
cacieprins Aug 18, 2025
6e35818
use correct env
cacieprins Aug 18, 2025
8d82ccb
Merge branch 'develop' into fix/audio-error-stdout
cacieprins Aug 18, 2025
c9aa13e
rm obsolete type refs
cacieprins Aug 18, 2025
96f9b9e
Merge branch 'develop' into fix/audio-error-stdout
cacieprins Aug 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1268,13 +1268,32 @@ commands:

check-if-binary-exists:
steps:
- run-on-dependencies:
package: internal-scripts
command: build
- run:
name: Check if binary exists, exit if it does
command: |
source ./scripts/ensure-node.sh
yarn gulp e2eTestScaffold
yarn check-binary-on-cdn --version $(node ./scripts/get-next-version.js) --type binary --file cypress.zip

run-on-dependencies:
parameters:
package:
description: Package to build all dependencies for. All dependencies in the
dependency chain must have a build script.
type: string
command:
description: Command to run on the dependencies.
type: string
steps:
- run:
name: Exec << parameters.command >> recursively on << parameters.package >>
dependencies.
command: |
yarn lerna run <<parameters.command>> --scope=<<parameters.package>> --include-dependencies

build-and-package-binary:
steps:
- run:
Expand Down
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ _Released 08/12/2025 (PENDING)_
- 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).
- 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).
- 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).
- 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)
- 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).

**Misc:**
Expand Down
122 changes: 0 additions & 122 deletions cli/lib/exec/spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,126 +4,13 @@ const cp = require('child_process')
const path = require('path')
const Promise = require('bluebird')
const debug = require('debug')('cypress:cli')
const debugVerbose = require('debug')('cypress-verbose:cli')

const util = require('../util')
const state = require('../tasks/state')
const xvfb = require('./xvfb')
const verify = require('../tasks/verify')
const errors = require('../errors')
const readline = require('readline')

const isXlibOrLibudevRe = /^(?:Xlib|libudev)/
const isHighSierraWarningRe = /\*\*\* WARNING/
const isRenderWorkerRe = /\.RenderWorker-/
// This is a warning that occurs when running in a container on Linux.
// https://github.com/cypress-io/cypress/issues/29563
// Example:
// [437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)
const isOOMScoreWarningRe = /Failed to adjust OOM score of renderer with pid/

// Chromium (which Electron uses) always makes several attempts to connect to the system dbus.
// This works fine in most desktop environments, but in a docker container, there is no dbus service
// and Chromium emits several error lines, similar to these:

// [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
// [1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon

// These warnings are absolutely harmless. Failure to connect to dbus means that electron won't be able to access the user's
// credential wallet (none exists in a docker container) and won't show up in the system tray (again, none exists).
// Failure to connect is expected and normal here, but users frequently misidentify these errors as the cause of their problems.

// https://github.com/cypress-io/cypress/issues/19299
const isDbusWarning = /Failed to connect to the bus:/

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

/**
* Electron logs benign warnings about Vulkan when run on hosts that do not have a GPU. This is coming from the primary Electron process,
* and not the browser being used for tests.
* Samples:
* 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)
* 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)
* 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)
* 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.
*/

const isHostVulkanDriverWarning = /^Warning:.+(#LDP_DRIVER_7|VK_LAYER_MESA_device_select).+/

/**
* Electron logs benign warnings about Vulkan when run in docker containers whose host does not have a GPU. This is coming from the primary
* Electron process, and not the browser being used for tests.
* Sample:
* Warning: vkCreateInstance: Found no drivers!
* Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
* at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
* at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
* at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
* at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
* at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
*/

const isContainerVulkanDriverWarning = /^Warning: vkCreateInstance/

const isContainerVulkanStack = /^\s*at (CheckVkSuccessImpl|CreateVkInstance|Initialize|Create|operator).+(VulkanError|BackendVk).cpp/

/**
* In Electron 32.0.0 a new debug scenario log message started appearing when iframes navigate to about:blank. This is a benign message.
* https://github.com/electron/electron/issues/44368
* Sample:
* [78887:1023/114920.074882:ERROR:debug_utils.cc(14)] Hit debug scenario: 4
*/
const isDebugScenario4 = /^\[[^\]]+debug_utils\.cc[^\]]+\] Hit debug scenario: 4/

/**
* In Electron 32.0.0 a new EGL driver message started appearing when running on Linux. This is a benign message.
* https://github.com/electron/electron/issues/43415
* Sample:
* [78887:1023/114920.074882:ERROR:gl_display.cc(14)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.
*/
const isEGLDriverMessage = /^\[[^\]]+gl_display\.cc[^\]]+\] EGL Driver message \(Error\) eglQueryDeviceAttribEXT: Bad attribute\./

/**
* Mesa/GLX related warnings that occur in certain Linux environments without proper GPU support
* or when running in containers. These are benign warnings that don't affect functionality.
* Samples:
* error: XDG_RUNTIME_DIR is invalid or not set in the environment.
* MESA: error: ZINK: failed to choose pdev
* glx: failed to create drisw screen
*/
const isXdgRuntimeError = /^error: XDG_RUNTIME_DIR is invalid or not set/
const isMesaZinkError = /^MESA: error: ZINK: failed to choose pdev/
const isGlxDriverError = /^glx: failed to create drisw screen/

const GARBAGE_WARNINGS = [
isXlibOrLibudevRe,
isHighSierraWarningRe,
isRenderWorkerRe,
isOOMScoreWarningRe,
isDbusWarning,
isCertVerifyProcBuiltin,
isHostVulkanDriverWarning,
isContainerVulkanDriverWarning,
isContainerVulkanStack,
isDebugScenario4,
isEGLDriverMessage,
isXdgRuntimeError,
isMesaZinkError,
isGlxDriverError,
]

const isGarbageLineWarning = (str) => {
return _.some(GARBAGE_WARNINGS, (re) => {
return re.test(str)
})
}

function isPlatform (platform) {
return os.platform() === platform
}
Expand Down Expand Up @@ -161,8 +48,6 @@ function getStdio (needsXvfb) {
}

module.exports = {
isGarbageLineWarning,

start (args, options = {}) {
const needsXvfb = xvfb.isNeeded()
let executable = state.getPathToExecutable(state.getBinaryDir())
Expand Down Expand Up @@ -316,13 +201,6 @@ module.exports = {
child.stderr.on('data', (data) => {
const str = data.toString()

// bail if this is warning line garbage
if (isGarbageLineWarning(str)) {
debugVerbose(str)

return
}

// if we have a callback and this explicitly returns
// false then bail
if (onStderrData && onStderrData(str)) {
Expand Down
116 changes: 0 additions & 116 deletions cli/test/lib/exec/spawn_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require('../../spec_helper')

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

context('.isGarbageLineWarning', () => {
it('returns true', () => {
const str = `
[46454:0702/140217.292422:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete
[46454:0702/140217.292466:ERROR:gles2_cmd_decoder.cc(17788)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[46454:0702/140217.292526:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incomplete
[46454:0702/140217.292555:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete
[46454:0702/140217.292584:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incomplete
[46454:0702/140217.292612:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete'

[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
[1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon

[3801:0606/152837.383892:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for www.googletagmanager.com failed:
----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=www.googletagmanager.com) -----
ERROR: No matching issuer found

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)
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)
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)
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.

Warning: vkCreateInstance: Found no drivers!
Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)

[78887:1023/114920.074882:ERROR:debug_utils.cc(14)] Hit debug scenario: 4

[18489:0822/130231.159571:ERROR:gl_display.cc(497)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.

[437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)
`

const lines = _
.chain(str)
.split('\n')
.invokeMap('trim')
.compact()
.value()

_.each(lines, (line) => {
expect(spawn.isGarbageLineWarning(line), `expected line to be garbage: ${line}`).to.be.true
})
})

it('returns true for XDG runtime dir warnings', () => {
expect(spawn.isGarbageLineWarning('error: XDG_RUNTIME_DIR is invalid or not set')).to.be.true
})

it('returns true for MESA ZINK errors', () => {
expect(spawn.isGarbageLineWarning('MESA: error: ZINK: failed to choose pdev')).to.be.true
})

it('returns true for GLX driver errors', () => {
expect(spawn.isGarbageLineWarning('glx: failed to create drisw screen')).to.be.true
})

it('returns true for OOM score adjustment warnings', () => {
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
})
})

context('.start', function () {
// ️️⚠️ NOTE ⚠️
// when asserting the calls made to spawn the child Cypress process
Expand Down Expand Up @@ -522,55 +455,6 @@ describe('lib/exec/spawn', function () {
return spawn.start()
})

it('does not write to process.stderr when from xlib or libudev', function () {
const buf1 = Buffer.from('Xlib: something foo')
const buf2 = Buffer.from('libudev something bar')
const buf3 = Buffer.from('asdf')

this.spawnedProcess.stderr.on
.withArgs('data')
.onFirstCall()
.yields(buf1)
.onSecondCall()
.yields(buf2)
.onThirdCall()
.yields(buf3)

this.spawnedProcess.on.withArgs('close').yieldsAsync(0)

sinon.stub(process.stderr, 'write').withArgs(buf3)
os.platform.returns('linux')
xvfb.isNeeded.returns(true)

return spawn.start()
.then(() => {
expect(process.stderr.write).not.to.be.calledWith(buf1)
expect(process.stderr.write).not.to.be.calledWith(buf2)
})
})

it('does not write to process.stderr when from high sierra warnings', function () {
const buf1 = Buffer.from('2018-05-19 15:30:30.287 Cypress[7850:32145] *** WARNING: Textured Window')
const buf2 = Buffer.from('asdf')

this.spawnedProcess.stderr.on
.withArgs('data')
.onFirstCall()
.yields(buf1)
.onSecondCall(buf2)
.yields(buf2)

this.spawnedProcess.on.withArgs('close').yieldsAsync(0)

sinon.stub(process.stderr, 'write').withArgs(buf2)
os.platform.returns('darwin')

return spawn.start()
.then(() => {
expect(process.stderr.write).not.to.be.calledWith(buf1)
})
})

// https://github.com/cypress-io/cypress/issues/1841
// https://github.com/cypress-io/cypress/issues/5241
;['EPIPE', 'ENOTCONN'].forEach((errCode) => {
Expand Down
1 change: 1 addition & 0 deletions npm/cypress-schematic/src/builders/cypress/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export function startDevServer ({
// for instance @nguniversal/builders:ssr-dev-server.
// see https://github.com/nrwl/nx/blob/f930117ed6ab13dccc40725c7e9551be081cc83d/packages/cypress/src/executors/cypress/cypress.impl.ts
if (builderName !== '@nguniversal/builders:ssr-dev-server') {
// eslint-disable-next-line no-console
console.info(`Passing watch mode to DevServer - watch mode is ${watch}`)
overrides = {
watch,
Expand Down
1 change: 1 addition & 0 deletions npm/cypress-schematic/src/schematics/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function generateCTSpec ({ tree, appPath, component }: { tree: Tree, appPath: st
const componentFilename = component['name'].split('.')[0]
const componentName = componentMatch ? componentMatch[0] : componentFilename

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

return tree.create(`${appPath}/${componentFilename}.component.cy.ts`, ctSpecContent({ componentName, componentFilename }))
Expand Down
1 change: 1 addition & 0 deletions packages/data-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@babel/parser": "7.28.0",
"@graphql-tools/batch-execute": "^8.4.6",
"@graphql-tools/delegate": "8.2.1",
"@packages/stderr-filtering": "0.0.0-development",
"@packages/telemetry": "0.0.0-development",
"@urql/core": "2.4.4",
"@urql/exchange-execute": "1.1.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/data-context/src/DataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import type { IncomingHttpHeaders } from 'http'
import type { App as ElectronApp } from 'electron'
import { globalPubSub } from '.'
import { ProjectLifecycleManager } from './data/ProjectLifecycleManager'
import { logError } from '@packages/stderr-filtering'
import type { CypressError } from '@packages/errors'
import { resetIssuedWarnings } from '@packages/config'

Expand Down Expand Up @@ -290,9 +291,7 @@ export class DataContext {
}

logTraceError (e: unknown) {
// TODO(tim): handle this consistently
// eslint-disable-next-line no-console
console.error(e)
logError(e)
}

onError = (cypressError: CypressError, title: string = 'Unexpected Error') => {
Expand Down
5 changes: 2 additions & 3 deletions packages/data-context/src/actions/ProjectActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { getError } from '@packages/errors'
import { resetIssuedWarnings } from '@packages/config'
import type { RunSpecErrorCode } from '@packages/graphql/src/schemaTypes'
import debugLib from 'debug'
import { logError } from '@packages/stderr-filtering'

export class RunSpecError extends Error {
constructor (public code: typeof RunSpecErrorCode[number], msg: string) {
Expand Down Expand Up @@ -209,9 +210,7 @@ export class ProjectActions {
}
})
} catch (e) {
// TODO(tim): remove / replace with ctx.log.error
// eslint-disable-next-line
console.error(e)
logError(e)
throw e
}
}
Expand Down
Loading
Loading