Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

TracksPersistentStoreException - Error initializing Tracks: Error Domain=NSSQLiteErrorDomain

Open
#209 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ios, objective-c, sqlite, swift

Research direction

Start by tracing initialization around persistentStoreCoordinator and addPersistentStoreWithType, using the reported Tracks.sqlite path, NSSQLiteErrorDomain code 13, and Sentry issue as evidence. Determine whether the failure belongs to Automattic Tracks or the WooCommerce iOS implementation; done means identifying the source and documenting a reproducible, actionable finding.

Written by the indexing model from the issue text.

Description

I'm not entirely sure if this is coming from the AutomatticTracks pod or is something else in the WCiOS implementation, as the crash seemed to happen when attempting to create the persistentStoreCoordinator, but this last bit in the stack trace caught my attention:

if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) {
  // Replace this with code to handle the error appropriately.
  // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
    TracksLogError(@"Unresolved error %@, %@", error, [error userInfo]);
            
    @throw [NSException exceptionWithName:TracksPersistentStoreException
                                           reason:[NSString stringWithFormat:@"Error initializing Tracks: %@", error]
                                         userInfo:error.userInfo];
}
TracksPersistentStoreException
Error initializing Tracks: Error Domain=NSSQLiteErrorDomain Code=13 "(null)" UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/425A1933-DC91-4E12-9739-A08822A585D0/Library/Application Support/com.automattic.woocommerce/Tracks.sqlite, NSSQLiteErrorDomain=13}

I checked a bit and seems to point to a "not enough memory" error, however the logs show Free Memory of 324.5 MiB at the time of the crash, which should be enough from my tests 🤔

Sentry Issue: WOOCOMMERCE-IOS-1DHC

Dominant language
Swift
Stars
47
Forks
15
Avg merge
1d 34m
Merged PRs (30d)
1

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/Automattic-Tracks-iOS

All issues in Automattic/Automattic-Tracks-iOS

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.