Skip to content

"Could not create folder" error, but folder is actually created and visible after refresh #20395

@mmallejac

Description

@mmallejac

Steps to reproduce

This happens while using a share link, that points to a folder located on a docker volume, locally mounted with files_external

  1. share a folder located under a local location mounted using files_external
  2. using the share link, on another browser or computer, create a folder

Expected behaviour

The folder is created, no error is shown

Actual behaviour

A Could not create folder "my_folder" error message appears

Refreshing the page shows that the folder has been actually created

An error appears in the nextcloud.log file

Server configuration detail

Operating system: Linux 5.3.0-19-generic #20-Ubuntu SMP Fri Oct 18 09:04:39 UTC 2019 x86_64

Webserver: Apache/2.4.38 (Debian) (apache2handler)

Database: mysql 10.4.12

PHP version:

7.3.16
Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, session, posix, Reflection, standard, SimpleXML, pdo_sqlite, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apache2handler, apcu, exif, gd, gmp, imagick, intl, ldap, memcached, pcntl, pdo_mysql, pdo_pgsql, redis, sodium, zip, Zend OPcache

Nextcloud version: 18.0.3 - 18.0.3.0

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

Where did you install Nextcloud from: official docker : image nextcloud:18.0.3-apache

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.4.0
 - activity: 2.11.0
 - calendar: 2.0.2
 - cloud_federation_api: 1.1.0
 - comments: 1.8.0
 - contacts: 3.2.0
 - dav: 1.14.0
 - deck: 0.8.2
 - documentserver_community: 0.1.5
 - federatedfilesharing: 1.8.0
 - federation: 1.8.0
 - files: 1.13.1
 - files_downloadactivity: 1.7.0
 - files_external: 1.9.0
 - files_pdfviewer: 1.7.0
 - files_rightclick: 0.15.2
 - files_sharing: 1.10.1
 - files_trashbin: 1.8.0
 - files_versions: 1.11.0
 - files_videoplayer: 1.7.0
 - firstrunwizard: 2.7.0
 - issuetemplate: 0.6.0
 - logreader: 2.3.0
 - lookup_server_connector: 1.6.0
 - nextbackup: 19.12.1
 - nextcloud_announcements: 1.7.0
 - notifications: 2.6.0
 - oauth2: 1.6.0
 - onlyoffice: 4.1.4
 - password_policy: 1.8.0
 - photos: 1.0.0
 - privacy: 1.2.0
 - provisioning_api: 1.8.0
 - recommendations: 0.6.0
 - serverinfo: 1.8.0
 - settings: 1.0.0
 - sharebymail: 1.8.0
 - support: 1.1.0
 - survey_client: 1.6.0
 - systemtags: 1.8.0
 - tasks: 0.12.1
 - text: 2.0.0
 - theming: 1.9.0
 - twofactor_backupcodes: 1.7.0
 - updatenotification: 1.8.0
 - viewer: 1.2.0
 - workflowengine: 2.0.0
Disabled:
 - admin_audit
 - encryption
 - spreed
 - user_ldap

Configuration (config/config.php)
{
    "htaccess.RewriteBase": "\/",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "apps_paths": [
        {
            "path": "\/var\/www\/html\/apps",
            "url": "\/apps",
            "writable": false
        },
        {
            "path": "\/var\/www\/html\/custom_apps",
            "url": "\/custom_apps",
            "writable": true
        }
    ],
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "password": "***REMOVED SENSITIVE VALUE***",
        "port": 6379
    },
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "starter.cloud.4next.ch"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "18.0.3.0",
    "overwrite.cli.url": "https:\/\/starter.cloud.4next.ch",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpsecure": "tls",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauth": 1,
    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
    "overwriteprotocol": "https"
}

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

Are you using encryption:

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

Client configuration

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

Operating system: Linux

Logs

Web server error log

Nextcloud log
{"reqId":"tgHHIBoIBCmqJNqgeZXh","level":3,"time":"2020-04-09T14:14:08+00:00","remoteAddr":"185.129.54.43","user":"--","app":"public","method":"MKCOL","url":"/public.php/webdav/ttt","message":{"Exception":"Error","Message":"Call to a member function getUID() on null","Code":0,"Trace":[{"file":"/var/www/html/apps/activity/lib/FilesHooks.php","line":638,"function":"getOwner","class":"OC\\Files\\View","type":"->","args":["/Direction/shareDir/ttt"]},{"file":"/var/www/html/apps/activity/lib/FilesHooks.php","line":190,"function":"getSourcePathAndOwner","class":"OCA\\Activity\\FilesHooks","type":"->","args":["/Direction/shareDir/ttt"]},{"file":"/var/www/html/apps/activity/lib/FilesHooks.php","line":148,"function":"addNotificationsForFileAction","class":"OCA\\Activity\\FilesHooks","type":"->","args":["/Direction/shareDir/ttt","file_created","","created_public"]},{"file":"/var/www/html/apps/activity/lib/FilesHooksStatic.php","line":47,"function":"fileCreate","class":"OCA\\Activity\\FilesHooks","type":"->","args":["/Direction/shareDir/ttt"]},{"file":"/var/www/html/lib/private/legacy/hook.php","line":111,"function":"fileCreate","class":"OCA\\Activity\\FilesHooksStatic","type":"::","args":[{"run":true,"path":"/Direction/shareDir/ttt"}]},{"file":"/var/www/html/lib/private/Files/View.php","line":1275,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_create",{"run":true,"path":"/Direction/shareDir/ttt"}]},{"file":"/var/www/html/lib/private/Files/View.php","line":1203,"function":"runHooks","class":"OC\\Files\\View","type":"->","args":[["create","write"],"/Direction/shareDir/ttt",true]},{"file":"/var/www/html/lib/private/Files/View.php","line":269,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["mkdir","/ttt",["create","write"]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":189,"function":"mkdir","class":"OC\\Files\\View","type":"->","args":["//ttt"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1210,"function":"createDirectory","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["ttt"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":590,"function":"createCollection","class":"Sabre\\DAV\\Server","type":"->","args":["ttt",{"__class__":"Sabre\\DAV\\MkCol"}]},{"function":"httpMkcol","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"http://starter.cloud.4next.ch/public.php/webdav/ttt","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpMkcol"],[{"absoluteUrl":"http://starter.cloud.4next.ch/public.php/webdav/ttt","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:MKCOL",[{"absoluteUrl":"http://starter.cloud.4next.ch/public.php/webdav/ttt","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"http://starter.cloud.4next.ch/public.php/webdav/ttt","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/appinfo/v1/publicwebdav.php","line":109,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/public.php","line":81,"args":["/var/www/html/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Files/View.php","Line":1690,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0","version":"18.0.3.0"}
Browser log

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions