Marketo/ios-sdk

Crashing do to privacy violation

Closed this issue · 3 comments

Hello,

I just included your SDK in my app, and almost immediately saw a spike in crashes. After digging through threads in Bugsnag and Xcode, I found that the cause appears to be your SDK. Each of the crashes has a thread like this:

#0	(null) in semaphore_wait_trap ()
#1	(null) in _dispatch_sema4_wait$VARIANT$armv81 ()
#2	(null) in _dispatch_semaphore_wait_slow ()
#3	(null) in CFURLConnectionSendSynchronousRequest ()
#4	(null) in +[NSURLConnection sendSynchronousRequest:returningResponse:error:] ()
#5	0x0000000105073440 in -[MKTNetworkManager postDataSync:toEndpoint:] ()
#6	0x0000000105069af0 in __31-[MKTEventLogger reportEvents:]_block_invoke ()
#7	0x000000010507998c in -[MKTDataManager getEventsDataWith:] ()
#8	0x00000001050699c8 in -[MKTEventLogger reportEvents:] ()
#9	0x0000000105064b98 in __60-[Marketo initializeWithMunchkinID:appSecret:launchOptions:]_block_invoke ()
#10	(null) in _dispatch_call_block_and_release ()
#11	(null) in _dispatch_client_callout ()
#12	(null) in _dispatch_queue_serial_drain$VARIANT$armv81 ()
#13	(null) in _dispatch_queue_invoke$VARIANT$armv81 ()
#14	(null) in _dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81 ()
#15	(null) in _dispatch_workloop_worker_thread$VARIANT$armv81 ()
#16	(null) in _pthread_wqthread ()
#17	(null) in start_wqthread ()

Can you please advise?

@jaredandertonatnav, Log does not indicate a crash can you please post more log. Also can you please confirm few things, 1. Marketo SDK version used, 2 Xcode version used 3. Cocopod used or not / native app or a different platform? 4. What action app gets crash?

@mahtorohit What is the best way for me to get you the crash logs? Can you make use of an .xccrashpoint file?

  1. Marketo SDK: 0.7.5
  2. XCode: 9.3
  3. Cocoa pod: Yes: pod 'Marketo-iOS-SDK' ; Native app yes: iOS, iphone only
  4. Unsure, this is crashing in production. I have multiple occurrences of the threads like this, in a number of different places in the app. It isn't a single action.

The most common crash is a privacy violation. Does this SDK attempt to access the users Photos, Mic, Camera, Location, Contact, etc... anything else that requires explicit usage permissions in the Info.plist file ( details: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html ) ?

@mahtorohit This was my mistake. I spent some time learning how to read a crash report and found the reason for the privacy violation. Sorry for thinking it was your SDK.