Failure in test: "desktopCapturer should return a non-empty array of sources"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (1/3)...
Failure in test: "desktopCapturer should return a non-empty array of sources"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (2/3)...
Failure in test: "desktopCapturer should return a non-empty array of sources"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (3/3)...
not ok 78 desktopCapturer should return a non-empty array of sources
Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at listOnTimeout (node:internal/timers:605:17)
at processTimers (node:internal/timers:541:7)
ok 79 desktopCapturer throws an error for invalid options
Failure in test: "desktopCapturer does not throw an error when called more than once (regression)"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (1/3)...
Failure in test: "desktopCapturer does not throw an error when called more than once (regression)"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (2/3)...
Failure in test: "desktopCapturer does not throw an error when called more than once (regression)"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (3/3)...
not ok 80 desktopCapturer does not throw an error when called more than once (regression)
Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at listOnTimeout (node:internal/timers:605:17)
at processTimers (node:internal/timers:541:7)
Failure in test: "desktopCapturer responds to subsequent calls of different options"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (1/3)...
Failure in test: "desktopCapturer responds to subsequent calls of different options"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (2/3)...
Failure in test: "desktopCapturer responds to subsequent calls of different options"
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at createTimeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/errors.js:498:15)
at Test.Runnable._timeoutError (/Users/runner/work/electron/electron/src/electron/spec/node_modules/mocha/lib/runnable.js:429:10)
Retrying test (3/3)...
not ok 81 desktopCapturer responds to subsequent calls of different options
Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/electron/electron/src/electron/spec/api-desktop-capturer-spec.ts)
at listOnTimeout (node:internal/timers:605:17)
at processTimers (node:internal/timers:541:7)
ok 82 desktopCapturer returns an empty display_id for window sources
ok 83 desktopCapturer returns display_ids matching the Screen API
ok 84 desktopCapturer enabling thumbnail should return non-empty images
ok 85 desktopCapturer disabling thumbnail should return empty images
ok 86 desktopCapturer getMediaSourceId should match DesktopCapturerSource.id
ok 87 desktopCapturer getSources should not incorrectly duplicate window_id
ok 88 desktopCapturer does not affect window resizable state
ok 89 desktopCapturer moveAbove should move the window at the requested place
Confirmation
Description
The
desktopCapturertests are flaky on macos-x64 in CI (both darwin and mas).Logs
Example runs:
When investigating, look at the full macos-x64 test logs and search for
desktopCapturer. You will see lots of timeouts.CC @ckerr who recently did work trying to fix
desktopCapturertests.