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
-
ZoiX
Dec 16, 2020 16:36
Hi there,
Copying and pasting the apps in a different folder did not work for me in Big Sur. And @LAUNZON solution worked for previous versions of MacOS too.
But seems that the "access" table now has 13 columns instead of 12 at least for Big Sur (and I think for Mojave too). So I opened the database to understand the values and was able to add UnityHub and Unity Editor in the Camera apps under the Privacy Settings.
It did not solve my issue, which is related with Vuforia and it seems something on their side and has nothing to do with Unity, however, in case you guys need to modify the database as @LAUNZON explained before in recent MacOS versions, here are the SQL instructions that you need to run to add UnityHub and/or Unity Editor:
INSERT INTO access VALUES('kTCCServiceCamera','com.unity3d.UnityHub',0,2,2,1,NULL,NULL,NULL,'UNUSED',NULL,0,1608136079);
INSERT INTO access VALUES('kTCCServiceCamera','com.unity3d.UnityEditor5.x',0,2,2,1,NULL,NULL,NULL,'UNUSED',NULL,0,1608136079);
The "0, 2, 2, 1" are based on other app values that already have Camera access, and the same for the other data after except for the first NULL, which is a Binary for other apps instead of NULL, but should not affect the entry.
The last value is for a date in timestamp format, use whichever you want. You also can run this instructions by opening the database file in TablePlus or SequelPro instead of using the terminal. Whatever is more convenient for you.
Hope it helps.
-
Viza
Jun 06, 2020 17:01
For me, both Unity and the Unity Hub are enabled in the camera privacy settings (I can't remember when and how I enabled it, but I'm pretty sure I did not done an advanced gymnastics to do it...)
My problem was - which is somewhat related to what is discussed here, so I thought I share - the the *built macos application* crashed on webcamtexture.Play.
Is seems it is also a permission issue.
When I entered a string in "project settings/Player/Other Settings/Camera Usage descriptor" field, the crash went away - the built app will ask for camera access with whatever text you entered in the mentioned field. -
VWAStudios
May 22, 2020 03:11
For a standalone mac build
We've spent some time trying to get voice permissions as well while using Vivox. While it would attempt to join a channel, it would fail silently and not actually allow the microphone to transmit.We discovered that in addition to ensuring `NSMicrophoneUsageDescription`
was in the plist in the mac app bundle package Contents when built, these entitlements also needed to be set:com.apple.security.device.audio-input
com.apple.security.device.microphone
Then the signtool must be run (and a cert may be required)Both the plist and entitlements must be done. Only modifying the plist may cause the app to crash or fail to open as described above
https://stackoverflow.com/questions/49595811/macos-entitlements-audio-input-vs-microphonehttps://docs.unity3d.com/Manual/HOWTO-PortToAppleMacStore.html
This should allow the app to popup a request for microphone permissions
-
Idealisers
Apr 27, 2020 23:53
They seemed to have fixed it according to the release notes of the Unity Hub version 2.3.1:
New Fixes
For Mac Catalina OS, Hub permissions are now passed for camera and other Unity Editor related featuresAfter testing it I can confirm the issue is solved on OSX catalina 10.15.4 and Unity 2019.3.11f1, so update unity hub and you should be good to go!
-
borwicka
Apr 09, 2020 14:45
@LAUNZONE - no problem, Thanks anyway :-)
-
Idealisers
Apr 06, 2020 11:00
This is how I got my 10.15.4 Catalina to workaround this problem :
1. Move Unity Hub and Unity folder from Applications to Documents( or any other place )
2. Start your unity editor from Unity/Hub/Editor folder
3. New camera and microphone permission are asked
4. When wanting to use unity hub features ( like collab for instance ) move unity hub to Applications again and signin from the unity editor. When done move Unity hub back to documents.Maybe this workaround is useful for somebody.
-
launzone
Apr 06, 2020 03:29
@ELMEGREN oh good to know that it can also work with SIP enabled, just wonder why it didn't for me.. glad that this workaround helped some people so far!
-
elmegren
Apr 05, 2020 10:15
Hey!
I just wanted to report that I got it working using @Launzone's workaround *without* disabling the System Integrity Protection (my machine, a work laptop, prohibits me from doing so as it's firmware password protected preventing me from even going into Recovery Mode). "csrutil status" does report that SIP is enabled.
I'm on Mojave 10.14.6 with Unity Hub 2.3.0 and Unity 2020.1.0b4.
Thanks for sharing the workaround Launzone!
-
launzone
Apr 03, 2020 18:31
mojave or later I guess
-
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.
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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Resolution Note:
Fixed in Hub 2.3.1