Upgrade to 10.0.10 Internal Server Error from all client apps


#1

Steps to reproduce

  1. Manual upgrade from OC 9.0.4 --> 9.0.11 -->10.0.10

Expected behaviour

Clients should sync

Actual behaviour

From all app clients, except browser, users can authenticate and connect but no files can sync. “An error occurred while opening a folder Error transferring https://www.cdlr-blog.com/owncloud/remote.php/dav/files/cdelrey/ - server replied: Internal Server Error”

Browser can transfer files up and down.

Server configuration

Operating system: Ubuntu 16.0.4

Web server:: Apache2

Database:: MySQL

PHP version::7.0

ownCloud version: 10.0.10.4

Updated from an older ownCloud or fresh install: Upgraded from 9.0.4 to 9.0.12 to 10.0.10.4

Where did you install ownCloud from::https://owncloud.org/download/older-versions/

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder
{
    "system": {
        "updatechecker": false,
        "instanceid": "ocpemnts87ef",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "--------------------------------",
            "10.100.30.45",
            "www.--------.com",
            "-----------"
        ],
        "datadirectory": "\/mnt\/nas\/lake\/ocdata\/",
        "overwrite.cli.url": "http:\/\/www.------.com\/owncloud",
        "dbtype": "mysql",
        "version": "10.0.10.4",
        "dbname": "owncloud_db",
        "dbhost": "ha.-------.com",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "maintenance": false,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "loglevel": 0,
        "preview_max_scale_factor": 1,
        "enabledPreviewProviders": {
            "0": "OC\\Preview\\PNG",
            "1": "OC\\Preview\\JPEG",
            "2": "OC\\Preview\\GIF",
            "11": "OC\\Preview\\Illustrator",
            "12": "OC\\Preview\\Postscript",
            "13": "OC\\Preview\\Photoshop",
            "14": "OC\\Preview\\TIFF"
        }
    }
}


*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Enabled:

  • configreport: 0.1.1
  • dav: 0.4.0
  • drawio: 0.0.8
  • encryption: 1.3.1
  • federatedfilesharing: 0.3.1
  • files: 1.5.1
  • files_external: 0.7.1
  • files_sharing: 0.11.0
  • files_textviewer: 1.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • market: 0.2.5
  • provisioning_api: 0.5.0
    Disabled:
  • comments
  • external
  • federation
  • notifications
  • systemtags
  • updatenotification
  • user_external

Are you using external storage, if yes which one: mnt/nas (nfs)…

Are you using encryption: no


### Client configuration
**Browser:**

**Operating system:**
Windows, mac, linux, android, IOS

### Logs

#### Web server error log

Insert your webserver log here


#### ownCloud log (data/owncloud.log)

{“reqId”:“dc46f945-fc53-40b1-9ea0-f8809a65d350”,“level”:0,“time”:“2018-12-17T00:56:15+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“OC\Authentication\Token\DefaultTokenProvider::updateToken”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“updating token 98590, last check is now 1545007832”}
{“reqId”:“dc46f945-fc53-40b1-9ea0-f8809a65d350”,“level”:0,“time”:“2018-12-17T00:56:15+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“OC\Authentication\Token\DefaultTokenProvider::getToken”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“token b538ab48897f89cef28c476c2a243a015176d1df4530fd7fda6eea30451fed49278721b05bbe28c428338cdc430b3db7738c5c7f57e1ad86a5879bca0a73949c does not exist”}
{“reqId”:“dc46f945-fc53-40b1-9ea0-f8809a65d350”,“level”:4,“time”:“2018-12-17T00:56:15+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“webdav”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“Exception: An exception occurred while executing 'SELECT * FROM oc_properties WHERE fileid IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND propertyname in (?) ORDER BY propertyname’ with params [“20”, “9861”, “5465”, “215027”, “215023”, “215016”, “215019”, “10008”, “219883”, “215018”, “180603”, “215021”, 22328, “{http:\/\/owncloud.org\/ns}checksums”]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘fileid’ in ‘where clause’: {“Exception”:“Doctrine\\DBAL\\Exception\\InvalidFieldNameException”,“Message”:“An exception occurred while executing 'SELECT * FROM oc_properties WHERE fileid IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND propertyname in (?) ORDER BY propertyname’ with params [\“20\”, \“9861\”, \“5465\”, \“215027\”, \“215023\”, \“215016\”, \“215019\”, \“10008\”, \“219883\”, \“215018\”, \“180603\”, \“215021\”, 22328, \”{http:\\\/\\\/owncloud.org\\\/ns}checksums\”]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘fileid’ in ‘where clause’",“Code”:0,“Trace”:"#0 \/var\/www\/html\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(128): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException(‘An exception oc…’, Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \/var\/www\/html\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(855): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), ‘SELECT * FROM ...', Array)\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/DB\\\/Connection.php(187): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT * FROM…’, Array, Array, NULL)\n#3 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/DAV\/FileCustomPropertiesBackend.php(244): OC\\DB\\Connection->executeQuery(‘SELECT * FROM `…’, Array, Array)\n#4 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/DAV\/AbstractCustomPropertiesBackend.php(182): OCA\\DAV\\DAV\\FileCustomPropertiesBackend->loadChildrenProperties(Object(OCA\\DAV\\Connector\\Sabre\\Directory), Array)\n#5 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/PropertyStorage\/Plugin.php(91): OCA\\DAV\\DAV\\AbstractCustomPropertiesBackend->propFind(‘files\/cdelrey’, Object(Sabre\\DAV\\PropFind))\n#6 [internal function]: Sabre\\DAV\\PropertyStorage\\Plugin->propFind(Object(Sabre\\DAV\\PropFind), Object(OCA\\DAV\\Connector\\Sabre\\Directory))\n#7 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#8 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1058): Sabre\\Event\\EventEmitter->emit(‘propFind’, Array)\n#9 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(980): Sabre\\DAV\\Server->getPropertiesByNode(Object(Sabre\\DAV\\PropFind), Object(OCA\\DAV\\Connector\\Sabre\\Directory))\n#10 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1665): Sabre\\DAV\\Server->getPropertiesIteratorForPath(‘files\/cdelrey’, Array, 1)\n#11 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(355): Sabre\\DAV\\Server->generateMultiStatus(Object(Generator), false)\n#12 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#13 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#14 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit(‘method:PROPFIND’, Array)\n#15 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#16 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/Server.php(298): Sabre\\DAV\\Server->exec()\n#17 \/var\/www\/html\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(31): OCA\\DAV\\Server->exec()\n#18 \/var\/www\/html\/owncloud\/remote.php(165): require_once(’\/var\/www\/html\/o…’)\n#19 {main}",“File”:"\/var\/www\/html\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php",“Line”:71}"}
{“reqId”:“711b769a-0252-4bae-bbab-0eb28d161c75”,“level”:0,“time”:“2018-12-17T00:56:20+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“OC\Authentication\Token\DefaultTokenProvider::updateToken”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“updating token 98590, last check is now 1545007832”}
{“reqId”:“f04f6360-8580-4909-8c32-94ff96fa0bad”,“level”:0,“time”:“2018-12-17T00:56:20+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“OC\Authentication\Token\DefaultTokenProvider::updateToken”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“updating token 98570, last check is now 1544970618”}
{“reqId”:“ead332f6-02cd-4186-b5d7-79b74527b044”,“level”:0,“time”:“2018-12-17T00:56:20+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“OC\Authentication\Token\DefaultTokenProvider::updateToken”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“updating token 98589, last check is now 1545007520”}
{“reqId”:“711b769a-0252-4bae-bbab-0eb28d161c75”,“level”:0,“time”:“2018-12-17T00:56:20+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“OC\Authentication\Token\DefaultTokenProvider::getToken”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“token b538ab48897f89cef28c476c2a243a015176d1df4530fd7fda6eea30451fed49278721b05bbe28c428338cdc430b3db7738c5c7f57e1ad86a5879bca0a73949c does not exist”}
{“reqId”:“ead332f6-02cd-4186-b5d7-79b74527b044”,“level”:0,“time”:“2018-12-17T00:56:20+00:00”,“remoteAddr”:“10.100.31.1”,“user”:“cdelrey”,“app”:“OC\Authentication\Token\DefaultTokenProvider::getToken”,“method”:“PROPFIND”,“url”:"/owncloud/remote.php/dav/files/cdelrey/",“message”:“token b538ab48897f89cef28c476c2a243a015176d1df4530fd7fda6eea30451fed49278721b05bbe28c428338cdc430b3db7738c5c7f57e1ad86a5879bca0a73949c does not exist”}


#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) …


#2

Hey,

from what i have read in the past this isn’t supposed to work and might cause your issue. Some older posts i had read said that you would need to upgrade from 9.0.12 to the latest 9.1 first before upgrading to 10.0.10.

But i did the following search https://central.owncloud.org/search?q=Unknown%20column%20‘fileid’ and found the thread below, maybe this helps you?


#3

For me it was the following.
I needed to update the oc_properties table.

It needs the following structure. This is from my mysqldump.

CREATE TABLE oc_properties (
id bigint(20) NOT NULL AUTO_INCREMENT,
fileid bigint(20) unsigned DEFAULT NULL,
propertyname varchar(255) COLLATE utf8_bin NOT NULL DEFAULT ‘’,
propertyvalue varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (id),
KEY fileid_index (fileid)

After i set it like this al was fine again with the clients.
I do not know why this is not beeing automaticly detected. But i have it on all my instances. going from 8.x to the latest 8.x then the latest 9.x and the 10. and then the clients stops.


#4

That did it, thanks Johanh!

I had the table what was missing was the fileid column. I’ll watch it for more errors in-case my upgrade was not inline.

Million thanks bro!


#5

Hey,

nice and thanks for this notes. If i understand the previously linked comment https://github.com/owncloud/core/issues/30007#issuecomment-427789626 correctly this could be done on the command line with the mentioned steps without even the need to execute SQL commands in the database.


#6

This is exactly what I needed. I did a similar upgrade and the oc_properties table was missing the fileid field. After it was added and then using info from the post by tom42. I am back in business again! Thank you all. I can finally enjoy a current release and no more “unsupported” notifications at the client.