owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.81k stars 3.05k forks source link

Photo downloads consistently fail #1457

Closed nathan-b closed 5 years ago

nathan-b commented 8 years ago

I use OC to store my photos organized in a folder hierarchy. The Android app syncs the filesystem data just fine -- I can see my photos, including thumbnails -- but when I go to view or download a photo, the "Downloading" progress bar pops up, sits for a few seconds, and then gives me a black screen with an exclamation mark and "Download failed". It also displays a download failed notification.

I've checked the server and it doesn't write an error message on the server side.

This seems to happen consistently. I have never successfully downloaded or viewed a photo using the app.

I found one forum post suggesting that I should reduce the size of my quota. I set it to 100GB, the recommended size by the post, but the problem still persists.

masensio commented 8 years ago

Hi @nathan-b,

thanks for your feedback and for using owncloud.

For solving your problem we need more information about it. Please report your issue with the template: Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Steps to reproduce

Environment data

Android version:

Device model:

Stock or customized system:

ownCloud app version:

ownCloud server version:

Logs

Web server error log

Insert your webserver log here ownCloud log (data/owncloud.log)

Insert your ownCloud log here

nathan-b commented 8 years ago

Expected behaviour

The file is downloaded onto my device.

Actual behaviour

The "Downloading" progress bar pops up, sits for a few seconds, and then gives me a black screen with an exclamation mark and "Download failed"

Steps to reproduce

Open the app, select a photo, attempt to view or download it

Environment data Android version: 6.0.1 Device model: LG Nexus 5 Stock or customized system: Stock ownCloud app version: 1.9.0 ownCloud server version: 8.2.2

Logs

Web server error log

owncloud.log.zip

As far as I can see the Android app doesn't write a log, or else I would include it too

tobiasKaminsky commented 8 years ago

Settings -> Apps -> Owncloud -> Permissions: Is storage allowed?

nathan-b commented 8 years ago

Yes, Storage and (for some reason) Contacts are both enabled.

tobiasKaminsky commented 8 years ago

Strange I bet that this is the reason. You can use the beta version (https://github.com/owncloud/android/tree/beta/apks) or via f-droid. There you can see the log file.

nathan-b commented 8 years ago

I'll install the beta version soon...

I noticed the following behavior; I don't know if this is related to the bug or not:

screenshot_20160316-132014

Note the percentage on the progress bar.

tobiasKaminsky commented 8 years ago

@nathan-b any update?

nathan-b commented 8 years ago

Ah, sorry...

I installed the beta version and tried to view a photo. I got different behavior but still no photo (endlessly spinning busy indicator). The app didn't write any logs.

asperon commented 8 years ago

I have the exact same problem (with the stable and the beta), let me know if i can assist in any way. Works fine on the web and when accessing owncloud via solid explorer

tobiasKaminsky commented 8 years ago

A logcat output would be very helpful

asperon commented 8 years ago

It looks like this, i removed some data, seems it fails to move the file after download, is this a permission issue?

05-28 20:13:06.152: D/FileDownloader(8558): Starting command with id 1 05-28 20:13:06.161: D/FileDownloader(8558): Account XXXXXXXXXXXXXX/owncloud exists 05-28 20:13:06.175: D/FileObserverService(8558): Received broadcast intent Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_ADDED flg=0x10 (has extras) } 05-28 20:13:06.176: D/FileObserverService(8558): No observer for path /storage/emulated/0/owncloud/XXXXXXXXXXXXXX%2Fowncloud/Photos/XXXXXXXXXXXXXX.jpg 05-28 20:13:06.183: D/PreviewImageActivity(8558): Download finished, but the fragment is offscreen 05-28 20:13:06.184: D/SimpleFactoryManager(8558): getClientFor(OwnCloudAccount ... : 05-28 20:13:06.184: D/OwnCloudClient #4(8558): Creating OwnCloudClient 05-28 20:13:06.185: V/SimpleFactoryManager(8558): new client {XXXXXXXXXXXXXX/owncloud, 129654667} 05-28 20:13:06.200: D/FileObserverService(8767): Received broadcast intent Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_ADDED flg=0x10 (has extras) } 05-28 20:13:06.218: D/OwnCloudClient #4(8558): REQUEST GET /owncloud/remote.php/webdav/Photos/XXXXXXXXXXXXXX.jpg 05-28 20:13:06.223: D/AdvancedSslSocketFactory(8558): Creating SSL Socket with remote XXXXXXXXXXXXXX:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@e2d415e 05-28 20:13:06.223: D/AdvancedSslSocketFactory(8558): ... with connection timeout 60000 and socket timeout 60000 05-28 20:13:06.230: D/FileObserverService(8767): No observer for path /storage/emulated/0/owncloud/XXXXXXXXXXXXXX%2Fowncloud/Photos/XXXXXXXXXXXXXX.jpg 05-28 20:13:06.306: I/ServerNameIndicator(8558): SSLSocket implementation: com.android.org.conscrypt.OpenSSLSocketImpl 05-28 20:13:06.307: I/ServerNameIndicator(8558): SNI done, hostname: XXXXXXXXXXXXXX 05-28 20:13:06.540: V/FileDisplayActivity(8558): onSaveInstanceState() start 05-28 20:13:06.541: D/FileDisplayActivity(8558): onSaveInstanceState(Bundle) starting 05-28 20:13:06.542: D/ExtendedListFragment(8558): onSaveInstanceState() 05-28 20:13:06.542: V/FileDisplayActivity(8558): onSaveInstanceState() end 05-28 20:13:06.543: V/FileDisplayActivity(8558): onStop() start 05-28 20:13:06.544: D/FileDisplayActivity(8558): onStop() ending 05-28 20:13:06.545: V/FileDisplayActivity(8558): onStop() end 05-28 20:13:09.644: D/ClClient(12324): Not sending keepalive. Current connection state=STOPPING 05-28 20:13:11.942: I/DownloadRemoteFileOperation(8558): Download of /Photos/XXXXXXXXXXXXXX.jpg to /storage/emulated/0/owncloud/tmp/XXXXXXXXXXXXXX%2Fowncloud/Photos/XXXXXXXXXXXXXX.jpg: Operation finished with HTTP status code 200 (success) 05-28 20:13:11.960: I/DownloadFileOperation(8558): Download of /Photos/XXXXXXXXXXXXXX.jpg to /storage/emulated/0/owncloud/XXXXXXXXXXXXXX%2Fowncloud/Photos/XXXXXXXXXXXXXX.jpg: Error while moving file to final directory 05-28 20:13:11.983: D/FileDownloader(8558): Stopping after command with id 1

dleonard0 commented 8 years ago

I'm seeing the same problem.

On my android device I can use the app (version 2.1.0) to browse to the shared folder, long press then select Details from the menu. I then see the thumbnail of the picture I want, but touching the download button results in a "Download failed" notification. This method was a reliable way of reproducing the problem while I went about capturing logs and traffic.

From logcat (sanitized):

D/ActivityThread(18418): SVC-Calling onStartCommand: com.owncloud.android.services.OperationsService@27f1560b, flags=0, startId=1
V/SimpleFactoryManager(18418):     new client {me@host/owncloud, 561720552}
I/SynchronizeFileOperation(18418): Synchronizing me@host/owncloud, file /shared/XXXXX.mp4: Operation finished with HTTP status code -1 (success)
D/ActivityThread(18418): SVC-Calling onStartCommand: com.owncloud.android.files.services.FileDownloader@266b7854, flags=0, startId=1
D/FileDownloader(18418): Account me@host/owncloud exists
V/SimpleFactoryManager(18418):     new client {me@host/owncloud, 1049666098}
D/OwnCloudClient #9(18418): REQUEST GET /owncloud/remote.php/webdav/shared/XXXXX.mp4
D/DotMatrix( 1343): [NotificationService] onNotificationPosted, pkgName: com.owncloud.android, id: 2131230828, tag: null, isClearable: false, isForDotMatrix: false
D/FileObserverService(18418): Received broadcast intent Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_ADDED flg=0x10 (has extras) }
D/FileObserverService(18418): No observer for path /storage/emulated/0/owncloud/me@host%2Fowncloud/shared/XXXXX.mp4
I/RemoteViews( 1209): apply : com.owncloud.android 0 10 26 42
D/DotMatrix( 1343): [NotificationService] onNotificationPosted, pkgName: com.owncloud.android, id: 2131230828, tag: null, isClearable: false, isForDotMatrix: false
I/RemoteViews( 1209): reapply : com.owncloud.android 4 42
D/ProgressBar(18418): setProgress, old = 0, new = 2147483647, max = 100, backtrace = android.widget.ProgressBar.setProgress:1332 com.owncloud.android.ui.controller.TransferProgressController$1.run:163 android.os.Handler.handleCallback:810 android.os.Handler.dispatchMessage:99 android.os.Looper.loop:209 , this = android.widget.ProgressBar{1764296e V.ED.... ........ 0,16-1168,80 #7f1000ad app:id/fdProgressBar}
I/DownloadRemoteFileOperation(18418): Download of /shared/XXXXX.mp4 to /storage/emulated/0/owncloud/tmp/me@host%2Fowncloud/shared/XXXXX.mp4: Operation finished with HTTP status code 200 (success)
I/DownloadFileOperation(18418): Download of /shared/XXXXX.mp4 to /storage/emulated/0/owncloud/me@host%2Fowncloud/shared/XXXXX.mp4: Error while moving file to final directory
D/DotMatrix( 1343): [NotificationService] onNotificationRemoved, pkgName: com.owncloud.android, id: 2131230828, tag: null, isClearable: false, isForDotMatrix: false
V/ActivityManager(  833): Broadcast sticky: Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_FINISH flg=0x10 (has extras) } ordered=false userid=0 callerApp=ProcessRecord{fdd134d 18418:com.owncloud.android/u0a151}
D/FileObserverService(18418): Received broadcast intent Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_FINISH flg=0x10 (has extras) }
D/FileObserverService(18418): No observer for path /storage/emulated/0/owncloud/me@host%2Fowncloud/shared/XXXXX.mp4
D/DotMatrix( 1343): [NotificationService] onNotificationPosted, pkgName: com.owncloud.android, id: 2131230826, tag: null, isClearable: true, isForDotMatrix: false
I/RemoteViews( 1209): apply : com.owncloud.android 0 10 2 38
I/BufferQueueProducer(  323): [com.owncloud.android/com.owncloud.android.ui.activity.FileDisplayActivity](this:0x559d3212f0,id:264,api:1,p:18418,c:323) queueBuffer: fps=0.15 dur=103046.09 max=102177.93 min=2.83

When I use adb shell to examine the client's filesystem during download I could watched the downloading file under tmp/me@host%2Fowncloud appear and grow, until completion when it abruptly disappeared.

> adb -d shell
shell@phone:/ $ cd /storage/emulated/0/owncloud/tmp/me@host%2Fowncloud/shared
shell@phone:/storage/emulated/0/owncloud/tmp/me@host%2Fowncloud/shared $ ls -la
-rw-rw---- root     sdcard_r  4778466 2016-08-28 19:31 XXXX.mp4
shell@phone:/storage/emulated/0/owncloud/tmp/me@host%2Fowncloud/shared $ ls -la
-rw-rw---- root     sdcard_r 13306196 2016-08-28 19:31 XXXX.mp4

After failure, the expected file was absent from both /storage/emulated/0/owncloud/tmp/me@host%2Fowncloud/shared and /storage/emulated/0/owncloud/me@host%2Fowncloud/shared

davivel commented 8 years ago

@nathan-b , @asperon , @dleonard0 ; it's difficult to know exactly what's happening, for some reason the file is not correctly moved from the temporary folder to the final location.

I will add some more logs there to try to find out what happens. They will be available with the next release of the app, probably this week.

bobzrkr commented 7 years ago

I am having this issue. below are the relevant logcat lines. Let me know if you need anything else.

owncloud server version: ownCloud 9.0.3 (OpenBSD ports) owncloud android version: 2.1.2

09-29 17:19:27.625 12363 14680 D OwnCloudClient #17: REQUEST GET /owncloud/remote.php/webdav/IMG_20160904_155101.jpg
09-29 17:19:27.720 12363 19473 I RefreshFolderOperation: Checked bobzrkr@owncloud.bobzrkr.org/owncloud/ : not changed
09-29 17:19:27.743 12363 19473 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
09-29 17:19:27.748 12363 19473 D OwnCloudClient #13: REQUEST GET /owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares
09-29 17:19:27.750 12363 19473 D AdvancedSslSocketFactory: Creating SSL Socket with remote owncloud.bobzrkr.org:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@ddd9281
09-29 17:19:27.753 12363 19473 I ServerNameIndicator: SNI done, hostname: owncloud.bobzrkr.org
09-29 17:19:27.964   859  4667 I WindowManager: Destroying surface Surface(name=com.owncloud.android/com.owncloud.android.ui.activity.FileDisplayActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.WindowManagerService.tryStartExitingAnimation:3017 com.android.server.wm.WindowManagerService.relayoutWindow:2897 com.android.server.wm.Session.relayout:215 android.view.IWindowSession$Stub.onTransact:286 com.android.server.wm.Session.onTransact:136 
09-29 17:19:28.282 12363 19473 D FileContentProvider: applying batch in provider com.owncloud.android.providers.FileContentProvider@580c767 (temporary: false)
09-29 17:19:28.306 12363 19473 D FileContentProvider: applied batch in provider com.owncloud.android.providers.FileContentProvider@580c767
09-29 17:19:28.306 12363 19473 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
09-29 17:19:31.311 12363 14680 I DownloadRemoteFileOperation: Download of /IMG_20160904_155101.jpg to /storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg: Operation finished with HTTP status code 200 (success)
09-29 17:19:31.321 12363 14680 D DownloadFileOperation: Save path: /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg
09-29 17:19:31.322 12363 14680 D DownloadFileOperation: Creation of parent folder /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud succeeded: false
09-29 17:19:31.322 12363 14680 D DownloadFileOperation: Parent folder /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud exists: true
09-29 17:19:31.322 12363 14680 D DownloadFileOperation: Parent folder /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud is directory: true
09-29 17:19:31.324 12363 14680 D DownloadFileOperation: New file /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg exists: false
09-29 17:19:31.324 12363 14680 D DownloadFileOperation: New file /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg is directory: false
09-29 17:19:31.330 12363 14680 I DownloadFileOperation: Download of /IMG_20160904_155101.jpg to /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg: Error while moving file to final directory
09-29 17:19:31.354 12363 12363 D FileObserverService: Received broadcast intent Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_FINISH flg=0x10 (has extras) }
09-29 17:19:31.354 12363 12363 D FileObserverService: No observer for path /storage/emulated/0/owncloud/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg 
bobzrkr commented 7 years ago

Could issue be related to this? https://developer.android.com/about/versions/nougat/android-7.0-changes.html#perm

davivel commented 7 years ago

Could issue be related to this? https://developer.android.com/about/versions/nougat/android-7.0-changes.html#perm

Maybe for you, @bobzrkr , but not for the other reporters. We did tests with Android 7 about it, anyway, and didn't reproduce the error.

According to your logs, the parent folder is in place but the move operation is just failing, what I just can't understand.

Could you use a file explorer to check if the file is in its original location? : /storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg

bobzrkr commented 7 years ago

The file is not there. When I try to download, it shows up for a few seconds, then disappears.

below, each 'ls' command is about a second apart.

bullhead:/storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud $ ls -lh
total 4.0K drwxrwx--x 2 root sdcard_rw 4.0K 2016-10-19 13:34 Photos bullhead:/storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud $ ls
IMG_20160904_155101.jpg Photos bullhead:/storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud $ ls
IMG_20160904_155101.jpg Photos bullhead:/storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud $ ls -lh
total 340K -rw-rw---- 1 root sdcard_rw 335K 2016-10-19 13:35 IMG_20160904_155101.jpg drwxrwx--x 2 root sdcard_rw 4.0K 2016-10-19 13:34 Photos bullhead:/storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud $ ls -lh
total 4.0K drwxrwx--x 2 root sdcard_rw 4.0K 2016-10-19 13:34 Photos bullhead:/storage/emulated/0/owncloud/tmp/bobzrkr@owncloud.bobzrkr.org%2Fowncloud $

davivel commented 7 years ago

The file is not there.

Very important clue.

Could you try with a test APK if I push it to the repo?

davivel commented 7 years ago

@bobzrkr, please, try with this APK: https://github.com/owncloud/android/raw/1457_bug_in_downloads/android_2.1.2-debug.apk .

Will be installed as a separate app called 'ownCloudTest'. Try to download a picture with it. Includes more log messages and a candidate fix.

bobzrkr commented 7 years ago

@davivel Thank you for the test app.

I installed it and attempted a download. It failed again. The logs were a bit log so I've attached them as a gzip. But below it what looks interesting. There is a line that says "Deleting temporary file". this happens before the file move is attampted. owncloud-debug.log.gz

10-20 14:51:52.254 28693 28716 D DownloadRemoteFileOperation: -- read 1336 bytes
10-20 14:51:52.255 28693 28716 D DownloadRemoteFileOperation: -- transferred 2346962 bytes
10-20 14:51:52.256 28693 28716 D DownloadRemoteFileOperation: -- transferred 2346962, expecting 0
10-20 14:51:52.258 28693 28716 D DownloadRemoteFileOperation: Deleting temporary file
10-20 14:51:52.270 28693 28716 V DownloadRemoteFileOperation: -- header: Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
10-20 14:51:52.270 28693 28716 V DownloadRemoteFileOperation: -- header: Connection: keep-alive
10-20 14:51:52.270 28693 28716 V DownloadRemoteFileOperation: -- header: Content-Disposition: attachment; filename*=UTF-8''IMG_20160904_155101.jpg; filename="IMG_20160904_155101.jpg"
10-20 14:51:52.270 28693 28716 V DownloadRemoteFileOperation: -- header: Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
......
10-20 14:51:52.285 28693 28716 D DownloadFileOperation: Save path: /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg
10-20 14:51:52.285 28693 28716 D DownloadFileOperation: Creation of parent folder /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud succeeded: false
10-20 14:51:52.285 28693 28716 D DownloadFileOperation: Parent folder /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud exists: true
10-20 14:51:52.285 28693 28716 D DownloadFileOperation: Parent folder /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud is directory: true
10-20 14:51:52.286 28693 28716 D DownloadFileOperation: New file /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg exists: false
10-20 14:51:52.287 28693 28716 D DownloadFileOperation: New file /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg is directory: false
10-20 14:51:52.290 28693 28716 I DownloadFileOperation: Download of /IMG_20160904_155101.jpg to /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg: Error while moving file to final directory
10-20 14:51:52.310 28693 28716 D FileDownloader: Stopping after command with id 4
10-20 14:51:52.311 28693 28693 D FileObserverService: Received broadcast intent Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_FINISH flg=0x10 (has extras) }
10-20 14:51:52.311 30596 30596 D FileObserverService: Received broadcast intent Intent { act=com.owncloud.android.files.services.FileDownloaderDOWNLOAD_FINISH flg=0x10 (has extras) }
10-20 14:51:52.311 28693 28693 D FileObserverService: No observer for path /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg
10-20 14:51:52.313 30596 30596 D FileObserverService: No observer for path /storage/emulated/0/owncloudTest/bobzrkr@owncloud.bobzrkr.org%2Fowncloud/IMG_20160904_155101.jpg
davivel commented 7 years ago

OK, not exactly what I thought, but makes sense. The response includes:

Transfer-Encoding: chunked.

This is not supported by the OC app right now. Indeed, the bug is known and has been rescheduled for different releases in the past. And it's already scheduled for this release: https://github.com/owncloud/android/issues/1128 .

If you can disable transfer encoding in your server for the moment, it should work fine.

I will keep this other issue open, just in case there is an extra problem with the "content-length" header for the other reporters.

bobzrkr commented 7 years ago

Thanks for the update, @davivel My server is running OpenBSD httpd w/ fastcgi... not sure if I can disable chunking but I will try.

davivel commented 7 years ago

Hi, @bobzrkr . Can you tell us something else about your server configuration? Do you use external storage or encryption?

Alternatively, would you create a test account in your server for us and send the credentials to apps@owncloud.com ? That would help to speed the fix a lot. If you can do it, please, include in the subject of the mail "Android issue #1457".

Thank you very much.

bobzrkr commented 7 years ago

Hello @davivel

I'm running owncloud on a OpenBSD 6.0 server, in a VM. The webserver is OpenBSD httpd using FastCGI and php-fpm No external storage. No server side encryption. Site is configured to use https using letsencrypt certificates.

login info sent in an e-mail with subject line: Fwd: Re: [owncloud/android] Photo downloads consistently fail (#1457)

Let me know if you need anything else. Thanks for the help.

davivel commented 7 years ago

@bobzrkr , there is something wrong in the server configuration. Every chunk in the response should be preceded by its length, but that's not the case, file data come directly in the stream without any previous size.

Could you share some details about your configuration, such as the contents of /etc/httpd.conf ?

Did you follow any online guide to setup ownCloud in OpenBSD?

dleonard0 commented 7 years ago

OpenBSD httpd is common to my problematic setup, too. The server setup instructions followed are at https://github.com/reyk/httpd/wiki/Running-ownCloud-with-httpd-on-OpenBSD

httpd assumes that a HTTP/1.1 client will understand chunking. Search for 'chunked' in http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/httpd/server_fcgi.c for the logic.

There doesn't seem to be an option to turn chunking off in httpd. So it looks like OpenBSD httpd users are actually experiencing #1128.

bobzrkr commented 7 years ago

Sorry for the delay in response.

My server is running OpenBSD 6.0. The webserver is OpenBSD httpd using fastcgi and php-fpm.

I follow the same guide as @dleonard0 https://github.com/reyk/httpd/wiki/Running-ownCloud-with-httpd-on-OpenBSD backend DB is sqlite.

I did some googling and could not find how to disable chunking. And I wasn't sure if it should be disapled in httpd, php.

I've attached a tarball with the configs. Please let me know if you need anything else.

owncloudconfigs.tar.gz

michaelstingl commented 5 years ago

duplicate for https://github.com/owncloud/android/issues/1128