Skip to content

TracksPersistentStoreException - Error initializing Tracks: Error Domain=NSSQLiteErrorDomain #209

@iamgabrielma

Description

@iamgabrielma

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions