TracksPersistentStoreException - Error initializing Tracks: Error Domain=NSSQLiteErrorDomain
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
- Domain
- databases, mobile-dev
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/Automattic-Tracks-iOS
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Automattic/Automattic-Tracks-iOS#305 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Automattic/Automattic-Tracks-iOS#298 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in Automattic/Automattic-Tracks-iOS
Similar issues
-
area: sidebar bug S2: major
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
manaflow-ai/cmux#20281 · 1 comment ·
Maintainers usually reply within 1 day
-
If a snippet replacement starts with a newline, it truncates the first parts of the replacement.Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
margelo/react-native-vision-camera#4216 ·
Maintainers usually reply within 4 days
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
compiler-explorer/compiler-explorer#9272 ·
Maintainers usually reply within 1 day