Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Client Client
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 517
    • Issues 517
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 47
    • Merge requests 47
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • F-Droid
  • ClientClient
  • Issues
  • #1418
Closed
Open
Created Apr 16, 2018 by Marcus@Bubu🐲Contributor

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 Apr 16, 2018 by Hans-Christoph Steiner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking