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

Error due photo attaching to the card #1245

Open
neerro opened this issue Apr 6, 2022 · 6 comments
Open

Error due photo attaching to the card #1245

neerro opened this issue Apr 6, 2022 · 6 comments

Comments

@neerro
Copy link

neerro commented Apr 6, 2022

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)

@stefan-niedermann
Copy link
Owner

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?

@neerro
Copy link
Author

neerro commented Apr 12, 2022

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.

@stefan-niedermann
Copy link
Owner

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?

@MitjaNemec
Copy link

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.

@Sveske-Juice

This comment was marked as off-topic.

@stefan-niedermann

This comment was marked as off-topic.

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

4 participants