Problem with UNIQUE constraint failed

When the store is open, it is show this error:
UNIQUE constraint failed: temp_fdroid_app.packageId, temp_fdroid_app.repoId (code 1555)

I did a ctrl + shift + F by temp_fdroid_app but not show nothing code.

What can be?

This is a custom build of F-Droid? What did you change?

Yes it is customized, I did a lot of changes.
But What is this issue?

unique constraint come from SQL, those fields must be unique in the database

Along with the above error, this error is also displayed: no such table: temp_update_db.temp_fdroid_app
I do not know what might be happening, any ideas?

In this method:

private Map<String, Long> flushAppsToDbInBatch() throws RepoUpdater.UpdateException {
    ArrayList<ContentProviderOperation> appOperations = insertApps(appsToSave);

    try {
        context.getContentResolver().applyBatch(TempAppProvider.getAuthority(), appOperations);
        return getIdsForPackages(appsToSave);
    } catch (RemoteException | OperationApplicationException e) {
        throw new RepoUpdater.UpdateException(repo, "An internal error occurred while updating the database", e);
    }
}

In this line:
context.getContentResolver().applyBatch(TempAppProvider.getAuthority(), appOperations);

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.