PFFile crash when getting data from cache - ios

Recently, after Parse SDK update, I start getting the following exception when loading files on startup:
2015-11-08 13:23:15.088 MyApp[7219:471946] [Error]: Caught "NSInvalidArgumentException" with reason "*** -[_NSPlaceholderData initWithContentsOfFile:options:error:]: nil file argument":
(
0 CoreFoundation 0x0000000110a07f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000011047edeb objc_exception_throw + 48
2 CoreFoundation 0x0000000110a07e7d +[NSException raise:format:] + 205
3 Foundation 0x000000011002cd48 -[NSData(NSData) initWithContentsOfFile:options:error:] + 95
4 Foundation 0x00000001100c5fcc +[NSData(NSData) dataWithContentsOfFile:options:error:] + 61
5 MyApp 0x000000010e828426 -[PFFile _cachedData] + 94
6 MyApp 0x000000010e886cac __62-[BFTask continueWithExecutor:successBlock:cancellationToken:]_block_invoke + 83
7 MyApp 0x000000010e88658c __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 + 82
8 MyApp 0x000000010e8874ab __29+[BFExecutor defaultExecutor]_block_invoke_2 + 358
9 MyApp 0x000000010e887a15 -[BFExecutor execute:] + 65
10 MyApp 0x000000010e886510 __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke + 138
11 MyApp 0x000000010e886110 -[BFTask runContinuations] + 396
12 MyApp 0x000000010e8859c6 -[BFTask trySetResult:] + 151
13 MyApp 0x000000010e883c4c -[BFTaskCompletionSource trySetResult:] + 79
14 MyApp 0x000000010e7e48b3 __28-[PFAsyncTaskQueue enqueue:]_block_invoke_2 + 198
15 MyApp 0x000000010e88658c __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 + 82
16 libdispatch.dylib 0x00000001145fce5d _dispatch_call_block_and_release + 12
17 libdispatch.dylib 0x000000011461d49b _dispatch_client_callout + 8
18 libdispatch.dylib 0x0000000114605bef _dispatch_root_queue_drain + 1829
19 libdispatch.dylib 0x00000001146054c5 _dispatch_worker_thread3 + 111
20 libsystem_pthread.dylib 0x000000011494ea9d _pthread_wqthread + 729
21 libsystem_pthread.dylib 0x000000011494c3dd start_wqthread + 13
).
Any ideas why PFFile is crashing? Does this mean that the local cache is not compatible with previous version and that I will have a huge problems when users update the app?

The problem was that I was creating a new PFFile, assigning it so some object's column locally and not saving it back to Parse. When a new file was created it's url property is nil, which should be fine, since it's not yet online. After that I was fetching the parent object whos child was that file - this was eventually messing things up because then I close the app and next time opening I was trying to fetch the data of that PFFile with url property equal to nil. That results in this exception above. A workaround suggested by a guy from Parse:
PFFile *file = object[fileKey];
if ((file != nil) && [file isKindOfClass:[PFFile class]] && (file.url == nil)) {
[object revertObjectForKey:fileKey];
}
After that fetching the object will bring the correct data from Parse servers.

Related

CoreData _NSIsNSSet EXC_BAD_ACCESS KERN_INVALID_ADDRESS - crash on app launch

We are getting this crash on multiple devices but cannot figure out where it originates from. The main thread is crashing.
Stack trace:
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x193dfd58c object_getMethodImplementation + 20
1 CoreFoundation 0x1940f6928 _NSIsNSSet + 40
2 CoreFoundation 0x193fc2c04 -[NSMutableSet unionSet:] + 112
3 CoreData 0x198abe014 -[_NSFaultingMutableSet willReadWithContents:] + 668
4 CoreData 0x198ae4280 -[_NSFaultingMutableSet count] + 32
5 CoreData 0x198be1bb4 __107-[NSManagedObjectContext(_NestedContextSupport) newValueForRelationship:forObjectWithID:withContext:error:]_block_invoke + 360
6 CoreData 0x198be2e70 internalBlockToNSManagedObjectContextPerform + 104
7 libdispatch.dylib 0x193d8b5ac _dispatch_client_callout + 20
8 libdispatch.dylib 0x193d9843c _dispatch_async_and_wait_invoke + 96
9 libdispatch.dylib 0x193d8b5ac _dispatch_client_callout + 20
10 libdispatch.dylib 0x193d977d4 _dispatch_main_queue_callback_4CF + 832
11 CoreFoundation 0x1940648d4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
12 CoreFoundation 0x19405f58c __CFRunLoopRun + 1692
13 CoreFoundation 0x19405ebc8 CFRunLoopRunSpecific + 480
14 GraphicsServices 0x19e4475cc GSEventRunModal + 164
15 UIKitCore 0x198211744 UIApplicationMain + 1936
16 My App 0x100b37324 main + 16 (main.m:16)
17 libdyld.dylib 0x193edb384 start + 4
At the same time, a background thread operating in a PrivateQueue ManagedObjectContext is busy accessing a ManagedObject via awakeFromFetch, stack trace of this thread:
NSManagedObjectContext 0x28066c700
0 libsystem_kernel.dylib 0x1b09617e4 __ulock_wait + 8
1 libdispatch.dylib 0x1b081bf48 _dlock_wait + 56
2 libdispatch.dylib 0x1b081bcf4 _dispatch_thread_event_wait_slow + 56
3 libdispatch.dylib 0x1b0828618 __DISPATCH_WAIT_FOR_QUEUE__ + 336
4 libdispatch.dylib 0x1b0828204 _dispatch_sync_f_slow + 144
5 CoreData 0x1b56686cc _perform + 200
6 CoreData 0x1b558e2c4 -[NSManagedObjectContext(_NestedContextSupport) newValueForRelationship:forObjectWithID:withContext:error:] + 156
7 CoreData 0x1b555033c -[NSFaultHandler retainedFulfillAggregateFaultForObject:andRelationship:withContext:] + 428
8 CoreData 0x1b554df10 -[_NSFaultingMutableSet willReadWithContents:] + 408
9 CoreData 0x1b55ea5bc -[_NSFaultingMutableSet allObjects] + 32
10 My App 0x1044fdc3c PSUser.isAdmin.getter + 286 (PSUser.swift:286)
11 My App 0x1044fdb04 #objc PSUser.isAdmin.getter + 4309900036 (<compiler-generated>:4309900036)
12 My App 0x1044fc694 PSUser.initCurrentTeam() + 212 (PSUser.swift:212)
13 My App 0x1044fcbc0 #objc PSUser.initCurrentTeam() + 4309896128 (<compiler-generated>:4309896128)
14 My App 0x1044fc658 #objc PSUser.awakeFromFetch() + 4309894744 (<compiler-generated>:4309894744)
15 CoreData 0x1b56520e4 _PFFaultHandlerFulfillFault + 3168
16 CoreData 0x1b5650ab0 _PFFaultHandlerLookupRow + 908
17 CoreData 0x1b56527fc _PF_FulfillDeferredFault + 260
18 CoreData 0x1b5666a2c _pvfk_header + 120
19 CoreData 0x1b5663218 _sharedIMPL_pvfk_core + 32
20 My App 0x10438918c +[PSAppSettings isAutoPilotAllowed:] + 97 (PSAppSettings.m:97)
21 My App 0x1043fbb9c LocationTracker.updateTrackingState(user:) + 1120 (LocationTracker.swift:1120)
22 My App 0x104413b4c partial apply for closure #1 in LocationTracker.store(filteredLocations:) + 1275 (LocationTracker.swift:1275)
23 My App 0x1043bae3c thunk for #escaping #callee_guaranteed () -> () + 4308577852 (<compiler-generated>:4308577852)
24 CoreData 0x1b566b650 developerSubmittedBlockToNSManagedObjectContextPerform + 164
25 libdispatch.dylib 0x1b081b5ac _dispatch_client_callout + 20
26 libdispatch.dylib 0x1b0821a64 _dispatch_lane_serial_drain + 568
27 libdispatch.dylib 0x1b0822498 _dispatch_lane_invoke + 400
28 libdispatch.dylib 0x1b082ba5c _dispatch_workloop_worker_thread + 584
29 libsystem_pthread.dylib 0x1b0881718 _pthread_wqthread + 276
30 libsystem_pthread.dylib 0x1b08879c8 start_wqthread + 8
I am not certain if the two stacks are related, or if the background thread is dispatching anything to the main thread (why should it?), but the call newValueForRelationship:forObjectWithID:withContext:error does appear in both stack traces.
The method for awakeFromFetch is initializing a calculated object property currentTeam via the initCurrentTeam() method. This method accesses the teams relationship on that object. Here is the relevant code:
#objc extension PSUser {
override open func awakeFromFetch() {
super.awakeFromFetch()
initCurrentTeam()
}
/**
This method sets the currentTeam by picking
the appropriate team from the `teams` set.
*/
func initCurrentTeam() {
if (isAdmin || isManager), !isEmployee,
var teams = teams?.allObjects as? [PSTeam],
currentTeam == nil {
...
currentTeam = teams.first
}
}
...
}
Enabled com.apple.CoreData.ConcurrencyDebug in Xcode Scheme but Xcode console does not complain. I have not been able to reproduce this issue while debugging in Xcode. The issue is only reported via Crashlytics in production environment.
Any ideas what might be causing this?

iOS: This NSPersistentStoreCoordinator has no persistent stores => How to check if the sqlite database in the app correspond to the model?

I would like to check if an old sqlite is present in the app and doesn't match to the new model. For example if I added some tables in the coredata model, I would like to avoid a crash if the app sqlite database doesn't match.
The goal is to delete the data base, and let coredata create another database with the good model.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This NSPersistentStoreCoordinator has no persistent stores (schema mismatch or migration failure). It cannot perform a save operation.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010daed1e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010c6c1031 objc_exception_throw + 48
2 CoreData 0x000000010d5cc6c3 -[NSPersistentStoreCoordinator _coordinator_you_never_successfully_opened_the_database_schema_mismatch:] + 51
3 CoreData 0x000000010d5ccd55 -[NSPersistentStoreCoordinator _introspectLastErrorAndThrow] + 165
4 CoreData 0x000000010d5cd101 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 593
5 CoreData 0x000000010d5c57a8 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 360
6 CoreData 0x000000010d4cbc02 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 642
7 CoreData 0x000000010d4cbc2b -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 683
8 CoreData 0x000000010d4f469b -[NSManagedObjectContext save:] + 1579
9 Formbox_Webbox 0x000000010b853aaf -[DB_ListOfValue_manage removeLinesInTable:] + 1055
10 Formbox_Webbox 0x000000010b850add -[DB_ListOfValue_manage removeAllDB] + 2125
11 Formbox_Webbox 0x000000010b79d99d -[ViewController sync:] + 141
12 Formbox_Webbox 0x000000010b7a0080 __35-[ViewController checkFirstSynchro]_block_invoke + 128
13 Formbox_Webbox 0x000000010b83da0a __63+[Reachability checkInternetConnectivityWithSuccessCompletion:]_block_invoke + 346
14 CFNetwork 0x0000000113178f4f __67+[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]_block_invoke_2 + 161
15 Foundation 0x000000010c0d7363 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
16 Foundation 0x000000010c0d71ca -[NSBlockOperation main] + 68
17 Foundation 0x000000010c0d56b2 -[__NSOperationInternal _start:] + 766
18 libdispatch.dylib 0x00000001128dc7ec _dispatch_client_callout + 8
19 libdispatch.dylib 0x00000001128e1db8 _dispatch_block_invoke_direct + 592
20 libdispatch.dylib 0x00000001128dc7ec _dispatch_client_callout + 8
21 libdispatch.dylib 0x00000001128e1db8 _dispatch_block_invoke_direct + 592
22 libdispatch.dylib 0x00000001128e1b48 dispatch_block_perform + 109
23 Foundation 0x000000010c0d175b __NSOQSchedule_f + 337
24 libdispatch.dylib 0x00000001128dc7ec _dispatch_client_callout + 8
25 libdispatch.dylib 0x00000001128e2ad9 _dispatch_continuation_pop + 967
26 libdispatch.dylib 0x00000001128e0f54 _dispatch_async_redirect_invoke + 780
27 libdispatch.dylib 0x00000001128e836c _dispatch_root_queue_drain + 664
28 libdispatch.dylib 0x00000001128e8076 _dispatch_worker_thread3 + 132
29 libsystem_pthread.dylib 0x0000000112dc4169 _pthread_wqthread + 1387
30 libsystem_pthread.dylib 0x0000000112dc3be9 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Thanks in advance.

NSInternalInconsistencyException with Parse

I have an application setup using Parse. Recently, I started getting the following error when my app starts up.
[Error]: Caught "NSInternalInconsistencyException" with reason "Tried to save an object with a new, unsaved child."
The app doesn't crash, as the exception is caught. However, I am unable to discern the cause of the exception. Below is the stack trace that is printed to the console:
(
0 CoreFoundation 0x0000000185f802f4 <redacted> + 160
1 libobjc.A.dylib 0x0000000197c4c0e4 objc_exception_throw + 60
2 CoreFoundation 0x0000000185f80218 <redacted> + 0
3 STSI 0x0000000100305e4c -[PFPointerObjectEncoder encodeParseObject:] + 116
4 STSI 0x000000010030528c -[PFEncoder encodeObject:] + 148
5 STSI 0x00000001002d0254 __129+[PFRESTQueryCommand findCommandParametersWithOrder:conditions:selectedKeys:includedKeys:limit:skip:extraOptions:tracingEnabled:]_block_invoke97 + 1752
6 CoreFoundation 0x0000000185ed47a4 <redacted> + 88
7 CoreFoundation 0x0000000185ec1cec <redacted> + 240
8 STSI 0x00000001002cfa9c +[PFRESTQueryCommand findCommandParametersWithOrder:conditions:selectedKeys:includedKeys:limit:skip:extraOptions:tracingEnabled:] + 936
9 STSI 0x00000001002cf69c +[PFRESTQueryCommand findCommandParametersForQueryState:] + 348
10 STSI 0x00000001002cf074 +[PFRESTQueryCommand findCommandForQueryState:withSessionToken:] + 84
11 STSI 0x00000001002dccdc __78-[PFQueryController findObjectsAsyncForQueryState:withCancellationToken:user:]_block_invoke + 116
12 STSI 0x000000010034f9ec __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 + 96
13 libdispatch.dylib 0x0000000100c38fd4 _dispatch_call_block_and_release + 24
14 libdispatch.dylib 0x0000000100c38f94 _dispatch_client_callout + 16
15 libdispatch.dylib 0x0000000100c46b54 _dispatch_root_queue_drain + 2180
16 libdispatch.dylib 0x0000000100c48248 _dispatch_worker_thread3 + 132
17 libsystem_pthread.dylib 0x00000001984a922c _pthread_wqthread + 816
18 libsystem_pthread.dylib 0x00000001984a8ef0 start_wqthread + 4
).
I'm quite clueless as to what this stack trace is implying. Additionally, in the debugger, I can see many stacks of BFTasks being allocated.
What is the reason behind the exception being raised?

CoreData Crash While fetching Error: NSProcessingInternalChange

In my application I am saving data to coredata in the main thread\queue and immediately after save, I fetch all the records to make sure I have not exceeded the size of my local store.
All happens on synchronously on the main thread.
I get random crashes:
[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2284
The core data has attributes indexed and I am wondering if the index generation happens after save returns and fetch catches the database during indexing and fails?
Also I see another thread NSPersistentStoreCoordinator.
What does this mean? I specifically send the coredata operations to be executed in main thread. Does coredata internally send it to another thread?
What could be causing the crash here? Would appreciate any help!
The stack trace looks like this:
Thread : Crashed: com.apple.main-thread
0 CoreFoundation 0x000000018214602c __CFBasicHashDrain + 196
1 CoreFoundation 0x0000000182145f9c __CFBasicHashDrain + 52
2 CoreData 0x0000000181de28c8 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2284
3 CoreData 0x0000000181ddadc4 _performRunLoopAction + 384
4 CoreFoundation 0x00000001820cc2a4 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
5 CoreFoundation 0x00000001820c9230 __CFRunLoopDoObservers + 360
6 CoreFoundation 0x00000001820c9610 __CFRunLoopRun + 836
7 CoreFoundation 0x0000000181ff52d4 CFRunLoopRunSpecific + 396
8 GraphicsServices 0x000000018b80b6fc GSEventRunModal + 168
9 UIKit 0x0000000186bbafac UIApplicationMain + 1488
10 MyApp 0x000000010002ba88 main (main.m:16)
11 libdyld.dylib 0x0000000193fb6a08 start + 4
Thread : NSPersistentStoreCoordinator 0x170666900
0 libsystem_platform.dylib 0x00000001941616a4 OSAtomicCompareAndSwap64Barrier + 12
1 libsystem_pthread.dylib 0x0000000194169428 _pthread_mutex_lock + 312
2 libsqlite3.dylib 0x0000000193c89d0c (null) + 20676
3 libsqlite3.dylib 0x0000000193cb30ec (null) + 20388
4 libsqlite3.dylib 0x0000000193cb27ac (null) + 18020
5 libsqlite3.dylib 0x0000000193cb255c (null) + 17428
6 libsqlite3.dylib 0x0000000193c85688 (null) + 2624
7 libsqlite3.dylib 0x0000000193caccf0 (null) + 56216
8 libsqlite3.dylib 0x0000000193c9f368 sqlite3_step + 528
9 CoreData 0x0000000181db47e8 _execute + 124
10 CoreData 0x0000000181dc5574 -[NSSQLiteConnection fetchResultSet:usingFetchPlan:] + 1664
11 CoreData 0x0000000181ec48f4 newFetchedRowsForFetchPlan_MT + 1544
12 CoreData 0x0000000181dcf4bc -[NSSQLCore fetchRowForObjectID:] + 1080
13 CoreData 0x0000000181dcedc0 -[NSSQLCore newValuesForObjectWithID:withContext:error:] + 280
14 CoreData 0x0000000181e89524 __95-[NSPersistentStoreCoordinator(_NSInternalMethods) newValuesForObjectWithID:withContext:error:]_block_invoke + 76
15 CoreData 0x0000000181e90028 gutsOfBlockToNSPersistentStoreCoordinatorPerform + 184
16 libdispatch.dylib 0x0000000193f89954 _dispatch_client_callout + 16
17 libdispatch.dylib 0x0000000193f931e4 _dispatch_barrier_sync_f_invoke + 76
18 CoreData 0x0000000181e81e98 _perform + 180
19 CoreData 0x0000000181dcebf0 -[NSPersistentStoreCoordinator(_NSInternalMethods) newValuesForObjectWithID:withContext:error:] + 160
20 CoreData 0x0000000181dce210 _PFFaultHandlerLookupRow + 352
21 CoreData 0x0000000181dcdc84 _PF_FulfillDeferredFault + 252
22 CoreData 0x0000000181dcda70 _sharedIMPL_pvfk_core + 116
23 CoreData 0x0000000181dde638 _PF_Handler_Public_GetProperty + 176
24 Foundation 0x0000000182f2c7c4 _sortedObjectsUsingDescriptors + 384
25 Foundation 0x0000000182f6a94c -[NSArray(NSKeyValueSorting) sortedArrayUsingDescriptors:] + 608
26 CoreData 0x0000000181dba32c -[NSManagedObjectContext executeFetchRequest:error:] + 3796
27 MyApp 0x00000001001b2b2c static MyApp.CacheHelper.fetchCacheEntriesInAscendingOrderByAccess (MyApp.CacheHelper.Type)(Swift.String) -> Swift.Optional<Swift.Array<Swift.AnyObject>> (CacheHelper.swift:155)
28 MyApp 0x0000000100145ee8 function signature specialization <Arg[0] = Owned To Guaranteed> of MyApp.Base.controlCapacity (MyApp.Base)() -> () (Base.swift:45)
29 MyApp 0x00000001001450a0 MyApp.Base.controlCapacity (MyApp.Base)() -> () (Base.swift)
30 MyApp 0x0000000100145c74 MyApp.Base.setCacheEntryInternal (MyApp.Base)(MyApp.CacheEntry) -> () (Base.swift:120)
31 libdispatch.dylib 0x0000000193f89994 _dispatch_call_block_and_release + 24
32 libdispatch.dylib 0x0000000193f89954 _dispatch_client_callout + 16
33 libdispatch.dylib 0x0000000193f940a4 _dispatch_queue_drain + 1448
34 libdispatch.dylib 0x0000000193f8ca5c _dispatch_queue_invoke + 132
35 libdispatch.dylib 0x0000000193f96318 _dispatch_root_queue_drain + 720
36 libdispatch.dylib 0x0000000193f97c4c _dispatch_worker_thread3 + 108
37 libsystem_pthread.dylib 0x000000019416922c _pthread_wqthread + 816`

Invalid class name. Class names cannot start with an underscore IOS

I am getting this error when I compile successfully and the app launches, 1 time out of 3:
2015-03-26 12:39:32.294 Cleverly[1689:136981] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid class name. Class names cannot start with an underscore.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109943a75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001095dcbb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001099439ad +[NSException raise:format:] + 205
3 Cleverly 0x0000000104f0f50d +[PFObject(Private) _assertValidInstanceClassName:] + 128
4 Cleverly 0x0000000104f0974a -[PFObject(Private) initWithClassName:isPointer:] + 74
5 Cleverly 0x0000000104f09b82 +[PFObject(Private) objectWithClassName:isPointer:] + 151
6 Cleverly 0x0000000104f17163 +[PFObject objectWithoutDataWithClassName:objectId:] + 158
7 Cleverly 0x0000000104f0facf +[PFObject(Private) _objectFromDataFile:error:] + 571
8 Cleverly 0x0000000104f66b34 +[PFUser currentUser] + 581
9 Cleverly 0x0000000104f2e26d -[PFQuery _user] + 43
10 Cleverly 0x0000000104f2e83d -[PFQuery _findObjectsAsync:after:] + 104
11 Cleverly 0x0000000104f30860 -[PFQuery findObjectsInBackgroundWithBlock:] + 288
12 Cleverly 0x0000000104dc873e -[ServerManager uploadOrDeleteMyUserMissingSyncFiles] + 318
13 Cleverly 0x0000000104dce7e6 +[ServerManager uploadOrDeleteMyUserMissingSyncFiles] + 102
14 Cleverly 0x0000000104d8d593 __57-[AppDelegate application:didFinishLaunchingWithOptions:]_block_invoke + 35
15 libdispatch.dylib 0x0000000109e21186 _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x0000000109e40614 _dispatch_client_callout + 8
17 libdispatch.dylib 0x0000000109e2a552 _dispatch_root_queue_drain + 1768
18 libdispatch.dylib 0x0000000109e2bb17 _dispatch_worker_thread3 + 111
19 libsystem_pthread.dylib 0x000000010a1c5637 _pthread_wqthread + 729
20 libsystem_pthread.dylib 0x000000010a1c340d start_wqthread + 13
)
I think it has something to do with adding ParseSDK with CocoaPods. Any ideas? Would it crash even if it was on the store?
It occurs when you make an asynchronous request and try to use data before finishing request. Put for example a loader to see exactly when your async call finished loading data. Also make sure you put/ set parse appid and key [Parse setApplicationId:clientKey:], before any call to parse operations (such as PFUser user). It can crash even in App Store due async not finished loading full data. I think that is the reason you get exception random.

Resources