Skip to content

File protection issue #301

@vladasdrejeris

Description

@vladasdrejeris

Hello,

We have encountered a problem with Instabug iOS SDK when using file protection type URLFileProtection.complete.

We are developing a fintech app and our security guys requested us to use URLFileProtection.complete file protection class for all app files, that includes Instabug sqlite database too. And now we are getting quite a lot of crashes from Instabug, because it is unable to access database when app is locked. I am guessing that Instabug SDK is trying to finish some tasks in the background and if the device is locked, it crashes, because SDK cannot access the database file.

Could you help us with this issue?

Here is the stack trace of the crash that happens most offen:

Crashed: SQLQueue 0x11fe03620 for InstabugDataModel
0 libsqlite3.dylib 0x21f3cf6e0 sqlite3_finalize + 24896
1 libsqlite3.dylib 0x21f3cdf94 sqlite3_finalize + 18932
2 libsqlite3.dylib 0x21f3cd864 sqlite3_finalize + 17092
3 libsqlite3.dylib 0x21f3cbcc0 sqlite3_finalize + 10016
4 libsqlite3.dylib 0x21f3cb100 sqlite3_finalize + 7008
5 libsqlite3.dylib 0x21f3ea54c sqlite3_step + 12952
6 libsqlite3.dylib 0x21f3e7464 sqlite3_step + 432
7 CoreData 0x221c6ad50 _execute + 156
8 CoreData 0x221aca4f4 -[NSSQLiteConnection execute] + 2772
9 CoreData 0x221c81818 newFetchedRowsForFetchPlan_MT + 848
10 CoreData 0x221d20e28 _executeFetchRequest + 68
11 CoreData 0x221acd3e4 -[NSSQLFetchRequestContext executeRequestCore:] + 36
12 CoreData 0x221ac3984 -[NSSQLStoreRequestContext executeRequestUsingConnection:] + 252
13 CoreData 0x221c27870 __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 84
14 libdispatch.dylib 0x21e9e6484 _dispatch_client_callout + 16
15 libdispatch.dylib 0x21e9935d8 _dispatch_lane_barrier_sync_invoke_and_complete + 56
16 CoreData 0x221ac37ec -[NSSQLDefaultConnectionManager handleStoreRequest:] + 256
17 CoreData 0x221ac36a8 -[NSSQLCoreDispatchManager routeStoreRequest:] + 264
18 CoreData 0x221ac3464 -[NSSQLCore dispatchRequest:withRetries:] + 260
19 CoreData 0x221acd2d8 -[NSSQLCore processFetchRequest:inContext:] + 108
20 CoreData 0x221ac4348 -[NSSQLCore executeRequest:withContext:error:] + 496
21 CoreData 0x221c31de4 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 1712
22 CoreData 0x221ac3254 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 240
23 CoreData 0x221ac3ee4 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 860
24 CoreData 0x221acc47c -[NSManagedObjectContext executeFetchRequest:error:] + 900
25 CoreData 0x221ad070c -[NSManagedObjectContext(_NestedContextSupport) _parentObjectsForFetchRequest:inContext:error:] + 464
26 CoreData 0x221c09cec __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 580
27 CoreData 0x221c0bad0 internalBlockToNSManagedObjectContextPerform + 92
28 libdispatch.dylib 0x21e9e6484 _dispatch_client_callout + 16
29 libdispatch.dylib 0x21e9935d8 _dispatch_lane_barrier_sync_invoke_and_complete + 56
30 CoreData 0x221bffd70 _perform + 268
31 CoreData 0x221ad1154 -[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:] + 172
32 CoreData 0x221acc47c -[NSManagedObjectContext executeFetchRequest:error:] + 900
33 Instabug 0x105b47244 __65-[IBGEventLogger loadSnapshotSynchronouslyWithCompletionHandler:]_block_invoke (IBGEventLogger.m:93)
34 Instabug 0x105c29e3c __26-[IBGDALService readSync:]_block_invoke (IBGDALService.m:108)
35 CoreData 0x221c02e88 developerSubmittedBlockToNSManagedObjectContextPerform + 156
36 libdispatch.dylib 0x21e9e6484 _dispatch_client_callout + 16
37 libdispatch.dylib 0x21e9935d8 _dispatch_lane_barrier_sync_invoke_and_complete + 56
38 CoreData 0x221aca8b8 -[NSManagedObjectContext performBlockAndWait:] + 304
39 Instabug 0x105c29cc8 -[IBGDALService readSync:] (IBGDALService.m:109)
40 Instabug 0x105b47188 -[IBGEventLogger loadSnapshotSynchronouslyWithCompletionHandler:] (IBGEventLogger.m:90)
41 Instabug 0x105ad6b28 -[IBGSnapshotManager surveyConditionsWithCompletionHandler:] (IBGSnapshotManager.m:263)
42 Instabug 0x105b05a1c -[InstabugSurveys pendingSurveyToShowWithCompletionHandler:] (InstabugSurveys.m:238)
43 Instabug 0x105b06348 -[InstabugSurveys surveysRequestDone:isSucess:withSurveys:pausedSurveysIDs:] (InstabugSurveys.m:359)
44 Instabug 0x105b4d474 -[IBGSurveysRequest networkDone:URLSessionDataTask:response:error:responseDictionary:] (IBGSurveysRequest.m:62)
45 Instabug 0x105c23020 __51-[IBGNetwork URLSession:task:didCompleteWithError:]_block_invoke_2 + 128
46 libdispatch.dylib 0x21e9e56c8 _dispatch_call_block_and_release + 24
47 libdispatch.dylib 0x21e9e6484 _dispatch_client_callout + 16
48 libdispatch.dylib 0x21e9929b4 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
49 CoreFoundation 0x21ef3bdd0 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
50 CoreFoundation 0x21ef36c98 __CFRunLoopRun + 1964
51 CoreFoundation 0x21ef361cc CFRunLoopRunSpecific + 436
52 GraphicsServices 0x2211ad584 GSEventRunModal + 100
53 UIKitCore 0x24c179054 UIApplicationMain + 212
54 Momo-prod 0x104e05174 main (AppDelegate.swift:23)
55 libdyld.dylib 0x21e9f6bb4 start + 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions