Core data migration failed only for few users

I have done lightweight migration and overwrite the build and verified that it was working as expected. After the application is released in the Appstore.

We are getting the following error saying the migration failed. We captured this through Fabrics(Crash reporting SDK).


Crash observed in iOS 10.2.1 and iOS 10.3.1 and devices iPhone6 and 6s.


My question is, If migration failure is the problem then all the user should have affected by this crash. So is there any other reasons like database corruption only for those 2 users.


Fatal Exception: NSInternalInconsistencyException

0 CoreFoundation 0x190202fd8 __exceptionPreprocess

1 libobjc.A.dylib 0x18ec64538 objc_exception_throw

2 CoreData 0x1925b82c0 -[NSPersistentStoreCoordinator _exceptionNoStoreSaveFailureForError:recommendedFrame:]

3 CoreData 0x1925b8930 -[NSPersistentStoreCoordinator _introspectLastErrorAndThrow]

4 CoreData 0x1925b8cb8 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke

5 CoreData 0x1925b20f0 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:]

6 CoreData 0x1924daadc -[NSPersistentStoreCoordinator executeRequest:withContext:error:]

7 CoreData 0x1924dab08 -[NSPersistentStoreCoordinator executeRequest:withContext:error:]

8 CoreData 0x1924fb97c -[NSManagedObjectContext save:]

Replies

Hi,

I am also facing the same problem. Previously, fabric was showing crash happening in iOS 8 for 2 user. But in latest version of my app, it is showing crash in iOS 12 for 2 users.

In fabric, its showing as :

Fatal Exception: NSInternalInconsistencyException

This NSPersistentStoreCoordinator has no persistent stores (schema mismatch or migration failure). It cannot perform a save operation.


I have done lightweight migration for coredata db , after that this crash is happening but only for 2 users. Can anyone help me on this issue?