Skip to content
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

Processing cannot access Camera in macOS Catalina #144

Closed
toyoxx opened this issue Jan 23, 2020 · 5 comments
Closed

Processing cannot access Camera in macOS Catalina #144

toyoxx opened this issue Jan 23, 2020 · 5 comments

Comments

@toyoxx
Copy link

toyoxx commented Jan 23, 2020

Description

Since the launch of Catalina, Apple requires the apps to explicitly ask for permission in order to access Files, Camera, Microphone, etc. The Processing Development Environment does not prompt for permission to use the Camera, so whenever I try to run a sketch that uses the camera, it fails. I cannot set the permissions through Settings -> Security & Privacy -> Camera because the app never requests for it, so my hands are tied.

Expected Behavior

The sketch should activate the camera and show the camera feed

Current Behavior

Currently, I run the project, and then it tells me:

Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help → Troubleshooting.

Steps to Reproduce

To reproduce it, you can open any example from the video library that uses the camera.

  1. Open Examples -> Video -> Capture -> AsciiVideo
  2. Run the sketch

Your Environment

  • Processing version: 3.5.4
  • Operating System and OS version: macOS Catalina 10.15.2
  • Other information: video library patched to work on Catalina, following the solution to this issue on video library

Possible Causes / Solutions

Through some research, some people mention that "if your app uses device cameras, include the NSCameraUsageDescription key in your app’s Info.plist file". I tried to add this key in the Info.plist at /Applications/Processing.app/Contents/ but the PDE stops working. Maybe it's related to this?

@Bobby54
Copy link

Bobby54 commented Jan 23, 2020

I don't work on any of the iOS Systems, but most OSs have the possibility to set permissions for applications manually without having them ask for it. So if you check the permissions Processing has on your machine you might be able to allow camera use or might even be able to set Processing as a trusted application.
This would be my only idea on how to fix this.

@benfry benfry transferred this issue from processing/processing Jan 23, 2020
@vwls
Copy link

vwls commented Jan 30, 2020

In early December I had success patching what I believe was the same issue discussed above. See here for the (temporary) solution:
#134 (comment)

That said, I now run into the issue and cannot solve it with the operations that had worked previously.

Not sure if it's Apple, Processing, or Gstreamer that is best positioned to fix this, but hoping for a fix soon!

@Moonraker069
Copy link

This is not limited to this use case. I have OBS, Global Meet Conferencing, terminal, and others terminating upon launch OR upon access to a camera. Global Meet works great until I turn on the camera in a conference. The moment camera / microphone access is selected, the app terminates.

The issue is related to this security item, specifically - access certain devices, folders, resources, etc. may or may not permit the application to run. Note that even when the application shows up and is enabled in the security settings, this behavior is the same for these applications.

In addition, programs that are terminated upon launch because they access those resources immediately, do not show up in the settings to permit them to be enabled.

So as the original poster stated, a fully patched system with the latest software will still cause programs to terminate because of this security feature and some sort of permissions. If we could know how to bypass or enable the programs to access what they need, this can be resolved.

@christo
Copy link

christo commented Jun 23, 2020

This is very closely related to #134 - possibly best called a duplicate although both issues contain valuable detail.

@benfry
Copy link
Contributor

benfry commented Oct 8, 2020

Closing as duplicate of #134.

@benfry benfry closed this as completed Oct 8, 2020
@processing processing locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants