nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.22k stars 3.95k forks source link

Opening mounted link share fails with 500 #15211

Closed blizzz closed 5 years ago

blizzz commented 5 years ago

Steps to reproduce

I have a remote share (funnily from the same instance) and try to enter it in the web interface. Also, it is supposed to be synced.

Expected behaviour

The content is shown (it sohuld be, the files are there at the sharer and the share in place).

Actual behaviour

Server error, redirect to the files app in the web ui, the sync client reports errors.

Server configuration detail

Operating system: Linux 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64

Webserver: Apache/2.4.29 (Ubuntu) (apache2handler)

Database: mysql 5.7.25

PHP version:

7.2.15-0ubuntu0.18.04.2 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, apache2handler, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, geoip, gettext, iconv, igbinary, imagick, imap, intl, json, exif, mysqli, pdo_mysql, Phar, posix, pspell, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 16.0.0 RC 2 - 16.0.0.8

Updated from an older Nextcloud/ownCloud or fresh install: updated

Where did you install Nextcloud from:

Signing status Array ( )
List of activated apps ``` Enabled: - accessibility: 1.2.0 - activity: 2.9.1 - admin_audit: 1.6.0 - apporder: 0.6.0 - audioplayer: 2.7.0 - bookmarks: 0.17.0 - calendar: 1.7.0 - cloud_federation_api: 0.2.0 - comments: 1.6.0 - contacts: 3.1.1 - dav: 1.9.2 - deck: 0.6.0 - drawio: 0.9.2 - dropit: 0.2.1 - event_update_notification: 0.3.4 - federatedfilesharing: 1.6.0 - federation: 1.6.0 - files: 1.11.0 - files_markdown: 2.0.6 - files_mindmap: 0.0.13 - files_pdfviewer: 1.5.0 - files_rightclick: 0.13.0 - files_sharing: 1.8.0 - files_texteditor: 2.8.0 - files_trashbin: 1.6.0 - files_versions: 1.9.0 - files_videoplayer: 1.5.0 - firstrunwizard: 2.5.0 - groupfolders: 2.0.4 - issuetemplate: 0.5.0 - logreader: 2.1.0 - lookup_server_connector: 1.4.0 - mail: 0.14.0 - news: 13.1.6 - nextcloud_announcements: 1.5.0 - notifications: 2.4.1 - oauth2: 1.4.2 - password_policy: 1.6.0 - polls: 0.10.2 - previewgenerator: 2.1.0 - privacy: 1.0.0 - provisioning_api: 1.6.0 - qownnotesapi: 18.11.0 - ransomware_protection: 1.4.0 - recommendations: 0.4.0 - richdocuments: 3.2.4 - serverinfo: 1.6.0 - sharebymail: 1.6.0 - socialsharing_diaspora: 1.0.4 - socialsharing_email: 1.0.5 - socialsharing_facebook: 1.0.4 - spreed: 6.0.0-rc.2 - support: 1.0.0 - survey_client: 1.4.0 - systemtags: 1.6.0 - tasks: 0.9.8 - telephoneprovider: 1.0.2 - theming: 1.7.0 - twofactor_backupcodes: 1.5.0 - twofactor_totp: 2.1.2 - updatenotification: 1.6.0 - viewer: 1.0.0 - workflowengine: 1.6.0 Disabled: - defaultlinkopen - encryption - files_external - gallery - user_ldap ```
Configuration (config/config.php) ``` { "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "16.0.0.8", "installedat": "1326327271.69", "lastupdatedat": "1338667774.87", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "theme": "", "maintenance": false, "loglevel": 2, "trusted_domains": [ "o.schiwon.me", "ovin.schiwon.me" ], "secret": "***REMOVED SENSITIVE VALUE***", "share_folder": "\/Shared", "appstoreenabled": true, "trashbin_retention_obligation": "auto", "appstore.experimental.enabled": true, "updater.release.channel": "beta", "updater.server.url": "https:\/\/updates.nextcloud.com\/internal_updater_server\/", "mysql.utf8mb4": true, "debug": false, "memcache.local": "\\OC\\Memcache\\Redis", "filelocking.enabled": true, "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 }, "overwrite.cli.url": "https:\/\/ovin.schiwon.me", "htaccess.RewriteBase": "\/", "mail_smtpmode": "smtp", "mail_smtpsecure": "tls", "mail_smtpauthtype": "PLAIN", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "app_install_overwrite": [ "apporder", "audioplayer", "deck", "drawio", "qownnotesapi", "tasks" ], "updater.secret": "***REMOVED SENSITIVE VALUE***" } ```

Are you using external storage, if yes which one: No

Are you using encryption: true

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Operating system: Antergos (Arch based Linux OS)

Logs

Web server error log ``` ```
Nextcloud log ``` [webdav] Fatal: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE `filecache` SET =? WHERE ( <> ? OR IS NULL) AND `fileid` = ? ' with params ["405687"]: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens at <> 0. /var/www/minion/ovin-perm/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184 Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... s", Doctrine\DBAL\Dr ... ]}) 1. /var/www/minion/ovin-perm/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158 Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... s") 2. /var/www/minion/ovin-perm/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 938 Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "UPDATE `filecac ... ", {1: "*** sensiti ... "}) 3. /var/www/minion/ovin-perm/lib/private/DB/Connection.php line 195 Doctrine\DBAL\Connection->executeQuery("UPDATE `filecac ... ", ["*** sensitive parameter replaced ***"], [], null) 4. /var/www/minion/ovin-perm/lib/private/Files/Cache/Cache.php line 340 OC\DB\Connection->executeQuery("UPDATE `filecac ... ", ["*** sensitive parameter replaced ***"]) 5. /var/www/minion/ovin-perm/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 138 OC\Files\Cache\Cache->update("*** sensitive parameters replaced ***") 6. /var/www/minion/ovin-perm/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 111 OC\Files\Cache\Wrapper\CacheWrapper->update("*** sensitive parameters replaced ***") 7. /var/www/minion/ovin-perm/apps/files_sharing/lib/External/Scanner.php line 111 OC\Files\Cache\Wrapper\CacheWrapper->put("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***") 8. /var/www/minion/ovin-perm/apps/files_sharing/lib/External/Scanner.php line 97 OCA\Files_Sharing\External\Scanner->addResult("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***") 9. /var/www/minion/ovin-perm/apps/files_sharing/lib/External/Scanner.php line 44 OCA\Files_Sharing\External\Scanner->scanAll() 10. /var/www/minion/ovin-perm/lib/private/Files/Cache/Watcher.php line 104 OCA\Files_Sharing\External\Scanner->scan("*** sensitive parameter replaced ***", false) 11. /var/www/minion/ovin-perm/lib/private/Files/View.php line 1336 OC\Files\Cache\Watcher->update("*** sensitive parameters replaced ***") 12. /var/www/minion/ovin-perm/lib/private/Files/View.php line 1376 OC\Files\View->getCacheEntry(OCA\RansomwarePr ... l}, "*** sensitive parameter replaced ***", "/Shared/WhatsApp Images") 13. /var/www/minion/ovin-perm/apps/dav/lib/Connector/Sabre/Directory.php line 223 OC\Files\View->getFileInfo("/arthur/files/Shared/WhatsApp Images") 14. /var/www/minion/ovin-perm/3rdparty/sabre/dav/lib/DAV/Tree.php line 76 OCA\DAV\Connector\Sabre\Directory->getChild("WhatsApp Images") 15. /var/www/minion/ovin-perm/3rdparty/sabre/dav/lib/DAV/Server.php line 967 Sabre\DAV\Tree->getNodeForPath("files/arthur/Shared/WhatsApp Images") 16. /var/www/minion/ovin-perm/3rdparty/sabre/dav/lib/DAV/Server.php line 1666 Sabre\DAV\Server->getPropertiesIteratorForPath("files/arthur/Shared/WhatsApp Images", ["{DAV:}getlastm ... "], 1) 17. /var/www/minion/ovin-perm/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355 Sabre\DAV\Server->generateMultiStatus(Generator {}, false) 18. <> Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {}) 19. /var/www/minion/ovin-perm/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105 undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }]) 20. /var/www/minion/ovin-perm/3rdparty/sabre/dav/lib/DAV/Server.php line 479 Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }]) 21. /var/www/minion/ovin-perm/3rdparty/sabre/dav/lib/DAV/Server.php line 254 Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {}) 22. /var/www/minion/ovin-perm/apps/dav/lib/Server.php line 316 Sabre\DAV\Server->exec() 23. /var/www/minion/ovin-perm/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec() 24. /var/www/minion/ovin-perm/remote.php line 163 undefinedundefinedrequire_once("/var/www/minion ... p") PROPFIND /remote.php/dav/files/arthur/Shared/WhatsApp%20Images from 92.193.144.242 by arthur at 2019-04-24T10:09:30+00:00 ```
Browser log
tigernero79 commented 5 years ago

must wait for new release nextcloud 16 scheduled for May 16 for the reduction of this bug?

enoch85 commented 5 years ago

must wait for new release nextcloud 16 scheduled for May 16 for the reduction of this bug?

This will probably be fixed in 16.0.1. If not, then in a later version and when that version is out this bug will be gone.

blizzz commented 5 years ago

it seems some data structure gets messed up inbetween. I was able to reproduce it on current git. Creating link shares and accepting them works for me, but rescaning does not, it causes the error. It's shit to debug however :-/ tbc.

kesselb commented 5 years ago

Sounds like https://github.com/nextcloud/server/pull/15385