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

OC 8.2.2 iOS/Android App upload fails #22426

Closed
deejaymodish opened this issue Feb 16, 2016 · 18 comments
Closed

OC 8.2.2 iOS/Android App upload fails #22426

deejaymodish opened this issue Feb 16, 2016 · 18 comments

Comments

@deejaymodish
Copy link

Updated OC to 8.2.2 recently, upon doing so, it seems that uploading from both the iOS and Android apps no longer work. If I try to upload from either app, I get an error from Android that says cannot upload or from iOS Waiting for Server Connection. The error logs from the gui seem to indicate that it is WebDAV issue, but, I can sync files using a WebDAV sync app.

Debug webdav Exception: {"Message":"HTTP/1.1 401 No basic authentication headers were found","Exception":"Sabre\DAV\Exception\NotAuthenticated","Code":0,"Trace":"#0 /var/www/owncloud/lib/private/connector/sabre/auth.php(154): Sabre\DAV\Auth\Backend\AbstractBasic->authenticate(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#1 /var/www/owncloud/lib/private/connector/sabre/auth.php(127): OC\Connector\Sabre\Auth->auth(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php(118): OC\Connector\Sabre\Auth->authenticate(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#3 [internal function]: Sabre\DAV\Auth\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#4 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(456): Sabre\Event\EventEmitter->emit('beforeMethod', Array)\n#6 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#7 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#8 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#9 {main}","File":"/var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","Line":70} 2016-02-16T00:48:43+00:00

Fatal webdav Exception: {"Message":"HTTP/1.1 400 expected filesize 91163114 got 13172736","Exception":"Sabre\DAV\Exception\BadRequest","Code":0,"Trace":"#0 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(1087): OC\Connector\Sabre\File->put(Resource id #20)\n#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(501): Sabre\DAV\Server->updateFile('iOS/IMG_6611.MO...', Resource id #20, NULL)\n#2 [internal function]: Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#3 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:PUT', Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#6 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#7 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#8 {main}","File":"/var/www/owncloud/lib/private/connector/sabre/file.php","Line":139} 2016-02-16T00:48:43+00:00

Debug webdav Exception: {"Message":"HTTP/1.1 401 No basic authentication headers were found","Exception":"Sabre\DAV\Exception\NotAuthenticated","Code":0,"Trace":"#0 /var/www/owncloud/lib/private/connector/sabre/auth.php(154): Sabre\DAV\Auth\Backend\AbstractBasic->authenticate(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#1 /var/www/owncloud/lib/private/connector/sabre/auth.php(127): OC\Connector\Sabre\Auth->auth(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php(118): OC\Connector\Sabre\Auth->authenticate(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#3 [internal function]: Sabre\DAV\Auth\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#4 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(456): Sabre\Event\EventEmitter->emit('beforeMethod', Array)\n#6 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#7 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#8 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#9 {main}","File":"/var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","Line":70} 2016-02-16T00:45:48+00:00

Fatal webdav Exception: {"Message":"HTTP/1.1 400 expected filesize 91163114 got 14090240","Exception":"Sabre\DAV\Exception\BadRequest","Code":0,"Trace":"#0 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(1087): OC\Connector\Sabre\File->put(Resource id #20)\n#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(501): Sabre\DAV\Server->updateFile('iOS/IMG_6611.MO...', Resource id #20, NULL)\n#2 [internal function]: Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#3 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:PUT', Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#6 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#7 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#8 {main}","File":"/var/www/owncloud/lib/private/connector/sabre/file.php","Line":139} 2016-02-15T21:58:15+00:00

Debug webdav Exception: {"Message":"HTTP/1.1 401 No basic authentication headers were found","Exception":"Sabre\DAV\Exception\NotAuthenticated","Code":0,"Trace":"#0 /var/www/owncloud/lib/private/connector/sabre/auth.php(154): Sabre\DAV\Auth\Backend\AbstractBasic->authenticate(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#1 /var/www/owncloud/lib/private/connector/sabre/auth.php(127): OC\Connector\Sabre\Auth->auth(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php(118): OC\Connector\Sabre\Auth->authenticate(Object(OC\Connector\Sabre\Server), 'ownCloud')\n#3 [internal function]: Sabre\DAV\Auth\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#4 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(456): Sabre\Event\EventEmitter->emit('beforeMethod', Array)\n#6 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#7 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#8 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#9 {main}","File":"/var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","Line":70} 2016-02-15T21:55:20+00:00
Error PHP Array to string conversion at /var/www/owncloud/lib/private/template/functions.php#36

Version: 8.2.2

SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1 RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION # Add security and privacy related headers Header set X-Content-Type-Options "nosniff" Header set X-XSS-Protection "1; mode=block" Header set X-Robots-Tag "none" Header set X-Frame-Options "SAMEORIGIN" SetEnv modHeadersAvailable true # Add cache control for CSS and JS files

<FilesMatch ".(css|js)$">
Header set Cache-Control "max-age=7200, public"



php_value upload_max_filesize 10G
php_value post_max_size 10G
php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value always_populate_raw_post_data -1
php_value default_charset 'UTF-8'
php_value output_buffering 0

SetEnv htaccessWorking true



RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R=301,L]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R=301,L]
RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L]
RewriteRule ^remote/(.) remote.php [QSA,L]
RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.
- [R=404,L]
RewriteRule ^(.|autotest|occ|issue|indie|db_|console).* - [R=404,L]


AddType image/svg+xml svg svgz
AddEncoding gzip svgz


DirectoryIndex index.php index.html

AddDefaultCharset utf-8
Options -Indexes

ModPagespeed Off

/var/www/owncloud#
Enabled:

  • files: 1.2.0
  • files_pdfviewer: 0.7
  • files_videoviewer: 0.1.3
  • galleryplus: 14.3.0
  • notifications: 0.1.0
  • updater: 0.6
    Disabled:
  • activity
  • encryption
  • external
  • files_external
  • files_sharing
  • files_texteditor
  • files_trashbin
  • files_versions
  • firstrunwizard
  • gallery
  • provisioning_api
  • templateeditor
  • user_external
  • user_ldap

Any ideas?

@deejaymodish deejaymodish changed the title OC iOS/Android App upload fails OC 8.2.2 iOS/Android App upload fails Feb 16, 2016
@MorrisJobke
Copy link
Contributor

@PVince81 Another file size mismatch ref #9832

@deejaymodish
Copy link
Author

Looked at the referenced case and made some changes to php upload limit. And now I have a new error:

Debug webdav Exception: {"Message":"HTTP/1.1 404 File with name Photo-2016-02-12-18-07-44_1965.JPG could not be located","Exception":"Sabre\DAV\Exception\NotFound","Code":0,"Trace":"#0 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(920): OC\Connector\Sabre\ObjectTree->getNodeForPath('Photo-2016-02-1...')\n#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(327): Sabre\DAV\Server->getPropertiesForPath('Photo-2016-02-1...', Array, 0)\n#2 [internal function]: Sabre\DAV\CorePlugin->httpPropfind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#3 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:PROPFIND', Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#6 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#7 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#8 {main}","File":"/var/www/owncloud/lib/private/connector/sabre/objecttree.php","Line":159} 2016-02-16T14:44:19+00:00

Debug webdav Exception: {"Message":"HTTP/1.1 404 File with name Photo-2016-02-12-18-07-44_1965.JPG could not be located","Exception":"Sabre\DAV\Exception\NotFound","Code":0,"Trace":"#0 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(920): OC\Connector\Sabre\ObjectTree->getNodeForPath('Photo-2016-02-1...')\n#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(327): Sabre\DAV\Server->getPropertiesForPath('Photo-2016-02-1...', Array, 0)\n#2 [internal function]: Sabre\DAV\CorePlugin->httpPropfind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#3 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:PROPFIND', Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#6 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#7 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#8 {main}","File":"/var/www/owncloud/lib/private/connector/sabre/objecttree.php","Line":159}

@davivel
Copy link

davivel commented Feb 16, 2016

Any details about your server configuration, please?

@deejaymodish
Copy link
Author

Ubuntu 14.04
Apache 2.4
OwnCloud 2.2

Not sure what other details you'd need, but, I can provide most of what you are looking at.

Thanks!

@davivel
Copy link

davivel commented Feb 16, 2016

Sorry, ownCloud 2.2?

The uploads still don't get to the server and have the same error notification in Android, right?

@deejaymodish
Copy link
Author

Typo. Sorry. OwnCloud 8.2.2

Yes, both Android and iOS error when trying to upload.

@davivel
Copy link

davivel commented Feb 16, 2016

Typo. Sorry. OwnCloud 8.2.2

Oh, sorry, I should have noticed...

Did you test the desktop client?

@deejaymodish
Copy link
Author

Do you mean a desktop sync client? No, I do not. I use the web interface for uploads and accessing the files.

@davivel
Copy link

davivel commented Feb 16, 2016

Yes, that a meant.

OK, thinking in Android, the problem now seems that the composition of the file in the server after all the chunks were sent is taking "too long". The Android app should be more resilient for this case, since there is information enough in the response of the last chunk to handle this and do not fail in the app. If I'm not wrong, desktop sync client already takes this into account, that's why I asked about it.

BUT, if that was the only problem then you would see the files uploaded in the web interface, sooner or later. If that's not the case, then there's something else in the server side preventing that the composition of the file from the chunks finishes.

Can't you see any other error or warning in the logs? Maybe increasing the log verbosity?

The problem appears no matter where is the target folder of the upload, or maybe just in some folders? Maybe in external storage?

The problem appears also if you disable encryption?

@davivel
Copy link

davivel commented Feb 16, 2016

I forgot: how did you perform the server upgrade: manual installation, packages, upgrader app?

@davivel
Copy link

davivel commented Feb 16, 2016

Could you check to upload a file smaller than 1MB from the Android app and see if there is any difference?

@deejaymodish
Copy link
Author

Yes, the problem happens if I upload to the root of the storage or if I upload to a folder. The problem still happens without encryption. Trying to upload a file smaller than 1MB didn't work. And I updated manually, disabled apps, put OC in maintenance, scanned all the files after upgrade, then reenabled apps and took OC out of maintenance.

The logs I've provided are from the web interface's Admin section. I'll check the server side and upload log entries from there in a bit.

Thanks for the help!

@davivel
Copy link

davivel commented Feb 16, 2016

@deejaymodish , thank you for the info.

You said you made some configuration changes in your server. Anything similar to https://forum.owncloud.org/viewtopic.php?f=17&t=30646 ?

@deejaymodish
Copy link
Author

@davivel I only changed php upload limits. I already had .htaccess limit changed to upload large files from web interface, but, didn't change the /etc/php5/apache2/php.ini side.

This is my virutalhost file:

 <IfModule mod_alias.c>
Alias /owncloud /var/www/owncloud
</IfModule>
<Directory “/var/www/owncloud”>
SSLRenegBufferSize 10486000
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

 <Directory
/var/www/owncloud>
        <Limit GET POST OPTIONS PROPFIND PUT DELETE MKCOL MOVE>
                Order allow,deny
                Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS PROPFIND PUT DELETE MKCOL MOVE>
                Order deny,allow
                Deny from all
        </LimitExcept>
</Directory>

 <Directory
/var/www/owncloud>
        Order allow,deny
        Allow from all
        AllowOverride All
</Directory>

@deejaymodish
Copy link
Author

New one.

Debug webdav Exception: {"Message":"HTTP/1.1 404 File with name Photo-2016-02-12-18-07-44_1965.JPG could not be located","Exception":"Sabre\DAV\Exception\NotFound","Code":0,"Trace":"#0 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(920): OC\Connector\Sabre\ObjectTree->getNodeForPath('Photo-2016-02-1...')\n#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(327): Sabre\DAV\Server->getPropertiesForPath('Photo-2016-02-1...', Array, 0)\n#2 [internal function]: Sabre\DAV\CorePlugin->httpPropfind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#3 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:PROPFIND', Array)\n#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#6 /var/www/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#7 /var/www/owncloud/remote.php(137): require_once('/var/www/ownclo...')\n#8 {main}","File":"/var/www/owncloud/lib/private/connector/sabre/objecttree.php","Line":159}

@PVince81
Copy link
Contributor

PVince81 commented Mar 1, 2016

400 expected filesize 91163114 got 13172736

This looks like an environment issue. This happens because the data wasn't fully transferred to / received by the server. It can happen in case of timeouts (slow connections) or some configuration issue in the PHP environment (php-fpm, etc). Also check whether you always get the same numbers or different numbers for the same file. If the numbers change for each request, then it's very likely to be a timeout issue. Else it's probably a configuration issue.

You might have more luck checking the forums or https://owncloud.org/support/

@MorrisJobke
Copy link
Contributor

You might have more luck checking the forums or https://owncloud.org/support/

As this seems to be a setup issue I will close this ticket.

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants