Problem with UNIQUE constraint failed

#1

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?

#2

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

#3

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

#4

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

#5

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?

#6

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);

closed #7

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

Mastodon