Search Issue Tracker
Fixed
Fixed in 2019.3.X
Votes
28
Found in
2019.1.0a10
2019.2.14f1
Issue ID
1202032
Regression
Yes
[OSX] Unity fails to ask camera permission and crashes on privacy violation
How to reproduce:
1. Open the "WebCam_Crash.zip" project
2. Open the "SampleScene" scene
3. Enter Play Mode
Actual result: Unity crashes.
Reproducible with: 2020.1.0a15, 2019.3.0f2, 2019.2.15f1, 2019.2.0a1, 2019.1.14f1, 2019.1.0a10.
Regression introduced in: 2019.1.0a10.
Not reproducible with: 2019.1.0a9, 2018.4.14f1, 2017.4.35f1.
Notes:
- same crash happens when using Vuforia.
- Reproducible on both OSX Standalone and Editor
-
borwicka
Apr 03, 2020 13:44
@launzone - I tried your method, although I get this response in Terminal at Step #4: "table access has 7 columns but 12 values were supplied". Do you have any suggestions for how to remedy this?! Running OS 10.11.6. Thanks!
-
Maidenman
Apr 03, 2020 09:16
Big THANK YOU @launzone - your solution works for me perfectly!
-
dskillsaw
Apr 02, 2020 18:09
I followed LAUNZONE's fix from the march 30 comment. Fixed it for me!\
Catalina's permission issues are absolutely nightmarish :(
Please unity prioritize this issue (even though I'm sure it's Apple's fault in this case).
-
dskillsaw
Apr 01, 2020 18:44
(ignore my comment below. Didn't realize your most recent post was the workaround to try)
-
dskillsaw
Apr 01, 2020 18:13
@LAUWISMEMAR, what was your workaround?
-
launzone
Mar 30, 2020 04:10
Hey everyone, I know that this is not ideal and unity or apple should come up with a better solution eventually but here is what works for me and is pretty sure to work for everyone that can't add microphone or camera permission to unity hub. It is kind of weird and you have to disable SIP (system integrity protection) for a couple of minutes to do it, so maybe read up on that first if you are worried (I was not).
1) Disable SIP: Go into recovery mode (hold CMD+R when you restart your Mac) Don't be afraid, we are not doing anything crazy.
2) After that open Terminal (it should be accessible from one of the Menus at the Top) Type in "csrutil disable" and hit enter. Then reboot your Mac normally.
3) Open Terminal and type in: "sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db" and hit enter
4) For microphone access, type in: "INSERT INTO access VALUES('kTCCServiceMicrophone','com.unity3d.unityhub',0,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);" and hit enter
For camera, type in: "INSERT INTO access VALUES('kTCCServiceCamera','com.unity3d.unityhub',0,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);" and hit enter
6) check in your SystemPreferences/Security&Privacy > unity hub should now show up in both mic and cam
7) reboot in recovery mode again (CMD+R), open terminal again, type in: "csrutil enable" and hit enter, to enable SIP again
8) reboot normally and enjoy!
That's it! I hope it works for you. Don't forget the step 7, I think it is important for Security.
-
Idealisers
Mar 25, 2020 13:55
I thought I fixed this issue on 2019.3.6f1 but after Catalina update (10.15.4) I can't get it to work again. So it seems the mac os update messed up my camera permissions again for unity.
Permissions are not asked when running a project in 2019.3.6f1 and my app that uses the camera crashes inside the editor in playmode.
I used tccutil reset Camera to get rid of all camera permissions, uninstalled all unity versions, uninstalled unity hub, reinstalled unity hub and unity, but all to no avail.
I guess I need to move to a windows unity machine. -
marcin-walus
Mar 25, 2020 08:02
Hello,
I spot that Unity 2019.3.6 has proper key in Info.plist.... for camera, so it should work
https://imgur.com/3K6zA0jBut what about microphone? Same applies to microphone permissions.
Please fix it also for microphone.Thank you
-
marcin-walus
Mar 21, 2020 14:15
Just to give Unity guys a hint how to solve this issue:
https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos -
marcin-walus
Mar 21, 2020 13:50
Hello.
I have same issue on Unity 2019.2.17f1 on freshly installed macOS Catalina 10.15.3
Solution with removing UnityHub and using Unity app directly works.I can't believe that so basic OS functionality is not handled correctly by Unity - this is not new macOS feature which came yesterday. I think this issue is not related to Unity version it should be fixed in UnityHub since this process is starting Unity app instances.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
- "Unable to get the list of approved APIs." is thrown when testing the App Packages with Windows App Certification Kit
Resolution Note:
Fixed in Hub 2.3.1