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

atom-hydra on mac catalina not requesting mic or camera permissions #35

Open
jholtzkener-at-cbc opened this issue Nov 15, 2020 · 13 comments

Comments

@jholtzkener-at-cbc
Copy link

Atom-hydra does not request permission to use the microphone or the camera on my macbook (running macOS Catalina 10.15.7). When running code in hydra such as a.show() or s0.initCam(), I get no errors, but the the system does not ask for permission to use the mic or the camera and silently fails.

I can see in the System Preferences that Atom does not have the option to allow microphone use (i.e., there is no checkbox). The same is true for the camera.

Screen Shot 2020-11-15 at 10 17 24 AM

In contrast, when I run code for producing feedback, it did ask for permission for Screen Recording, and this is visible in the System Preferences:

Screen Shot 2020-11-15 at 10 17 06 AM

I have tried reinstalling Atom and atom-hydra, as well as resetting the privacy settings with tccutil reset, but it has no effect - it asks permissions again for screen recording, but does not ask for camera or microphone

@pkarydogiannis
Copy link

Same issue in Mojave.

@elunaj
Copy link
Contributor

elunaj commented Dec 23, 2020

I’m also experiencing this in Big Sur 11.1.

Is anyone working on this issue? If not, I’d like to volunteer. I use this package a ton and would like to contribute to it. I can’t promise a solution, but I’d give it a go :)

@livacengiz
Copy link

hi folks,

i worked this issue. but it's so complex for me. I think this problem is caused by atom. I tried it with veda but I could not be successful there either.

I am open to ideas.
I would like to solve this problem :)

@ojack
Copy link
Member

ojack commented Jan 6, 2021

I have been trying as well, but have no solution so far.
It is related to electron/electron#20498 and there is further information at https://github.com/ojack/hydra/issues/103.

So far, I have been able to access system preferences from inside the hydra plugin by including them in main.js as follows.

import { desktopCapturer, remote } from 'electron'
const { systemPreferences } = remote

However, running systemPreferences.askForMediaAccess('microphone') causes Atom to crash. It seems related to the plist entries documented above, but I can't figure out how to edit those in Atom.

@elunaj @livacengiz any help with this is greatly appreciated! Feel free to comment here or in the dev channel at the hydra discord https://discord.gg/82EYfdFEmz

@elunaj
Copy link
Contributor

elunaj commented Jan 6, 2021

@ojack sure, I'll gladly take a look at this! Also, I joined the hydra discord.

@jidagraphy
Copy link

are there no updates to this issue? macOS Big Sur, and can confirm it still doesnt work, and i cant seem to find any reference to atom's permission granting :(

@xu-hong
Copy link

xu-hong commented Aug 24, 2021

Also following up on this thread - Catalina still doesn't work

@ffd8
Copy link

ffd8 commented Oct 10, 2021

Processing on 10.15+ had a similar issue – maaaybe opening via Terminal can request the right premissions??https://www.youtube.com/watch?v=xNa_ua_esmw

@jholtzkener-at-cbc
Copy link
Author

jholtzkener-at-cbc commented Oct 12, 2021

@ffd8 That was a good suggestion - but unfortunately I still get the silent failure when I open via Terminal (in the way suggested in the video)

edit: my mistake - it worked for me!

@ojack
Copy link
Member

ojack commented Oct 12, 2021

@jholtzkener-at-cbc It actually just worked for me! when I combined the terminal method with the systemPreferences.askForMediaAccess('microphone') and systemPreferences.askForMediaAccess('camera') from above. It is still not requesting permission, but just started to show my camera.

Screenshot 2021-10-12 at 15 01 29

I added electron system preferences to the global namespace in atom-hydra.
Hopefully these are the steps to recreate this:

  1. update the atom-hydra package to the latest version (should be version 0.3.6)
  2. open Atom following @ffd8's video above, by first right clicking on the atom icon, clicking Show Package Contents > Contents > MacOS > Atom
  3. Toggle atom-hydra to on
  4. open the Atom developer tools. type systemPreferences.askForMediaAccess('microphone') and click enter. type systemPreferences.askForMediaAccess('camera') and click enter.
  5. You can try running the camera at this stage in atom-hydra. However, for me it didn't work until I fully exited everything and rejoined.
  6. quit atom
  7. open atom again following step 2. Turn on atom-hydra. Run the following code:
s0.initCam()
src(s0).out()

It now continuously works for me if I open atom via the terminal. Still would like to find a better way to solve this, but hopefully it works for others in the meantime.

@jholtzkener-at-cbc
Copy link
Author

@ojack, I tried it again after seeing your post, and it works! I didn't even get to systemPreferences.askForMediaAccess('microphone') and systemPreferences.askForMediaAccess('camera') before it asked permissions. I think that perhaps the only steps I was missing the first time was restarting atom (and possibly updating atom-hydra).

Anyway, thank you @ffd8 and @ojack !

@ojack
Copy link
Member

ojack commented Oct 12, 2021

@jholtzkener-at-cbc so happy to hear that!! mine still doesn't request permissions, but at least it works in the meantime

@ffd8
Copy link

ffd8 commented Oct 12, 2021

Woohoo – happy to hear it worked! (yeah, closing and re-opening seems to be key).
Curious if continues working from just opening app (without launching via terminal)?
... otherwise just need to add that fancy binary to the dock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants