F-Droid fails to update itself

Hi all, when I try to update F-Droid (through its own interface), it fails with this message: “Failed to install due to an unknown error”.

I’m running F-Droid 1.0.2, and that happens whether I try updating to 1.1 or 1.2. Also, the same happened with the previous version of F-Droid I used (before the UI makeover… I’m guessing 0.102): I only managed to “upgrade” by removing F-Droid and reinstalling it manually (along with all its apps).

I also get this failure when trying to update OsmAnd+, but all other apps update fine.

This is on a Moto G2, with Android 6.0. Has anyone seen this problem? Should I file an issue? Thanks in advance for all help.

I’m also running into an error when I try to update my repositories. Using 1.0.2, on a Galaxy J7 Prime, android 7.0.
I get a popup that says:

"
Error during update: NOT NULL constraint failed: temp_fdroid_apk.version (code 1299)
##########################################
Error code 1299
(SQLITE_CONSTRAINT_NOTNULL)
Caused By : Abort due to constraint violation.
(NOT NULL constraint failed: temp_fdroid_apk.version (code 1299))
##########################################
"

(Note that the above is not a copy+paste, I typed it out, so there may be a typo in there)
Can anyone help?

Same error here, Galaxy S3 Android 7.1.2 with LineageOS 14.1 and Galaxy S7 Android 7.0.
Using 1.0.2 Fdroid and tried to update the Fdroid repo, got the same popup on both phones.

04-16 19:58:48.176 E/UpdateService(10504): Exception during update processing
04-16 19:58:48.176 E/UpdateService(10504): android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: temp_fdroid_apk.version (code 1299)
04-16 19:58:48.176 E/UpdateService(10504): at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
04-16 19:58:48.176 E/UpdateService(10504): at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
04-16 19:58:48.176 E/UpdateService(10504): at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
04-16 19:58:48.176 E/UpdateService(10504): at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
04-16 19:58:48.176 E/UpdateService(10504): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1474)
04-16 19:58:48.176 E/UpdateService(10504): at android.database.sqlite.SQLiteDatabase.insertOrThrow(SQLiteDatabase.java:1369)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.data.ApkProvider.insert(ApkProvider.java:559)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.data.TempApkProvider.insert(TempApkProvider.java:84)
04-16 19:58:48.176 E/UpdateService(10504): at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:302)
04-16 19:58:48.176 E/UpdateService(10504): at android.content.ContentProvider.applyBatch(ContentProvider.java:1778)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.data.FDroidProvider.applyBatch(FDroidProvider.java:66)
04-16 19:58:48.176 E/UpdateService(10504): at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:316)
04-16 19:58:48.176 E/UpdateService(10504): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:438)
04-16 19:58:48.176 E/UpdateService(10504): at android.content.ContentResolver.applyBatch(ContentResolver.java:1318)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.data.RepoPersister.flushApksToDbInBatch(RepoPersister.java:107)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.data.RepoPersister.flushBufferToDb(RepoPersister.java:87)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.data.RepoPersister.saveToDb(RepoPersister.java:63)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.IndexV1Updater.processIndexV1(IndexV1Updater.java:241)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.IndexV1Updater.update(IndexV1Updater.java:102)
04-16 19:58:48.176 E/UpdateService(10504): at org.fdroid.fdroid.UpdateService.onHandleIntent(UpdateService.java:410)
04-16 19:58:48.176 E/UpdateService(10504): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
04-16 19:58:48.176 E/UpdateService(10504): at android.os.Handler.dispatchMessage(Handler.java:102)
04-16 19:58:48.176 E/UpdateService(10504): at android.os.Looper.loop(Looper.java:154)
04-16 19:58:48.176 E/UpdateService(10504): at android.os.HandlerThread.run(HandlerThread.java:61)
04-16 19:58:48.176 I/UpdateService(10504): Updating repo(s) complete, took 13 seconds to complete.

@tobu, @riquisimo, please note that the issue you are describing is not related to the one I mentioned. My F-Droid updates its repositories fine: what it does not is upgrade the F-Droid app to the latest version.

same here: Error message “NOT NULL constraint failed: temp_fdroid_apk-version (code 1299)” when trying to update the repository and an empty f-droid; not even showing installed packages.

@riquisimo, @tobu, et al Since the OP is for a different issue …

please note that the issue you are describing is not related to the one I mentioned. My F-Droid updates its repositories fine: what it does not is upgrade the F-Droid app to the latest version.

… I created a new topic for the “NOT NULL constraint…” issue: Exception when updating repositories

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