CoreGraphics.CGWindowListCreateImage() failed when running as a system process.
See original GitHub issueGeneral information:
- OS name: macOS Catalina
- OS version: 10.15
- OS architecture: 64 bits
- Resolutions:
- Monitor 1: 1920x1080
- Python version: 3.7.3
- MSS version: 3.2.0
Description of the warning/error
I’m trying to run my python program as a launchd daemon process since its a REST flask app that needs to be running at all times and needs to have the ability to relaunch if the macOS gets rebooted.
One of the endpoints allows me to grab a screenshot of the current monitor. I really like to use your library for the lower level performance… but running as a launchd it seems that this will always fail to create the Image from the CoreGraphics.
CoreGraphics.CGWindowListCreateImage() failed.
Otherwise it works as long as it’s being executed as the user, or even executing sudo
on the python script works fine.
Am i missing something with System context and CoreGraphics API’s ?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
CGWindowListCreateImage(_:_:_:_:) - Apple Developer
Returns a composite image based on a dynamically generated list of windows. macOS 10.5+ Mac Catalyst 13.1+. Declaration.
Read more >Capture screenshot of macOS window - Stack Overflow
Screen capture on macOS is possible through Quartz Window Services, a facility of the Core Graphics framework.
Read more >I made a 'system ran out of application memory' virus by ...
I left my extension running for a while on my Mac, and noticed a 'system ran out of application memory' error and a...
Read more >Tools/ChangeLog - chromium/blink - Git at Google
Scripts/run-gtk-tests: Ignore files whose name does not start ... [WebWorkers][Chromium] Remove remains of cross-process dedicated worker implementation.
Read more >How does the (screen) capture work? - Objective-See
Unfortunately, the sound is played very early in the process. ... a function that calls _CGDisplayCreateImage of the CoreGraphics framework.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I do not have a macOS machine anymore. If someone wants to give a hand, that would be great 😃
Same error whenever I run it from cron. Works fine when triggered explicitly from terminal