Skip to content

desktopCapturer.getSources() hangs indefinitely on macOS #51125

@nikwen

Description

@nikwen

Preflight Checklist

Electron Version

43.0.0-nightly.20260416, 43.0.0-nightly.20260415

What operating system(s) are you using?

macOS

Operating System Version

macOS 26.4.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

43.0.0-nightly.20260413

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

await desktopCapturer.getSources({ types: ['window'] }) resolves.

Actual Behavior

await desktopCapturer.getSources({ types: ['window'] }) hangs indefinitely.

Maybe related: macOS shows a permission prompt only after closing the app:

Image

Testcase Gist URL

https://gist.github.com/nikwen/8313b913781d477be55f726f70db23e5

Additional Information

This is breaking tests in CI. More info in #51124.

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

Status
🛠️ Fixed for Next Release

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions