Search Issue Tracker

Active

Fixed in 2019.3

Votes

23

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

MacOS

-

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

------------------------
Fixed in 2019.3.0f5

Update!
The issue is still reproducible after the fix!
Reproduced with: 2019.3.5f1, 2020.1.0a26, 2020.2.0a2

Comments (17)

  1. 2c17b4e452db05c8e15d69eaa0d0d67e?d=mm

    launzone

    Apr 03, 2020 18:31

    mojave or later I guess

  2. 2c17b4e452db05c8e15d69eaa0d0d67e?d=mm

    launzone

    Apr 03, 2020 18:29

    @BORWICKA sorry i should have mentioned, this fix is for Mac OS Mojave (I am currently running version 10.14) so i am actually not sure how the situation was on El Capitan. It seems like those permission things changed.

  3. 2030886903c246ac537f370902d15987?d=mm

    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!

  4. 93ef426282b490a579c84e0f0c5b98c2?d=mm

    Maidenman

    Apr 03, 2020 09:16

    Big THANK YOU @launzone - your solution works for me perfectly!

  5. A4c6eaf07f2182399b4cd98e0d984811?d=mm

    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).

  6. A4c6eaf07f2182399b4cd98e0d984811?d=mm

    dskillsaw

    Apr 01, 2020 18:44

    (ignore my comment below. Didn't realize your most recent post was the workaround to try)

  7. A4c6eaf07f2182399b4cd98e0d984811?d=mm

    dskillsaw

    Apr 01, 2020 18:13

    @LAUWISMEMAR, what was your workaround?

  8. 2c17b4e452db05c8e15d69eaa0d0d67e?d=mm

    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.

  9. E3f43a13fe08d403ec34f7acd977fdaf?d=mm

    Aiviator3

    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.

  10. 5109ea8ca61f797d535f96a3b5eb29dd?d=mm

    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/3K6zA0j

    But what about microphone? Same applies to microphone permissions.
    Please fix it also for microphone.

    Thank you

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.