nextcloud-deck
nextcloud-deck copied to clipboard
`SQLiteConstraintException: UNIQUE constraint failed`
Steps to reproduce the behavior:
- Click
Choose Account
- Choose suitable account
- Accept Nextcloud Deck access Nextcloud Account
- Wait to import boards
- Error shows up
Expected behavior Import available boards
Screenshots
Versions
- Nextcloud: 25.0.4
- Nextcloud Deck: 1.8.3
- Nextcloud Android: 3.24.1
- Nextcloud Android Deck: 1.21.8
Smartphone (please complete the following information):
- Device: Xiaomi Redmi Note 11
- Android-Version: 12
- App-Store:
- [ ] Google Play Store
- [ ] Google Play Store (Beta channel)
- [x] F-Droid
- [ ] Huawei AppGallery
Stacktrace
App Version: 1.21.8
App Version Code: 1021008
Server App Version: 1.8.3
App Flavor: fdroid
Files App Version Code: 30240190
---
OS Version: 4.19.157-perf-g85e27949fb09(V13.0.7.0.SGCMIXM)
OS API Level: 31
Device: spes
Manufacturer: Xiaomi
Model (and Product): 2201117TG (spes_global)
---
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: Card.accountId, Card.id (code 2067 SQLITE_CONSTRAINT_UNIQUE)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:940)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:89)
at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.kt:42)
at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.kt:102)
at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.CardDao_Impl.insert(CardDao_Impl.java:263)
at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.CardDao_Impl.insert(CardDao_Impl.java:43)
at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.DataBaseAdapter.createCardDirectly(DataBaseAdapter.java:709)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider.createInDB(CardDataProvider.java:84)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider.createInDB(CardDataProvider.java:34)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper$1.onResponse(SyncHelper.java:62)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper$1.onResponse(SyncHelper.java:47)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider$1.onResponse(CardDataProvider.java:63)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider$1.onResponse(CardDataProvider.java:58)
at it.niedermann.nextcloud.deck.api.RequestHelper$ResponseConsumer.accept(RequestHelper.java:52)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onNext(ObservableSubscribeOn.java:58)
at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
at io.reactivex.internal.operators.observable.ObservableFromPublisher$PublisherSubscriber.onNext(ObservableFromPublisher.java:56)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$com-nextcloud-android-sso-api-NextcloudAPI(NextcloudAPI.java:130)
at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda0.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
i get this exact issue... even tried multiple versions including the play store and f-droid versions. also tried multiple phones/tablets
Versions prior to 1.22.x
had a known issue in parallel execution that could lead to this error.
Please wait until 1.22.x
is available on your store, then clear the storage of the deck android app as described in our FAQ and import your account again.
Cannot pinpoint it to just one board. Here is what I did. Made a test user. Kept him out of any groups that are shared with the boards. Shared one board. Worked. Shared each board without clearing data on the app. Worked. Left all boards shared to that user. Cleared the app data. Tried the initial sync. Failed. Tried just one board at a time clearing the app and share on the boards to make sure he is only getting the one board. Worked on all boards. So I can't pinpoint it to one board and I can sort of get it working if I do the first board sync then add one board at a time to that user and refresh sync.
One suggestion if possible is have the user be able to select only the boards they want synced on mobile. It is a suggestion a few of my users want and it might be a quick bandaid for this issue right now.
Oh I forgot to say this is all on 1.22.1
App Version: 1.22.1
App Version Code: 1022001
Server App Version: 1.8.3
App Flavor: play
Files App Version Code: 30240290
---
OS Version: 4.14.186-gd5b54dace-dirty(root.20220812.180105)
OS API Level: 30
Device: Titan_Slim
Manufacturer: Unihertz
Model (and Product): Titan Slim (Titan_Slim)
---
android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:938)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:88)
at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.kt:42)
at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.kt:102)
at it.niedermann.nextcloud.deck.database.dao.MentionDao_Impl.insert(MentionDao_Impl.java:142)
at it.niedermann.nextcloud.deck.database.dao.MentionDao_Impl.insert(MentionDao_Impl.java:23)
at it.niedermann.nextcloud.deck.database.DataBaseAdapter.createMention(DataBaseAdapter.java:1179)
at it.niedermann.nextcloud.deck.remote.helpers.providers.DeckCommentsDataProvider.persistMentions(DeckCommentsDataProvider.java:90)
at it.niedermann.nextcloud.deck.remote.helpers.providers.DeckCommentsDataProvider.createInDB(DeckCommentsDataProvider.java:82)
at it.niedermann.nextcloud.deck.remote.helpers.providers.DeckCommentsDataProvider.createInDB(DeckCommentsDataProvider.java:21)
at it.niedermann.nextcloud.deck.remote.helpers.SyncHelper$1.onResponse(SyncHelper.java:62)
at it.niedermann.nextcloud.deck.remote.helpers.SyncHelper$1.onResponse(SyncHelper.java:47)
at it.niedermann.nextcloud.deck.remote.helpers.providers.DeckCommentsDataProvider$1.onResponse(DeckCommentsDataProvider.java:41)
at it.niedermann.nextcloud.deck.remote.helpers.providers.DeckCommentsDataProvider$1.onResponse(DeckCommentsDataProvider.java:32)
at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.accept(RequestHelper.java:52)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onNext(ObservableSubscribeOn.java:58)
at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
at io.reactivex.internal.operators.observable.ObservableFromPublisher$PublisherSubscriber.onNext(ObservableFromPublisher.java:56)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$com-nextcloud-android-sso-api-NextcloudAPI(NextcloudAPI.java:130)
at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda0.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
This is from the server took out my ip address.
{"reqId":"H2JnTDJzMJHi0QcsD2VV","level":3,"time":"2023-04-07T22:05:24+00:00","remoteAddr":"X.x.x.x","user":"--","app":"index","method":"GET","url":"/index.php/apps/deck/api/v1.1/boards/10/stacks/42/cards/154?","message":"userId must be provided and must be not empty","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.24.2","version":"25.0.4.1","exception":{"Exception":"OCA\Deck\BadRequestException","Message":"userId must be provided and must be not empty","Code":0,"Trace":[{"file":"/var/snap/nextcloud/33908/nextcloud/extra-apps/deck/lib/Validators/BaseValidator.php","line":85,"function":"validate","class":"OCA\Deck\Validators\BaseValidator","type":"->"},{"file":"/var/snap/nextcloud/33908/nextcloud/extra-apps/deck/lib/Service/AssignmentService.php","line":108,"function":"check","class":"OCA\Deck\Validators\BaseValidator","type":"->"},{"function":"__construct","class":"OCA\Deck\Service\AssignmentService","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php","line":89,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"array_map"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/AppFramework/App.php","line":159,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/snap/nextcloud/33908/htdocs/lib/base.php","line":1047,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/snap/nextcloud/33908/htdocs/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/snap/nextcloud/33908/nextcloud/extra-apps/deck/lib/Validators/BaseValidator.php","Line":66,"CustomMessage":"--"},"id":"643093e78c43b"}
And here is the formatted.... Should of pasted this instead of raw. Sorry about that.
[index] Error: OCA\Deck\BadRequestException: userId must be provided and must be not empty at <
- /var/snap/nextcloud/33908/nextcloud/extra-apps/deck/lib/Validators/BaseValidator.php line 85 OCA\Deck\Validators\BaseValidator->validate()
- /var/snap/nextcloud/33908/nextcloud/extra-apps/deck/lib/Service/AssignmentService.php line 108 OCA\Deck\Validators\BaseValidator->check()
- <
> OCA\Deck\Service\AssignmentService->__construct() - /snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 108 ReflectionClass->newInstanceArgs()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 116 OC\AppFramework\Utility\SimpleContainer->buildClass()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 133 OC\AppFramework\Utility\SimpleContainer->resolve()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 465 OC\AppFramework\Utility\SimpleContainer->query()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 437 OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 89 OC\AppFramework\DependencyInjection\DIContainer->query()
- <
> OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}("*** sensitive parameters replaced ***") - /snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 108 array_map()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 116 OC\AppFramework\Utility\SimpleContainer->buildClass()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 133 OC\AppFramework\Utility\SimpleContainer->resolve()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 465 OC\AppFramework\Utility\SimpleContainer->query()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 437 OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
- /snap/nextcloud/33908/htdocs/lib/private/AppFramework/App.php line 159 OC\AppFramework\DependencyInjection\DIContainer->query()
- /snap/nextcloud/33908/htdocs/lib/private/Route/Router.php line 298 OC\AppFramework\App::main()
- /snap/nextcloud/33908/htdocs/lib/base.php line 1047 OC\Route\Router->match()
- /snap/nextcloud/33908/htdocs/index.php line 36 OC::handleRequest()
GET /index.php/apps/deck/api/v1.1/boards/10/stacks/42/cards/154? from X.X X.X at 2023-04-07T22:05:24+00:00
Thanks for the information!
- The issue is caused by wrong handling of comments
- The server log is irrelevant, the problem is purely client side as far as I can see
- Synchronizing only parts of an account is currently not on our roadmap
@desperateCoder should be able to track down the root cause 😉
I'll look into it these days, but this weekend is quite packed already. I'll keep you guys updated!
Thank you so much. If I find anything I'll post it.
@Gobytego can you please test the following Build and report back if this one works reliably for you:
This is a debug build, which will be installed besides your regular Deck app, but it has a "DEV" label on its icon. Nothing will happen to your actual App.
This build has a ton of changes regarding the sync, so it might just work or just die... Depending on the amount of data on your server the sync may take a while, but it should be more stable from what i can tell.
I get this.
App Version: 1.22.1
App Version Code: 1022001
Server App Version: 1.8.3
App Flavor: dev
Files App Version Code: 30240290
---
OS Version: 4.14.186-gd5b54dace-dirty(root.20220812.180105)
OS API Level: 30
Device: Titan_Slim
Manufacturer: Unihertz
Model (and Product): Titan Slim (Titan_Slim)
---
com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: HTTP request failed with HTTP status-code: 500
at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.lambda$onResponse$0$it-niedermann-nextcloud-deck-remote-api-RequestHelper$ResponseConsumer(RequestHelper.java:50)
at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer$$ExternalSyntheticLambda0.run(Unknown Source:6)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by: java.lang.RuntimeException: HTTP StatusCode wasn't 2xx
... 7 more
Did it at least survive longer?
Anyways, the cut-off logs are quite crappy, I'll see if I can make it more verbose. I'll check on this and report back as soon as I have a fix.
It seems to be the same. I'll try again.
Yah same thing.
Ok, so I enhanced the error messages for failed calls like in your case - I should now see where it fails for the client side (you already provided server logs, thanks for that! I still need to make sure this is the issue on our side as well.)
so the following APK should be more verbose regarding the failed request:
Please uninstall the DEV app if you didn't do so already and install the APK above. It most probably will die at the exact same moment as before, but will hopefully provide a ton of more context to work with.
Now its hanging with no errors. I tried wiping data from all three apps and started again but still just hanging but on a different board.
Wait I got something.
App Version: 1.22.1
App Version Code: 1022001
Server App Version: 1.8.3
App Flavor: play
Files App Version Code: 30240290
---
OS Version: 4.14.186-gd5b54dace-dirty(root.20220812.180105)
OS API Level: 30
Device: Titan_Slim
Manufacturer: Unihertz
Model (and Product): Titan Slim (Titan_Slim)
---
android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:938)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:88)
at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.kt:42)
at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.kt:102)
at it.niedermann.nextcloud.deck.database.dao.StackDao_Impl.insert(StackDao_Impl.java:177)
at it.niedermann.nextcloud.deck.database.dao.StackDao_Impl.insert(StackDao_Impl.java:33)
at it.niedermann.nextcloud.deck.database.DataBaseAdapter.createStack(DataBaseAdapter.java:681)
at it.niedermann.nextcloud.deck.remote.helpers.providers.StackDataProvider.createInDB(StackDataProvider.java:44)
at it.niedermann.nextcloud.deck.remote.helpers.providers.StackDataProvider.createInDB(StackDataProvider.java:20)
at it.niedermann.nextcloud.deck.remote.helpers.SyncHelper$1.onResponse(SyncHelper.java:62)
at it.niedermann.nextcloud.deck.remote.helpers.SyncHelper$1.onResponse(SyncHelper.java:47)
at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.accept(RequestHelper.java:52)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onNext(ObservableSubscribeOn.java:58)
at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
at io.reactivex.internal.operators.observable.ObservableFromPublisher$PublisherSubscriber.onNext(ObservableFromPublisher.java:56)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$com-nextcloud-android-sso-api-NextcloudAPI(NextcloudAPI.java:130)
at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda0.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
App Version: 1.22.1
App Version Code: 1022001
Server App Version: 1.8.3
App Flavor: play
Files App Version Code: 30240290
---
OS Version: 4.14.186-gd5b54dace-dirty(root.20220812.180105)
OS API Level: 30
Device: Titan_Slim
Manufacturer: Unihertz
Model (and Product): Titan Slim (Titan_Slim)
---
android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:938)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:88)
at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.kt:42)
at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.kt:102)
at it.niedermann.nextcloud.deck.database.dao.UserDao_Impl.insert(UserDao_Impl.java:177)
at it.niedermann.nextcloud.deck.database.dao.UserDao_Impl.insert(UserDao_Impl.java:29)
at it.niedermann.nextcloud.deck.database.DataBaseAdapter.createUser(DataBaseAdapter.java:393)
at it.niedermann.nextcloud.deck.remote.helpers.providers.CardDataProvider.fixRelations(CardDataProvider.java:100)
at it.niedermann.nextcloud.deck.remote.helpers.providers.CardDataProvider.createInDB(CardDataProvider.java:83)
at it.niedermann.nextcloud.deck.remote.helpers.providers.CardDataProvider.createInDB(CardDataProvider.java:34)
at it.niedermann.nextcloud.deck.remote.helpers.SyncHelper$1.onResponse(SyncHelper.java:62)
at it.niedermann.nextcloud.deck.remote.helpers.SyncHelper$1.onResponse(SyncHelper.java:47)
at it.niedermann.nextcloud.deck.remote.helpers.providers.CardDataProvider$1.onResponse(CardDataProvider.java:63)
at it.niedermann.nextcloud.deck.remote.helpers.providers.CardDataProvider$1.onResponse(CardDataProvider.java:58)
at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.accept(RequestHelper.java:52)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onNext(ObservableSubscribeOn.java:58)
at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
at io.reactivex.internal.operators.observable.ObservableFromPublisher$PublisherSubscriber.onNext(ObservableFromPublisher.java:56)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$com-nextcloud-android-sso-api-NextcloudAPI(NextcloudAPI.java:130)
at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda0.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
I'm slightly confused:
App Flavor: play
This is your actual app, not the one I posted above, right? The dev build should be like App Flavor: dev
or am I missing something?
Edit:
In case something won't work (e.g. no error at all, but no sync either) please try to delete app data before uninstalling. Android behaves quite randomly when it comes to uninstalling apps ..
Oh maybe I accedently hit the regular app. Hold I'll do it again.
So tried it again and it just hangs here with no traffic or anything.
Ok so I uninstalled both the nextcloud app. And the deck app plus the deck Dev you sent. Just reinstalled both the nextcloud app and the deck Dev. Its now just sitting there looks like its stuck on importing either board 5,8,9, or 11 but no error. Where as before with the non Dev version it wouldn't get past board 4 with out giving me a bunch of the error.
Okay this time it got stuck on 6. Very inconsistent. But still no error.
how long did you let it do its thing? as mentioned, the time it runs highly depends of a boards data. Can you just let it do whatever it does for a longer period of time? I have a quite big test-account with like hundreds of cards and it took like 20 minutes to finally finish... if you have a log viewer (e.g. logcat) installed, you could check out if the app is still logging stuff, i bet it does. I didn't experience a single case of "it just stopped doing stuff", it either dies or just takes its time.
Okay I'll keep it going.
Here are two screen shots. One from a little after I started and one from now. It seems to just be sitting there but I'll keep it going.
Do you have a board with a lot of cards and comments?