Download of files from backend not starting
Steps to reproduce
- Select multiple files
- Click downlaod
- Empty page
Expected behaviour
I wanted to download a zip archive of multiple photos in a folder.
Actual behaviour
I get redirected to the archive URL but the page stays blank.
Server configuration
Operating system: CentOS release 6.8 (Final)
Web server: Apache/2.2.15 (CentOS)
Database: mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
PHP version: PHP 7.0.11
Nextcloud version: Nextcloud 9.0.53 (stable)
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install
Where did you install Nextcloud from:
Signing status:
Signing status
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
List of activated apps:
App list
$ php occ app:list
Enabled:
- activity: 2.2.1
- admin_audit: 1.0.0
- calendar: 1.3.3
- dav: 0.1.6
- federatedfilesharing: 0.1.0
- federation: 0.0.4
- files: 1.4.4
- files_pdfviewer: 0.8.1
- files_sharing: 0.9.1
- files_texteditor: 2.1
- files_trashbin: 0.8.0
- files_versions: 1.2.0
- files_videoplayer: 0.9.8
- firstrunwizard: 1.1
- galleryplus: 15.1.1
- notifications: 0.2.3
- ownbackup: 0.3.8
- password_policy: 1.0.0
- provisioning_api: 0.4.1
- systemtags: 0.2
- templateeditor: 0.1
- theming: 0.1.0
- updatenotification: 0.1.0
Disabled:
- comments
- contacts
- encryption
- external
- files_external
- gallery
- music
- user_external
- user_ldap
- user_saml
The content of config/config.php:
Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
or
Insert your config.php content here
(Without the database password, passwordsalt and secret)
Are you using external storage, if yes which one: local
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Logs
Web server error log
Web server error log
Insert your webserver log here
Nextcloud log
Exception: {"Exception":"Exception","Message":"Unable to send file Indien.tar. HTML Headers have already been sent from \/var\/www\/virtual\/shntrm\/html\/nextcloud\/3rdparty\/deepdiver1975\/tarstreamer\/src\/TarStreamer.php in line 30","Code":0,"Trace":"#0 \/var\/www\/virtual\/shntrm\/html\/nextcloud\/lib\/private\/streamer.php(54): ownCloud\\TarStreamer\\TarStreamer->sendHeaders('Indien.tar')\n#1 \/var\/www\/virtual\/shntrm\/html\/nextcloud\/lib\/private\/files.php(146): OC\\Streamer->sendHeaders('Indien')\n#2 \/var\/www\/virtual\/shntrm\/html\/nextcloud\/apps\/files\/ajax\/download.php(62): OC_Files::get('\/Photos\/Scans', 'Indien', Array)\n#3 \/var\/www\/virtual\/shntrm\/html\/nextcloud\/lib\/private\/route\/route.php(154) : runtime-created function(1): require_once('\/var\/www\/virtua...')\n#4 [internal function]: __lambda_func()\n#5 \/var\/www\/virtual\/shntrm\/html\/nextcloud\/lib\/private\/route\/router.php(276): call_user_func('\\x00lambda_286', Array)\n#6 \/var\/www\/virtual\/shntrm\/html\/nextcloud\/lib\/base.php(967): OC\\Route\\Router->match('\/apps\/files\/aja...')\n#7 \/var\/www\/virtual\/shntrm\/html\/nextcloud\/index.php(39): OC::handleRequest()\n#8 {main}","File":"\/var\/www\/virtual\/shntrm\/html\/nextcloud\/3rdparty\/deepdiver1975\/tarstreamer\/src\/TarStreamer.php","Line":46}
Browser log
JS Console:
Content Security Policy: Directive ‘frame-src’ has been deprecated. Please use directive ‘child-src’ instead.(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://shntrm.rigel.uberspace.de 'unsafe-eval'”).download.php:1
@heyarne What browser on what OS are you using?
Is there any chance that you send me a link, where I can test this myself? (see email on my GIthub profile)
I'm using the newest Firefox (as of now 49.0.1) on Mac OSX 10.11.6. I updated to Nextcloud 10.0.1 and the problem persists.
I'm using the newest Firefox (as of now 49.0.1) on Mac OSX 10.11.6. I updated to Nextcloud 10.0.1 and the problem persists.
I just tested with Firefox and it works here on OS X.
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://shntrm.rigel.uberspace.de 'unsafe-eval'”).download.php:1
That looks weird. cc @LukasReschke What does that mean? Some output in download.php?
That looks weird. cc @LukasReschke What does that mean? Some output in download.php?
It's a Firefox bug. Ignore it ;-)
To provide some additional information: Download of single files is working. The bug seems to only occur when creating archives and trying to download them.
Request headers:
Host: XXXXXX
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Cookie: XXXXXX
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
Response headers:
Cache-Control: no-store, no-cache, must-revalidate
Connection: close
Content-Encoding: gzip
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 *
Content-Type: text/html; charset=UTF-8
Date: Mon, 10 Oct 2016 10:41:27 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: Apache/2.2.15 (CentOS)
Set-Cookie: ocDownloadStarted=DONTKNOWMIGHTBESENSITIVE; expires=Mon, 10-Oct-2016 10:41:47 GMT; Max-Age=20; path=/
Strict-Transport-Security: max-age=15768000
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Frame-Options: Sameorigin
X-Permitted-Cross-Domain-Policies: none
X-Powered-By: PHP/7.0.11
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
x-download-options: noopen
In my firefox it looks like this:
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; ocwl3evqxb0w=plo3ut268eho435lput1g5t6i7; oc_sessionPassphrase=gLZtHuGYSI1iVYR0rbl57vXf%2BD4CPnJ6prVv8haK%2F2McHK0%2B9dd84SnbQdYagMKJ2e2R5vCsNEqjN6uJWnFAr0gQELuWD6oG7q0hTMuT8qAtYtYqb6gG%2FMN52KEC4WbE
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Response:
Accept-Ranges: bytes
Cache-Control: public, must-revalidate
Connection: Keep-Alive, Keep-Alive
Content-Disposition: attachment; filename*=UTF-8''test.tar; filename="test.tar"
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 *
Content-Transfer-Encoding: binary
Content-Type: application/x-tar
Date: Mon, 10 Oct 2016 10:53:38 GMT
Expires: 0
Keep-Alive: timeout=5, max=100
Last-Modified: Mon, 10 Oct 2016 10:53:38 GMT
Pragma: public
Server: Apache/2.4.23 (Unix) PHP/5.6.25
Transfer-Encoding: chunked
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Powered-By: PHP/5.6.25
X-Robots-Tag: none
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
The content type is different and content-disposition is also missing.
@heyarne Could you check, that there are no empty lines in your config.php before the opening <?php element? Also the signing status would be very helpful:
Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here.
There are no empty lines before the opening <?php in config/config.php. The output of …/index.php/settings/integrity/failed:
No errors have been found.
Is this still the case with Nextcloud 11? I couldn't see any other problems on your side from the provided information. I will close this ticket and happy to reopen, if this is still the case.
Hi there, one year later, exactly the same problem.
I tried the folowing: Update from NC 13.0.0 to 13.0.1 Installed a fresh version of NC (after testing I changed to daily updates and installed Build:2018-04-10T23:01:32+00:00 656df69cf04b2becb72b003e0a8654a93bd38777 ). Not changed anything inside files.
Download of min. 2 files - Firefox, Vivaldi, Maxthon browser = white page / chrome browser = error "Can't read file" page
Here the message on protocoll:
Exception: Unable to send file download.tar. HTML Headers have already been sent from /var/www/.../htdocs/.../3rdparty/deepdiver1975/tarstreamer/src/TarStreamer.php in line 30 /var/www/.../htdocs/.../lib/private/Streamer.php - line 55: ownCloud\TarStreamer\TarStreamer->sendHeaders('download.tar') /var/www/.../htdocs/.../lib/private/legacy/files.php - line 150: OC\Streamer->sendHeaders('download') /var/www/.../htdocs/.../apps/files/ajax/download.php - line 64: OC_Files get('/', Array, Array) /var/www/.../htdocs/.../lib/private/Route/Route.php - line 155: require_once('/var/www/cloudy...') [internal function] OC\Route\Route->OC\Route{closure}(*** sensitive parameters replaced ***) /var/www/.../htdocs/.../lib/private/Route/Router.php - line 297: call_user_func(Object(Closure), Array) /var/www/.../htdocs/.../lib/base.php - line 999: OC\Route\Router->match('/apps/files/aja...') /var/www/.../htdocs/.../index.php - line 37: OC handleRequest() {main}
No error in server log.
More Info:
Server configuration
Operating system: Linux v1hgb 4.13.13-6-pve #1 SMP PVE 4.13.13-41 (Wed, 21 Feb 2018 10:07:54 +0100) x86_64 GNU/Linux
Web server: Server version: Apache/2.4.10 (Debian) Server built: Sep 20 2017 04:37:43
Database: mySQL 5.7.8
PHP version: 7.2.3 (also tested on 7.0.26
Client configuration
Browser: firefox latest, chrome latest, vivaldi latest, maxthon latest
Operating system: Mac OS 10.13.4