nextcloud-deck icon indicating copy to clipboard operation
nextcloud-deck copied to clipboard

Error due photo attaching to the card

Open neerro opened this issue 4 years ago • 6 comments

Describe the bug When I try to attached any photo to new created card and save progress the error suddenly has appear. It happens every time when I tried to repeate this action. When card was created I could fulfill all necessary text information then save it and sync with instance without any obstacles. Stacktrace is attached below.

Steps to reproduce the behavior: I did all necessary steps according Deck algorithm for uploading photo as attach. I belive there is no another capabilities to do it by another way.

Expected behavior In the conclusion of this action I wanna observe attached and synchronized photos.

Screenshots I would try to provide the video of this issue if it will be necessary.

Versions

  • Nextcloud: 20.0.3
  • Nextcloud Deck: 1.6.1
  • Nextcloud Android:
  • Nextcloud Android Deck: 1.20.0

Smartphone (please complete the following information):

  • Device: Honor
  • Android-Version: 10
  • App-Store: Google Play Store

Stacktrace

App Version: 1.20.0
App Version Code: 1020000
Server App Version: 1.6.1
App Flavor: play

Files App Version Code: 30190190

---

OS Version: 4.14.116(10.0.0.221C10)
OS API Level: 29
Device: HWHRY-H
Manufacturer: HUAWEI
Model (and Product): HRY-LX1 (HRY-LX1RU)

---

it.niedermann.nextcloud.deck.exceptions.UploadAttachmentFailedException: Unknown URI scheme
	at it.niedermann.nextcloud.deck.ui.card.attachments.CardAttachmentsFragment$5.lambda$onError$1$it-niedermann-nextcloud-deck-ui-card-attachments-CardAttachmentsFragment$5(CardAttachmentsFragment.java:485)
	at it.niedermann.nextcloud.deck.ui.card.attachments.CardAttachmentsFragment$5$$ExternalSyntheticLambda1.run(Unknown Source:6)
	at android.os.Handler.handleCallback(Handler.java:888)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:213)
	at android.app.ActivityThread.main(ActivityThread.java:8178)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: Ошибка выполнения запроса HTTP. Код состояния: 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:929)
Caused by: java.lang.IllegalStateException: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>NGINX Server at domane. name Port 443</address>
</body></html>

	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.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:137)
	at android.os.Binder.execTransactInternal(Binder.java:1028)
	at android.os.Binder.execTransact(Binder.java:1001)

neerro avatar Apr 06 '22 18:04 neerro

Hello @neerro

I am pretty sure that this is a duplicate of #1175, though it would be helpful if you could provide more information about what exactly you are doing.

I did all necessary steps according Deck algorithm for uploading photo as attach. I belive there is no another capabilities to do it by another way.

  • Do you open a card in the Deck Android app, go to the attachments tab?
  • Do you pick the photo from the built in photo activity (1), from the preview (2) or from picking files (3)?

screenshot

  • Or do you share the image from another app (which one?) into the Deck Android app?

stefan-niedermann avatar Apr 06 '22 18:04 stefan-niedermann

Do you pick the photo from the built in photo activity (1), from the preview (2) or from picking files (3)?

From the preview. The second one.

neerro avatar Apr 12 '22 12:04 neerro

At the first look I thought the issue was caused by the Deck Android App due to a bit of a missleading error message (on our side).

Though there is this section in the error message

Forbidden

You don't have permission to access this resource.

Additionally, a 403 Forbidden

which shows us, that picking the image actually worked as it should, but while sending it to your Deck server, your server responded with HTTP status code 403: forbidden.

So, the question is, why does your server not allow an upload?

  • Tell us more about the board where you created the card and uploaded the image: Is it shared to you? Do you have edit permissions? Do you own it? Did you share it with other users?
  • Check your Nextcloud error log for an entry matching the date and time where you saw this error on your mobile device: Are there any hints why your Deck server app should deny write access from clients?

stefan-niedermann avatar Apr 15 '22 08:04 stefan-niedermann

Could it be that the attachment (photo) size was bigger than 2MB. I've noticed that when I add a big attachment in Dec web app, the app refuses and gives an error message. But the android app crashed and then failed to sync.

MitjaNemec avatar Apr 19 '22 10:04 MitjaNemec

Hi I also experience a crash when selecting an attachment, however the issue doesn't seem to be network related - rather an issue with the client.

Im using the gallery to pick the attachment, and the following happens a few seconds after:

Full Crash:

App Version: 1.23.3
App Version Code: 1023003
App Flavor: fdroid

Files App Version Code: 30250090 (PROD)

---

OS Version: 5.4.242-qgki-gafa23b20dc17(cd7b134956)
OS API Level: 33
Device: OnePlus9Pro
Manufacturer: OnePlus
Model (and Product): LE2123 (OnePlus9Pro)

---

java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity
	at com.bumptech.glide.manager.RequestManagerRetriever.assertNotDestroyed(RequestManagerRetriever.java:366)
	at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:154)
	at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:134)
	at com.bumptech.glide.Glide.with(Glide.java:540)
	at it.niedermann.nextcloud.deck.ui.card.attachments.picker.GalleryItemViewHolder.bind(GalleryItemViewHolder.java:30)
	at it.niedermann.nextcloud.deck.ui.card.attachments.picker.GalleryAdapter.lambda$onBindViewHolder$0$it-niedermann-nextcloud-deck-ui-card-attachments-picker-GalleryAdapter(GalleryAdapter.java:84)
	at it.niedermann.nextcloud.deck.ui.card.attachments.picker.GalleryAdapter$$ExternalSyntheticLambda0.run(Unknown Source:8)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7918)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Installed on lineage os.

Edit: I does sync succesfully to my nextcloud server, and can indeed see it on the web interface.

Sveske-Juice avatar Aug 04 '23 08:08 Sveske-Juice

@Sveske-Juice would you mind moving your stacktrace to a separate issue? It is unrelated to the original post but a valod bug that can and should be adressed. I assume it's quitr easy to fix compared to the original issue, so let's track it separately.

stefan-niedermann avatar Aug 04 '23 08:08 stefan-niedermann