wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
482 stars 259 forks source link

SQLiteConstraintException: UNIQUE constraint failed: ANNOTATION.ANNOTATION_ID (code 2067 SQLITE_CONSTRAINT_UNIQUE) #1304

Open shtrom opened 1 year ago

shtrom commented 1 year ago

Issue details

After adding an annotation, the following error started popping up. I'm not sure how to reproduce the cause, but the main issue seems to be that it prevents the app from updating the local sync status: I can add articles, and they get pushed to the Wallabag instance, but marking them read doesn't sync up.

Unknown error android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: ANNOTATION.ANNOTATION_ID (code 2067 SQLITE_CONSTRAINT_UNIQUE) ``` Unknown error android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: ANNOTATION.ANNOTATION_ID (code 2067 SQLITE_CONSTRAINT_UNIQUE) Stacktrace: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: ANNOTATION.ANNOTATION_ID (code 2067 SQLITE_CONSTRAINT_UNIQUE) at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method) at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:961) at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790) at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:89) at org.greenrobot.greendao.AbstractDao.executeInsertInTx(AbstractDao.java:284) at org.greenrobot.greendao.AbstractDao.insertInTx(AbstractDao.java:237) at org.greenrobot.greendao.AbstractDao.insertInTx(AbstractDao.java:215) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdater.persistCollections(ArticleUpdater.java:797) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdater.processArticles(ArticleUpdater.java:262) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdater.performUpdate(ArticleUpdater.java:198) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdater.update(ArticleUpdater.java:127) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdateWorker.updateArticles(ArticleUpdateWorker.java:77) at fr.gaulupeau.apps.Poche.service.workers.ArticleUpdateWorker.update(ArticleUpdateWorker.java:37) at fr.gaulupeau.apps.Poche.service.tasks.UpdateArticlesTask.run(UpdateArticlesTask.java:17) at fr.gaulupeau.apps.Poche.service.tasks.ActionRequestTask.run(ActionRequestTask.java:25) at fr.gaulupeau.apps.Poche.service.-$$Lambda$0cveUIqKhxWljSld0gpOhfhYfj0.run(Unknown Source:2) at fr.gaulupeau.apps.Poche.service.TaskService.run(TaskService.java:162) at fr.gaulupeau.apps.Poche.service.TaskService.lambda$PgumDII_lptJcUDKRD70B1M_ER8(Unknown Source:0) at fr.gaulupeau.apps.Poche.service.-$$Lambda$TaskService$PgumDII_lptJcUDKRD70B1M_ER8.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:1012) ```

Duplicate?

Have you searched the issues of this repository if your issue is already known? yes

Actual behaviour

Expected behaviour

Steps to reproduce the issue

Unfortunately, I don't know, but I'm gonna have a look around the DB to see if there is a smoking gun

Environment details

Logs

I don't think server logs are relevant.

Your experience with wallabag Android app

Loving it!

shtrom commented 1 year ago

Ok, I just delete from annotation; and hoped for the best. After pushing back to the device and starting the app, the error is gone.

I am now trying a full update to see if the annotations come back.