Can't download files bigger than 1MB with android app

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 17.0.2
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.1): 7.2
Android version: 9
Nextcloud android app version : 3.9.2

The issue you are facing:
I can’t download almost all files stored in my nextcloud instance (both local and s3fs storages). It seems to work fine for very little files, but when it comes to some moderately big files (like 4MB document or 10MB mp3) downloads always fail on my android device. The same files can be downloaded successfully on android web browser, desktop browser and desktop sync client from the same instance.
When launching the downloading, the android notification displays half a second then let its place to a download failure notification

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upload any file bigger than 1MB
  2. Try to download it with the android app

The output of your Nextcloud log in Admin > Logging:

[index] Error: OCP\App\AppPathNotFoundException: Could not find path for spreed at <<closure>>

0. /var/www/html/nextcloud/core/Controller/SvgController.php line 99
   OC\App\AppManager->getAppPath("spreed")
1. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
   OC\Core\Controller\SvgController->getSvgFromApp("spreed", "app-dark", "000")
2. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
   OC\AppFramework\Http\Dispatcher->executeController(OC\Core\Controller\SvgController {}, "getSvgFromApp")
3. /var/www/html/nextcloud/lib/private/AppFramework/App.php line 126
   OC\AppFramework\Http\Dispatcher->dispatch(OC\Core\Controller\SvgController {}, "getSvgFromApp")
4. /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OC\\Core\\Controller\\SvgController", "getSvgFromApp", OC\AppFramework\ ... {}, {app: "spreed",f ... "})
5. <<closure>>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({app: "spreed",f ... "})
6. /var/www/html/nextcloud/lib/private/Route/Router.php line 297
   undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {app: "spreed",f ... "})
7. /var/www/html/nextcloud/lib/base.php line 997
   OC\Route\Router->match("/svg/spreed/app-dark")
8. /var/www/html/nextcloud/index.php line 42
   OC::handleRequest()

GET /nextcloud/index.php/svg/spreed/app-dark?color=000&v=1
from xxx.xxx.xxx.xxx at 2020-01-02T22:05:55+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'OMMITED',
  'passwordsalt' => 'OMMITED',
  'secret' => 'OMMITED',
  'trusted_domains' =>
  array (
    0 => 'OMMITED',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '17.0.2.1',
  'overwrite.cli.url' => 'OMMITED/nextcloud',
  'dbname' => 'OMMITED',
  'dbhost' => 'OMMITED',
  'dbport' => 'OMMITED',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'OMMITED',
  'dbpassword' => 'OMMITED',
  'installed' => true,
  'updater.secret' => 'OMMITED',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

xxx.xxx.xxx.xxx - USER [02/Jan/2020:22:12:41 +0000] "GET /nextcloud/remote.php/webdav/OMMITED.mp3 HTTP/1.1" 200 9162423 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.9.2"

Apache find the file so i assume there is no problem on its side.

Could you please help me diagnose this?

Thanks in advance!

Edit:
PHP Settings:

[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
disable_classes =
zend.enable_gc = On
expose_php = Off
max_execution_time = 30
max_input_time = 60
memory_limit = 512M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
error_log = syslog
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[...]
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=1
opcache.save_comments=1

Additionnal php values in nextcloud .htaccess

<IfModule mod_php7.c>
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  php_value upload_max_filesize 16G
  php_value post_max_size 16G
  php_value max_input_time 3600
  php_value max_execution_time 3600