Skip to content

Commit b031803

Browse files
author
Blue F
authored
Merge pull request #20939 from cypress-io/issue-19299-dbus-warnings
fix: silence dbus errors
2 parents 6a4823b + eb65946 commit b031803

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

cli/lib/exec/spawn.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,21 @@ const isXlibOrLibudevRe = /^(?:Xlib|libudev)/
1616
const isHighSierraWarningRe = /\*\*\* WARNING/
1717
const isRenderWorkerRe = /\.RenderWorker-/
1818

19-
const GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe, isRenderWorkerRe]
19+
// Chromium (which Electron uses) always makes several attempts to connect to the system dbus.
20+
// This works fine in most desktop environments, but in a docker container, there is no dbus service
21+
// and Chromium emits several error lines, similar to these:
22+
23+
// [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
24+
// [1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
25+
26+
// These warnings are absolutely harmless. Failure to connect to dbus means that electron won't be able to access the user's
27+
// credential wallet (none exists in a docker container) and won't show up in the system tray (again, none exists).
28+
// Failure to connect is expected and normal here, but users frequently misidentify these errors as the cause of their problems.
29+
30+
// https://github.com/cypress-io/cypress/issues/19299
31+
const isDbusWarning = /Failed to connect to the bus:/
32+
33+
const GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe, isRenderWorkerRe, isDbusWarning]
2034

2135
const isGarbageLineWarning = (str) => {
2236
return _.some(GARBAGE_WARNINGS, (re) => {

cli/test/lib/exec/spawn_spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ describe('lib/exec/spawn', function () {
6565
[46454:0702/140217.292555:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete
6666
[46454:0702/140217.292584:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incomplete
6767
[46454:0702/140217.292612:ERROR:gles2_cmd_decoder.cc(4439)] [.RenderWorker-0x7f8bc5815a00.GpuRasterization]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete'
68+
69+
[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
70+
[1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
6871
`
6972

7073
const lines = _

0 commit comments

Comments
 (0)