Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shtrom opened this issue Apr 10, 2023 · 1 comment

Comments

@shtrom
Copy link
Contributor

shtrom commented Apr 10, 2023

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

  • Error is shown as notification, the error seems fatal
  • Read status not synced up

Expected behaviour

  • Non fatal error is shown as notification, with some way to fix
  • Read status still synced up

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

  • wallabag app version: 2.4.3
  • wallabag app installation source (e.g. Gplay, F-Droid, manual): F-Droid
  • Android OS version: 13
  • Android ROM (e.g. stock, LineageOS, SlimRom,…): stock
  • Android hardware: Pixel 6a
  • wallabag server version: 2.5.4
  • Do you have Two-Factor-Authentication enabled?: no

Logs

I don't think server logs are relevant.

Your experience with wallabag Android app

Loving it!

@shtrom
Copy link
Contributor Author

shtrom commented Apr 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant