[CoreStore: Fatal Error] BaseDataTransaction.swift:83 create #222

Closed
opened 2025-12-29 15:26:55 +01:00 by adam · 2 comments
Owner

Originally created by @shift00 on GitHub (Jul 11, 2018).

Hello, I have very annoying problem with CoreStore. I start the application and sometimes I get an error which can be seen below. What can I do with this?

[CoreStore: Fatal Error] BaseDataTransaction.swift:83 create
↪︎ Attempted to create an entity of type 'SampleCSModel', but a destination persistent store containing the entity type could not be found.

Originally created by @shift00 on GitHub (Jul 11, 2018). Hello, I have very annoying problem with CoreStore. I start the application and sometimes I get an error which can be seen below. What can I do with this? ❗ [CoreStore: Fatal Error] BaseDataTransaction.swift:83 create ↪︎ Attempted to create an entity of type 'SampleCSModel', but a destination persistent store containing the entity type could not be found.
adam closed this issue 2025-12-29 15:26:55 +01:00
Author
Owner

@shift00 commented on GitHub (Jul 11, 2018):

Hint: My code with addStorage... is executed in AppDelegate in didFinishLaunchingWithOptions

@shift00 commented on GitHub (Jul 11, 2018): Hint: My code with `addStorage...` is executed in AppDelegate in `didFinishLaunchingWithOptions`
Author
Owner

@JohnEstropia commented on GitHub (Jul 17, 2018):

It is highly likely you are accessing your entities before the addStorage() method's completion is called. Please make sure your view controllers are not accessing your data before that.

You can easily check this by adding a breakpoint inside the completion closure and inside the CoreStore.defaultStack getter, then make sure that the defaultStack is called only from the CoreStore.addStorage() call.

@JohnEstropia commented on GitHub (Jul 17, 2018): It is highly likely you are accessing your entities before the `addStorage()` method's `completion` is called. Please make sure your view controllers are not accessing your data before that. You can easily check this by adding a breakpoint inside the `completion` closure and inside the `CoreStore.defaultStack` getter, then make sure that the `defaultStack` is called only from the `CoreStore.addStorage()` call.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#222