-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
CoreGraphics.CGWindowListCreateImage() failed when running as a system process. #133
Comments
In "Utilities > Console", do you have an error that may help us? |
Thanks for the prompt response. I've been rummaging through the console logs and can't seem to find anything directly related to the CoreGraphics besides some CoreCapture crash logs which doesn't pertain anything related to the CoreGraphics module. Do you have an idea on what error message could possibly look like ? I also think this is a security thing involved as well.. The launchd code is a 0. And runs fine, but once I hit that endpoint /screenshot which utilizes your mss library it will fail to get that screen capture with I have a potential work around idea of executing a subprocess script which will stdout the binary image as a different user. |
Update: I tried launching a forked screenshot process and executing as another user and will still get a failure with the CoreGraphics module... will need to look until other solutions until this is fixed |
Could you post what is needed to reproduce locally?
--
Mickaël Schoentgen
Site web : http://www.tiger-222.fr
|
Same error whenever I run it from cron. Works fine when triggered explicitly from terminal |
I do not have a macOS machine anymore. If someone wants to give a hand, that would be great :) |
General information:
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 ?
Upvote & Fund
The text was updated successfully, but these errors were encountered: