fdroid update allowed null versionName to pass through
- F-Droid version (in the About screen): 1.2
- F-Droid privileged extension version (if installed): current master
What did you do? (clear steps if possible)
Updated index.
What did you expect to see?
index processing completing sucessfully
What did you see instead?
A toast with an error, adb logcat reveals the following:
04-16 18:46:56.233 31952 32345 E UpdateService: Exception during update processing
04-16 18:46:56.233 31952 32345 E UpdateService: android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: temp_fdroid_apk.version (code 1299)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1474)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.database.sqlite.SQLiteDatabase.insertOrThrow(SQLiteDatabase.java:1369)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.data.ApkProvider.insert(ApkProvider.java:559)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.data.TempApkProvider.insert(TempApkProvider.java:84)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:302)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.content.ContentProvider.applyBatch(ContentProvider.java:1778)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.data.FDroidProvider.applyBatch(FDroidProvider.java:62)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:316)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:438)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.content.ContentResolver.applyBatch(ContentResolver.java:1318)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.data.RepoPersister.flushApksToDbInBatch(RepoPersister.java:107)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.data.RepoPersister.flushBufferToDb(RepoPersister.java:87)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.data.RepoPersister.saveToDb(RepoPersister.java:63)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.IndexV1Updater.processIndexV1(IndexV1Updater.java:284)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.IndexV1Updater.processDownloadedIndex(IndexV1Updater.java:156)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.IndexV1Updater.update(IndexV1Updater.java:98)
04-16 18:46:56.233 31952 32345 E UpdateService: at org.fdroid.fdroid.UpdateService.onHandleIntent(UpdateService.java:397)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.os.Handler.dispatchMessage(Handler.java:102)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.os.Looper.loop(Looper.java:154)
04-16 18:46:56.233 31952 32345 E UpdateService: at android.os.HandlerThread.run(HandlerThread.java:61)
04-16 18:46:56.233 31952 32345 I UpdateService: Updating repo(s) complete, took 13 seconds to complete.
The index is not updated after that and I can repeat the procedure.
Edited by Hans-Christoph Steiner