ms-intune-app-sdk-ios icon indicating copy to clipboard operation
ms-intune-app-sdk-ios copied to clipboard

App Crashes During Background/Minimize on Intune-Managed Accounts - calling cmarDeviceComplianceEnabled Intune SDK

Open KrystofMacek opened this issue 4 months ago • 1 comments

Describe the bug:

Our app crashes when minimized or moved to the background, and the crash logs show that the Microsoft Intune SDK's cmarDeviceComplianceEnabled method is involved. This issue specifically occurs on devices where the user has authenticated using a Microsoft account that is under Intune management or has compliance policies enforced by their company. The crash does not occur on devices using standard Microsoft accounts without any Intune management or compliance settings.

To Reproduce Steps to reproduce the behavior:

  1. Authenticate using a Microsoft account that is under Intune management and has compliance policies enforced by an organization.
  2. Minimize or background the app by pressing the home button or switching to another app.
  3. The app may crash when transitioning to the background, with the stack trace referencing cmarDeviceComplianceEnabled and com.apple.frontboard.systemappservices.

Expected behavior: App does not crash while minimized.

Screenshots and logs:

Crash Logs

com.apple.main-thread 0 libsystem_kernel.dylib 0x16c8 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x4ec8 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4de0 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4c20 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 GraphicsServices 0x11a8 GSEventRunModal + 164 8 UIKitCore 0x40aae8 -[UIApplication _run] + 888 9 UIKitCore 0x4bed98 UIApplicationMain + 340 10 IntuneMAMSwift 0x22a3d8 cmarDeviceComplianceEnabled + 2087352 11 mobile 0x19eb0 main + 7 (AppDelegate.swift:7) 12 ??? 0x1b2dff154 (Missing)

com.microsoft.intune.mam.logging 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 IntuneMAMSwift 0x20bcec cmarDeviceComplianceEnabled + 1962700 3 libdispatch.dylib 0x213c _dispatch_call_block_and_release + 32 4 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20 5 libdispatch.dylib 0xb400 _dispatch_lane_serial_drain + 748 6 libdispatch.dylib 0xbf30 _dispatch_lane_invoke + 380 7 libdispatch.dylib 0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288 8 libdispatch.dylib 0x16528 _dispatch_workloop_worker_thread + 404 9 libsystem_pthread.dylib 0x4934 _pthread_wqthread + 288 10 libsystem_pthread.dylib 0x10cc start_wqthread + 8

WebThread 0 libsystem_kernel.dylib 0x16c8 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x4ec8 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4de0 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4c20 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 WebCore 0x13927f4 + 780 8 libsystem_pthread.dylib 0x606c _pthread_start + 136 9 libsystem_pthread.dylib 0x10d8 thread_start + 8

com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x16c8 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x4ec8 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4de0 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4c20 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 Foundation 0xc7b5c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 8 Foundation 0xc79ac -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 9 UIKitCore 0x41e81c -[UIEventFetcher threadMain] + 420 10 Foundation 0xde428 NSThread__start + 732 11 libsystem_pthread.dylib 0x606c _pthread_start + 136 12 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.flutter.1.ui 0 libsystem_kernel.dylib 0x16c8 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x4ec8 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4de0 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4c20 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 Flutter 0x2e941c (Missing UUID 4c4c44a155553144a10bba395f834693) 8 Flutter 0x2e8a90 (Missing UUID 4c4c44a155553144a10bba395f834693) 9 libsystem_pthread.dylib 0x606c _pthread_start + 136 10 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.flutter.1.raster 0 libsystem_kernel.dylib 0x16c8 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x4ec8 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4de0 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4c20 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 Flutter 0x2e941c (Missing UUID 4c4c44a155553144a10bba395f834693) 8 Flutter 0x2e8a90 (Missing UUID 4c4c44a155553144a10bba395f834693) 9 libsystem_pthread.dylib 0x606c _pthread_start + 136 10 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.flutter.1.io 0 libsystem_kernel.dylib 0x16c8 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x4ec8 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4de0 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4c20 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 Flutter 0x2e941c (Missing UUID 4c4c44a155553144a10bba395f834693) 8 Flutter 0x2e8a90 (Missing UUID 4c4c44a155553144a10bba395f834693) 9 libsystem_pthread.dylib 0x606c _pthread_start + 136 10 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.1 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.2 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.3 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.4 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.5 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.6 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

dart:io EventHandler 0 libsystem_kernel.dylib 0x84c8 kevent + 8 1 Flutter 0x5a1f0c (Missing UUID 4c4c44a155553144a10bba395f834693) 2 Flutter 0x5cfa00 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 libsystem_pthread.dylib 0x606c _pthread_start + 136 4 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.1 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.2 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.3 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

io.worker.4 0 libsystem_kernel.dylib 0x708c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228 2 Flutter 0x56f40 (Missing UUID 4c4c44a155553144a10bba395f834693) 3 Flutter 0x2e26e4 (Missing UUID 4c4c44a155553144a10bba395f834693) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

Thread 0 libsystem_pthread.dylib 0x10c4 start_wqthread + 8255066306

Crashed: com.apple.NSURLSession-work 0 libsqlite3.dylib 0x196dc sqlite3_finalize + 16784 1 libsqlite3.dylib 0x17d04 sqlite3_finalize + 10168 2 libsqlite3.dylib 0x17538 sqlite3_finalize + 8172 3 libsqlite3.dylib 0x162d8 sqlite3_finalize + 3468 4 libsqlite3.dylib 0x9e2f0 sqlite3_sourceid + 53824 5 libsqlite3.dylib 0x2d240 sqlite3_step + 6552 6 libsqlite3.dylib 0x2bc6c sqlite3_step + 964 7 CFNetwork 0x65850 CFHTTPCookieCreateWithResponseHeaderFields + 40908 8 CFNetwork 0x64230 CFHTTPCookieCreateWithResponseHeaderFields + 35244 9 CFNetwork 0x63e90 CFHTTPCookieCreateWithResponseHeaderFields + 34316 10 CFNetwork 0x49a4c _CFURLResponseCreateFromArchiveList + 232884 11 CFNetwork 0x493fc _CFURLResponseCreateFromArchiveList + 231268 12 CFNetwork 0x48f28 _CFURLResponseCreateFromArchiveList + 230032 13 CFNetwork 0xc8948 CFHostCreateWithName + 109404 14 CFNetwork 0xc3660 CFHostCreateWithName + 88180 15 libdispatch.dylib 0x12e5c _dispatch_block_async_invoke2 + 148 16 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20 17 libdispatch.dylib 0xb400 _dispatch_lane_serial_drain + 748 18 libdispatch.dylib 0xbf64 _dispatch_lane_invoke + 432 19 libdispatch.dylib 0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288 20 libdispatch.dylib 0x16528 _dispatch_workloop_worker_thread + 404 21 libsystem_pthread.dylib 0x4934 _pthread_wqthread + 288 22 libsystem_pthread.dylib 0x10cc start_wqthread + 8

com.google.firebase.crashlytics.MachExceptionServer 0 FirebaseCrashlytics 0x1d3b8 FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393) 1 FirebaseCrashlytics 0x1d798 FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424) 2 FirebaseCrashlytics 0x14944 FIRCLSHandler + 34 (FIRCLSHandler.m:34) 3 FirebaseCrashlytics 0x171c8 FIRCLSMachExceptionServer + 521 (FIRCLSMachException.c:521) 4 libsystem_pthread.dylib 0x606c _pthread_start + 136 5 libsystem_pthread.dylib 0x10d8 thread_start + 8

com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x16c8 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x4ec8 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4de0 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4c20 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 CFNetwork 0xfdc7c _CFHostIsDomainTopLevel + 108176 8 Foundation 0xde428 NSThread__start + 732 9 libsystem_pthread.dylib 0x606c _pthread_start + 136 10 libsystem_pthread.dylib 0x10d8 thread_start + 8

Thread 0 libsystem_kernel.dylib 0x1450 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0x10cc start_wqthread + 8

Thread 0 libsystem_pthread.dylib 0x10c4 start_wqthread + 8255066306

Thread 0 libsystem_pthread.dylib 0x10c4 start_wqthread + 8255066306

Thread 0 libsystem_kernel.dylib 0x165c semaphore_timedwait_trap + 8 1 libdispatch.dylib 0x43ec _dispatch_sema4_timedwait + 64 2 libdispatch.dylib 0x49e8 _dispatch_semaphore_wait_slow + 76 3 IntuneMAMSwift 0x3625c cmarDeviceComplianceEnabled + 38972 4 IntuneMAMSwift 0x14eb3c cmarDeviceComplianceEnabled + 1188124 5 libdispatch.dylib 0x213c _dispatch_call_block_and_release + 32 6 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20 7 libdispatch.dylib 0xb400 _dispatch_lane_serial_drain + 748 8 libdispatch.dylib 0xbf30 _dispatch_lane_invoke + 380 9 libdispatch.dylib 0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288 10 libdispatch.dylib 0x16528 _dispatch_workloop_worker_thread + 404 11 libsystem_pthread.dylib 0x4934 _pthread_wqthread + 288 12 libsystem_pthread.dylib 0x10cc start_wqthread + 8

Smartphone (please complete the following information):

  • Device: iPhone 12, 15, 14
  • OS: iOS 17.5.1, iOS 18.0.1

Intune App SDK for iOS (please complete the following information):

  • What version of the Intune SDK are you using? Are you using the latest version? Currently using latest 20.1.2 version. But happens also in app versions that have earlier version.

  • What platform is your app based in (native, Xamarin based, Cordova, etc)? Native iOS

  • For errors during build, does the app build without Intune SDK integration? No errors during build

  • For errors post build, does the app launch without being Intune SDK integrated? Yes only with Intune SDK Integrated, and only for accounts with Intune management or compliance

  • Do you see a trend with it only being reproduced on a specific device? No

KrystofMacek avatar Oct 24 '24 07:10 KrystofMacek