# Core Data Error : NSCocoaErrorDomain Code=256

**URL:** <https://forums.kodeco.com/t/core-data-error-nscocoaerrordomain-code-256/197670>\
**Category:** Core Data by Tutorials\
**Tags:** ios\
**Created:** [October 11, 2023, 11:35am UTC](https://forums.kodeco.com/t/core-data-error-nscocoaerrordomain-code-256/197670 "2023-10-11T11:35:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cchen0312](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cchen0312/32/108419_2.png) [@cchen0312](https://forums.kodeco.com/u/cchen0312)\
**Post date:** [October 11, 2023, 11:35am UTC](https://forums.kodeco.com/t/core-data-error-nscocoaerrordomain-code-256/197670/1 "2023-10-11T11:35:35Z")

</div>

Hi,

I would like to ask about the error when storeContainer.loadPersistentStores.  
I keep getting error like `Error Domain=NSCocoaErrorDomain Code=256`

---

<div class="post-metadata">

**Author:** ![gdelarosa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdelarosa/32/109063_2.png) [@gdelarosa](https://forums.kodeco.com/u/gdelarosa)\
**Post date:** [October 12, 2023, 9:58pm UTC](https://forums.kodeco.com/t/core-data-error-nscocoaerrordomain-code-256/197670/2 "2023-10-12T21:58:49Z")

</div>

Hello @cchen0312 👋 and welcome to the Kodeco community! If you are noticing that the error also says “The file couldn’t be opened” or related it could be that:

- The file does not exist.
- The file is corrupted.
- The file is in use by another process.
- The file permissions are incorrect.
- There is a disk space issue.

To troubleshoot this issue, you can try the following:

1. Make sure that the Core Data store file exists. You can check this by opening the Finder and navigating to the app’s Documents directory.
2. Try to open the Core Data store file in a text editor. If the file is corrupted, you will see an error message.
3. Make sure that the Core Data store file is not in use by another process. You can check this by opening Activity Monitor and looking for any processes that are accessing the file.
4. Check the file permissions for the Core Data store file. Make sure that you have read and write permissions for the file.
5. Make sure that there is enough disk space available.

CCing the authors: @pietrorea @mmorey @astralbodies

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [March 26, 2024, 3:36am UTC](https://forums.kodeco.com/t/core-data-error-nscocoaerrordomain-code-256/197670/3 "2024-03-26T03:36:24Z")

</div>

Closed on March 26, 2024, 3:36am UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
