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

SSO Download Error & FOREIGN KEY constraint failed #1254

Closed
1 of 4 tasks
xdubx opened this issue Apr 15, 2022 · 3 comments
Closed
1 of 4 tasks

SSO Download Error & FOREIGN KEY constraint failed #1254

xdubx opened this issue Apr 15, 2022 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@xdubx
Copy link

xdubx commented Apr 15, 2022

Describe the bug
Deck App don't download the boards. And stuck by the third one. After that, the first error appears a few times and the last error appears in the last window.

Steps to reproduce the behavior:

  1. Go to 'Select account '
  2. Click on 'Active Session from the nextcloud app'
  3. Click "ok"
  4. See error

Expected behavior
Should download all boards.

Screenshots
None

Versions

  • Nextcloud: 22.2.3
  • Nextcloud Deck: 1.5.6
  • Nextcloud Android: 3.19
  • Nextcloud Android Deck: 1.20.0

Smartphone (please complete the following information):
OS Version: 4.4.153-perf+(V12.0.2.0.PEIMIXM)
OS API Level: 28
Device: whyred
Manufacturer: Xiaomi
Model (and Product): Redmi Note 5 (whyred)

  • App-Store:
    • Google Play Store
    • Google Play Store (Beta channel)
    • F-Droid
    • Huawei AppGallery

Stacktrace

App Version: 1.20.0
App Version Code: 1020000
Server App Version: 1.5.6
App Flavor: fdroid

Files App Version Code: 30190090

---

OS Version: 4.4.153-perf+(V12.0.2.0.PEIMIXM)
OS API Level: 28
Device: whyred
Manufacturer: Xiaomi
Model (and Product): Redmi Note 5 (whyred)

---

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:796)
	at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
	at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
	at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.java:51)
	at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.java:114)
	at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.StackDao_Impl.insert(StackDao_Impl.java:177)
	at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.StackDao_Impl.insert(StackDao_Impl.java:33)
	at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.DataBaseAdapter.createStack(DataBaseAdapter.java:645)
	at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.StackDataProvider.createInDB(StackDataProvider.java:44)
	at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.StackDataProvider.createInDB(StackDataProvider.java:20)
	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.api.RequestHelper$ResponseConsumer.accept(RequestHelper.java:56)
	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$$ExternalSyntheticLambda2.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:764)

App Version: 1.20.0
App Version Code: 1020000
Server App Version: 1.5.6
App Flavor: fdroid

Files App Version Code: 30190090

---

OS Version: 4.4.153-perf+(V12.0.2.0.PEIMIXM)
OS API Level: 28
Device: whyred
Manufacturer: Xiaomi
Model (and Product): Redmi Note 5 (whyred)

---

com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: HTTP-Anfrage ist fehlgeschlagen mit HTTP-Statuscode: 403
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:188)
	at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:199)
	at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$com-nextcloud-android-sso-api-NextcloudAPI(NextcloudAPI.java:129)
	at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda2.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:764)
Caused by: java.lang.IllegalStateException: {"status":403,"message":"Permission denied"}

	at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:455)
	at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:128)
	at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:111)
	at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:158)
	at android.os.Binder.execTransact(Binder.java:735)

I cannot explain the 403 error. I use Nextcloud Talk and the Nextcloud app without problems with Keycloak as SSO. Maybe someone has a tip on what I can do to fix the error?

@stefan-niedermann
Copy link
Owner

@desperateCoder I think you already figured that the SQLConstraint exception was caused by the used ThreadPoolExecutors, no? Did you already push your fix into master and do we want to take #1210 (with branch 1210-fixed-thread-pools - still needs some work though, I think)?

For refetence: this issue has also been reported at help.nextcloud com.

@stefan-niedermann stefan-niedermann added the 🐞 bug Something isn't working label Apr 16, 2022
@stefan-niedermann stefan-niedermann pinned this issue Apr 16, 2022
@xdubx
Copy link
Author

xdubx commented May 27, 2022

I dated my nextcloud version to v24 and the deck app too and the error is gone. Meanwhile I changed my is version to android 11.
Someone of this factors solve the problem.
Server version 1.7

@stefan-niedermann
Copy link
Owner

This cause of this issue should be fixed in 1.20.1. Please reopen in case the problem occurs again with this or a higher version.

Thank you for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants