Agora-Unreal-RTC-SDK icon indicating copy to clipboard operation
Agora-Unreal-RTC-SDK copied to clipboard

Mac Issue with Mic

Open HereafterApps opened this issue 2 years ago • 10 comments

As i notice @WinterPu You updated the readme with an update for unreal 5 with mac.

I tried this, however, when opening the plist within unreal at the path you mentioned, there is already a mic permission mentioned there.

Unsure of what to do with that.

At the moment we have no mic access on mac.

HereafterApps avatar Nov 21 '23 22:11 HereafterApps

That is used to add the Camera permission. I noticed that if you directly change the info.plist in your app, it may not work well for UE5. Another way to do it is by modifying the info.plist template in the Build/Mac/Resources folder under your project.

WinterPu avatar Nov 22 '23 02:11 WinterPu

I dont seem to have a Build/Mac/Resources in my project folder. Should i make it?

HereafterApps avatar Nov 22 '23 06:11 HereafterApps

No, in this case, which version of UE are you using?

WinterPu avatar Nov 22 '23 07:11 WinterPu

Im using UE5.2.

HereafterApps avatar Nov 22 '23 21:11 HereafterApps

Post build, i have been running this:

write_note(f'Adding plist entries in: {app_path}')
os.system("/usr/libexec/PlistBuddy -c \"Add :NSCameraUsageDescription string Required for videos so others can see you\" "+app_path+"/Contents/Info.plist >> "+mac_log_file) 
os.system("/usr/libexec/PlistBuddy -c \"Add :NSMicrophoneUsageDescription string Required for voice to talk to others\" "+app_path+"/Contents/Info.plist >> "+mac_log_file) 
os.system("/usr/libexec/PlistBuddy -c \"Add :NSPhotoLibraryUsageDescription string Required for Avatar Manager\" "+app_path+"/Contents/Info.plist >> "+mac_log_file)
os.system("/usr/libexec/PlistBuddy -c \"Add :NSPhotoLibraryAddUsageDescription string Required for Avatar Manager\" "+app_path+"/Contents/Info.plist >> "+mac_log_file) 
os.system("/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion "+str(package_version)+"\" "+app_path+"/Contents/Info.plist >> "+mac_log_file)
os.system("/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString "+str(package_version)+"\" "+app_path+"/Contents/Info.plist >> "+mac_log_file) 
os.system("/usr/libexec/PlistBuddy -c \"Add :LSApplicationCategoryType string public.app-category.education\" "+app_path+"/Contents/Info.plist >> "+mac_log_file) 

HereafterApps avatar Nov 23 '23 22:11 HereafterApps

This issue still persists. Have changed the engine plist as well, changed project plist as well. Can connect to voice channel, but no one can hear me.

HereafterApps avatar Dec 04 '23 07:12 HereafterApps

You could try [tccutil reset Microphone] to reset the permission and see if it works. Additionally, could you identify if this is a permission problem? Does it work in PIE (Play in Editor)?

WinterPu avatar Dec 04 '23 10:12 WinterPu

Good idea. Will try and check if that works.

HereafterApps avatar Dec 04 '23 12:12 HereafterApps

Just tested.

tccutil reset Microphone didnt do anything for me.

However, voice did work in the editor just fine during PIE

On the packaged build, it doesnt even ask for permission

HereafterApps avatar Dec 06 '23 08:12 HereafterApps

When you changed the info.plist template of your engine, did the app you packaged have the required permission? It should have.

WinterPu avatar Dec 07 '23 03:12 WinterPu

Hey @WinterPu , so i have some more info now. Had gone off mac for a bit.

So now, whenever i try and transmit, it crashes with this report:

Translated Report (Full Report Below)

Process: CrashReportClient [2900] Path: /Users/USER/Documents/*/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/CrashReportClient Identifier: com.YourCompany.CrashReportClient Version: 5.3.2 (0.10) Code Type: X86-64 (Native) Parent Process: Exited process [2860] User ID: 501

Date/Time: 2024-08-09 17:48:25.6418 +0530 OS Version: macOS 14.1 (23B74) Report Version: 12 Bridge OS Version: 8.1 (21P1069) Anonymous UUID: C4AEE92E-239F-F36D-026E-232AF99E5558

Sleep/Wake UUID: 5CBD17BA-2926-4BFC-ADF1-37BABC3D1951

Time Awake Since Boot: 180000 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace DYLD, Code 1 Library missing Library not loaded: @rpath/libtbb.dylib Referenced from: <DBEF6572-D7B0-330A-92F4-BFEA0E2EAA33> /Users/USER/Documents/*/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/CrashReportClient Reason: tried: '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Content (terminated at launch; ignore backtrace)

Thread 0 Crashed: 0 dyld 0x7ff80fd8f8de __abort_with_payload + 10 1 dyld 0x7ff80fda9e05 abort_with_payload_wrapper_internal + 82 2 dyld 0x7ff80fda9e37 abort_with_payload + 9 3 dyld 0x7ff80fd2b15b dyld4::halt(char const*, dyld4::StructuredError const*) + 335 4 dyld 0x7ff80fd28545 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 4137 5 dyld 0x7ff80fd2733f start + 1839

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000002000209 rbx: 0x0000000000000001 rcx: 0x00007ff7b1c942f8 rdx: 0x00007ff7b1c94760 rdi: 0x0000000000000006 rsi: 0x0000000000000001 rbp: 0x00007ff7b1c94340 rsp: 0x00007ff7b1c942f8 r8: 0x00007ff7b1c94360 r9: 0x0000000000000000 r10: 0x00000000000000ed r11: 0x0000000000000246 r12: 0x0000000000000000 r13: 0x00007ff7b1c94760 r14: 0x0000000000000006 r15: 0x00000000000000ed rip: 0x00007ff80fd8f8de rfl: 0x0000000000000246 cr2: 0x0000000000000000

Logical CPU: 0 Error Code: 0x02000209 Trap Number: 133

Binary Images: 0x10e26a000 - 0x10fb35fff com.YourCompany.CrashReportClient (5.3.2) /Users/USER/Documents//Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/CrashReportClient 0x7ff80fd21000 - 0x7ff80fdbd3df dyld () /usr/lib/dyld 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0

VM Region Summary: ReadOnly portion of Libraries: Total=223.1M resident=0K(0%) swapped_out_or_unallocated=223.1M(100%) Writable regions: Total=14.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=14.5M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= STACK GUARD 56.0M 1 Stack 8192K 1 VM_ALLOCATE 8K 2 __DATA 2443K 3 __DATA_CONST 1044K 2 __DATA_DIRTY 7K 1 __LINKEDIT 197.7M 2 __TEXT 25.4M 2 dyld private memory 4360K 4 shared memory 4K 1 =========== ======= ======= TOTAL 294.8M 19


Full Report

{"app_name":"CrashReportClient","timestamp":"2024-08-09 17:48:25.00 +0530","app_version":"5.3.2","slice_uuid":"dbef6572-d7b0-330a-92f4-bfea0e2eaa33","build_version":"0.10","platform":1,"bundleID":"com.YourCompany.CrashReportClient","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.1 (23B74)","roots_installed":0,"name":"CrashReportClient","incident_id":"FFBC907C-837D-4E26-9356-214916A5BAEB"} { "uptime" : 180000, "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookPro16,1", "coalitionID" : 18139, "osVersion" : { "train" : "macOS 14.1", "build" : "23B74", "releaseType" : "User" }, "captureTime" : "2024-08-09 17:48:25.6418 +0530", "codeSigningMonitor" : 0, "incident" : "FFBC907C-837D-4E26-9356-214916A5BAEB", "pid" : 2900, "cpuType" : "X86-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2024-08-09 17:48:25.5701 +0530", "procStartAbsTime" : 183733235580588, "procExitAbsTime" : 183733239162260, "procName" : "CrashReportClient", "procPath" : "/Users/USER/Documents//Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/CrashReportClient", "bundleInfo" : {"CFBundleShortVersionString":"5.3.2","CFBundleVersion":"0.10","CFBundleIdentifier":"com.YourCompany.CrashReportClient"}, "storeInfo" : {"deviceIdentifierForVendor":"2A7BF727-C515-5A35-BA42-863D4F60D811","thirdParty":true}, "parentProc" : "Exited process", "parentPid" : 2860, "coalitionName" : "com.Hereafter.Surrogate.Surrogate", "crashReporterKey" : "C4AEE92E-239F-F36D-026E-232AF99E5558", "responsiblePid" : 2860, "codeSigningID" : "", "codeSigningTeamID" : "", "codeSigningValidationCategory" : 0, "codeSigningTrustLevel" : 4294967295, "bridgeVersion" : {"build":"21P1069","train":"8.1"}, "sleepWakeUUID" : "5CBD17BA-2926-4BFC-ADF1-37BABC3D1951", "sip" : "enabled", "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"}, "termination" : {"code":1,"flags":518,"namespace":"DYLD","indicator":"Library missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Library not loaded: @rpath/libtbb.dylib","Referenced from: <DBEF6572-D7B0-330A-92F4-BFEA0E2EAA33> /Users/USER/Documents//Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/CrashReportClient","Reason: tried: '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Content"]}, "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":2056438,"threadState":{"r13":{"value":140701816407904},"rax":{"value":33554953},"rflags":{"value":582},"cpu":{"value":0},"r14":{"value":6},"rsi":{"value":1},"r8":{"value":140701816406880},"cr2":{"value":0},"rdx":{"value":140701816407904},"r10":{"value":237},"r9":{"value":0},"r15":{"value":237},"rbx":{"value":1},"trap":{"value":133},"err":{"value":33554953},"r11":{"value":582},"rip":{"value":140703394494686,"matchesCrashFrame":1},"rbp":{"value":140701816406848},"rsp":{"value":140701816406776},"r12":{"value":0},"rcx":{"value":140701816406776},"flavor":"x86_THREAD_STATE","rdi":{"value":6}},"frames":[{"imageOffset":452830,"symbol":"__abort_with_payload","symbolLocation":10,"imageIndex":1},{"imageOffset":560645,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":82,"imageIndex":1},{"imageOffset":560695,"symbol":"abort_with_payload","symbolLocation":9,"imageIndex":1},{"imageOffset":41307,"symbol":"dyld4::halt(char const*, dyld4::StructuredError const*)","symbolLocation":335,"imageIndex":1},{"imageOffset":30021,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":4137,"imageIndex":1},{"imageOffset":25407,"symbol":"start","symbolLocation":1839,"imageIndex":1}]}], "usedImages" : [ { "source" : "P", "arch" : "x86_64", "base" : 4532379648, "CFBundleShortVersionString" : "5.3.2", "CFBundleIdentifier" : "com.YourCompany.CrashReportClient", "size" : 26001408, "uuid" : "dbef6572-d7b0-330a-92f4-bfea0e2eaa33", "path" : "/Users/USER/Documents/*/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/CrashReportClient", "name" : "CrashReportClient", "CFBundleVersion" : "0.10" }, { "source" : "P", "arch" : "x86_64", "base" : 140703394041856, "size" : 639968, "uuid" : "d5406f23-6967-39c4-beb5-6ae3293c7753", "path" : "/usr/lib/dyld", "name" : "dyld" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 140703393345536, "size" : 25769803776, "uuid" : "4412bf92-ed40-306d-9758-c8dc85ba325f" }, "vmSummary" : "ReadOnly portion of Libraries: Total=223.1M resident=0K(0%) swapped_out_or_unallocated=223.1M(100%)\nWritable regions: Total=14.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=14.5M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8192K 1 \nVM_ALLOCATE 8K 2 \n__DATA 2443K 3 \n__DATA_CONST 1044K 2 \n__DATA_DIRTY 7K 1 \n__LINKEDIT 197.7M 2 \n__TEXT 25.4M 2 \ndyld private memory 4360K 4 \nshared memory 4K 1 \n=========== ======= ======= \nTOTAL 294.8M 19 \n", "legacyInfo" : { "threadTriggered" : {

} }, "logWritingSignature" : "cb23d25b3914998e9c7153f4864a0ae2ed860e5e", "trialInfo" : { "rollouts" : [ { "rolloutId" : "64c025b28b7f0e739e4fbe58", "factorPackIds" : {

  },
  "deploymentId" : 240000019
},
{
  "rolloutId" : "6434420a89ec2e0a7a38bf5a",
  "factorPackIds" : {

  },
  "deploymentId" : 240000011
}

], "experiments" : [ { "treatmentId" : "c47ab4cc-c9c3-4b5d-a87c-e2433ce02597", "experimentId" : "6639bc6ba73d460582162323", "deploymentId" : 400000006 }, { "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8", "experimentId" : "6643969b3099cf28e049862f", "deploymentId" : 400000007 } ] } }

Model: MacBookPro16,1, BootROM 2020.41.1.0.0 (iBridge: 21.16.1069.0.0,0), 8 processors, 8-Core Intel Core i9, 2.3 GHz, 16 GB, SMC Graphics: Intel UHD Graphics 630, Intel UHD Graphics 630, Built-In Display: Color LCD, 3072 x 1920 Retina, Main, MirrorOff, Online Graphics: AMD Radeon Pro 5500M, AMD Radeon Pro 5500M, PCIe, 4 GB Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2667 MHz, Micron, 8ATF1G64HZ-2G6E1 Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2667 MHz, Micron, 8ATF1G64HZ-2G6E1 AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x7BF), wl0: Jul 10 2023 12:53:18 version 9.30.503.0.32.5.92 FWID 01-c06f991b AirPort: Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: T2Bus USB Device: composite_device USB Device: Touch Bar Backlight USB Device: Touch Bar Display USB Device: Apple Internal Keyboard / Trackpad USB Device: Headset USB Device: Ambient Light Sensor USB Device: FaceTime HD Camera (Built-in) USB Device: Apple T2 Controller Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5 Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5

This should give some insight into whats up.

HereafterApps avatar Aug 09 '24 12:08 HereafterApps

Hey @WinterPu Did you manage to figure this one out? Im still crashing.

HereafterApps avatar Aug 16 '24 07:08 HereafterApps

I have no idea. How did you conclude that this crash is related to the SDK?

WinterPu avatar Aug 16 '24 13:08 WinterPu

Is libtbb.dylib not part of the agora package? The crash occurs only when i transmit with the microphone.

Reason: tried: '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/CrashReportClient.app/Contents/MacOS/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Contents/UE/Engine/Binaries/Mac/libtbb.dylib' (no such file), '/Users/raahilkulshreshtha/Documents/Projects/Surrogate/Packages/Build5.7_2024_08_09_03/Mac/Main/Surrogate.app/Content

HereafterApps avatar Aug 16 '24 14:08 HereafterApps

Doesn't seem like

https://en.wikipedia.org/wiki/Threading_Building_Blocks

WinterPu avatar Aug 16 '24 16:08 WinterPu

This was fixed. For anyone wanting to know how, you need to update both the plist and the entitlements now.

HereafterApps avatar Aug 20 '24 08:08 HereafterApps