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

Activating the Activity app prevents deleting/moving of files in groupfolders #1584

Open
JanBoehme opened this issue Mar 1, 2024 · 1 comment

Comments

@JanBoehme
Copy link

JanBoehme commented Mar 1, 2024

Steps to reproduce

  1. Create a file in a groupfolder
  2. Try to delete it -> produces an error
  3. deactivate activity app
  4. try again to delete the file -> works

Expected behaviour

I'd expect the file to be deletable when the activity app is active.

Actual behaviour

The file can't be moved or deleted.

Server configuration

Operating system:
Linux / Ubuntu 22.04.3

Web server:
nginx/1.24.0

Database:
MariaDB 10.11.6

PHP version:
8.2.15

Nextcloud version: (see Nextcloud admin page)
28.0.3

Where did you install Nextcloud from:
Tarball

Signing status:
No errors have been found.

List of activated apps:

Enabled:

  • admin_audit: 1.18.0
  • bruteforcesettings: 2.8.0
  • calendar: 4.6.5
  • calendar_resource_management: 0.6.0
  • camerarawpreviews: 0.8.4
  • circles: 28.0.0-dev
  • cloud_federation_api: 1.11.0
  • collectives: 2.9.2
  • contacts: 5.5.2
  • contactsinteraction: 1.9.0
  • dav: 1.29.1
  • deck: 1.12.2
  • event_update_notification: 2.3.0
  • federatedfilesharing: 1.18.0
  • files: 2.0.0
  • files_pdfviewer: 2.9.0
  • files_reminders: 1.1.0
  • files_sharing: 1.20.0
  • files_trashbin: 1.18.0
  • files_versions: 1.21.0
  • forms: 4.1.1
  • groupfolders: 16.0.4
  • impersonate: 1.15.0
  • logreader: 2.13.0
  • lookup_server_connector: 1.16.0
  • mail: 3.5.7
  • notes: 4.9.2
  • notifications: 2.16.0
  • oauth2: 1.16.3
  • password_policy: 1.18.0
  • polls: 6.1.6
  • privacy: 1.12.0
  • provisioning_api: 1.18.0
  • richdocuments: 8.3.1
  • serverinfo: 1.18.0
  • settings: 1.10.1
  • sharebymail: 1.18.0
  • spreed: 18.0.3
  • support: 1.11.0
  • survey_client: 1.16.0
  • suspicious_login: 6.0.0
  • systemtags: 1.18.0
  • tasks: 0.15.0
  • text: 3.9.1
  • theming: 2.3.0
  • timetracker: 0.0.82
  • twofactor_backupcodes: 1.17.0
  • updatenotification: 1.18.0
  • user_status: 1.8.1
  • viewer: 2.2.0
  • workflowengine: 2.10.0

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "subdomain.domain.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.3.2",
        "overwrite.cli.url": "https:\/\/subdomain.domain.org\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtptimeout": 30,
        "maintenance": false,
        "maintenance_window_start": 21,
        "theme": "",
        "loglevel": 2,
        "updater.release.channel": "stable",
        "activity_use_cached_mountpoints": "true",
        "activity_expire_days": 62,
        "default_phone_region": "DE",
        "app_install_overwrite": [
            "bbb",
            "bruteforcesettings",
            "polls",
            "camerarawpreviews",
            "suspicious_login",
            "apporder",
            "impersonate",
            "event_update_notification",
            "approval",
            "timetracker",
            "issuetemplate"
        ],
        "trashbin_retention_obligation": "auto, 121",
        "minimum.supported.desktop.version": "3.3.6",
        "preview_max_memory": 512,
        "bulkupload.enabled": true,
        "defaultapp": ""
    }
}

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Firefox 121.0.1 (64-Bit)

Operating system:
MacOS 13.6.3

Logs

Nextcloud log (data/nextcloud.log)

{
  "reqId": "WuGDv1KYFxCh5rXIXwhv",
  "level": 3,
  "time": "2024-03-01T11:42:24+00:00",
  "remoteAddr": "95.90.97.25",
  "user": "cloudadmin",
  "app": "webdav",
  "method": "DELETE",
  "url": "/remote.php/dav/files/cloudadmin/01_International%20Programmes/01_Countries/Global%20Project/Neue%20Textdatei.md",
  "message": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/cloud/nextcloud/lib/private/Files/Node/Node.php on line 344",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0",
  "version": "28.0.3.2",
  "exception": {
    "Exception": "TypeError",
    "Message": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/cloud/nextcloud/lib/private/Files/Node/Node.php on line 344",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/Node/Node.php",
        "line": 344,
        "function": "normalizePath",
        "class": "OC\\Files\\Utils\\PathHelper",
        "type": "::"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/Node/Folder.php",
        "line": 70,
        "function": "normalizePath",
        "class": "OC\\Files\\Node\\Node",
        "type": "->"
      },
      {
        "function": "getFullPath",
        "class": "OC\\Files\\Node\\Folder",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line": 84,
        "function": "call_user_func_array"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line": 428,
        "function": "__call",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line": 161,
        "function": "getFullPath",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/activity/lib/FilesHooks.php",
        "line": 1333,
        "function": "get",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/activity/lib/FilesHooks.php",
        "line": 1203,
        "function": "getUnrelatedUsers",
        "class": "OCA\\Activity\\FilesHooks",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/activity/lib/FilesHooks.php",
        "line": 176,
        "function": "getAffectedUsersFromCachedMounts",
        "class": "OCA\\Activity\\FilesHooks",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/activity/lib/FilesHooks.php",
        "line": 117,
        "function": "addNotificationsForFileAction",
        "class": "OCA\\Activity\\FilesHooks",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/activity/lib/FilesHooksStatic.php",
        "line": 59,
        "function": "fileDelete",
        "class": "OCA\\Activity\\FilesHooks",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/legacy/OC_Hook.php",
        "line": 105,
        "function": "fileDelete",
        "class": "OCA\\Activity\\FilesHooksStatic",
        "type": "::"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/View.php",
        "line": 1270,
        "function": "emit",
        "class": "OC_Hook",
        "type": "::"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/View.php",
        "line": 1144,
        "function": "runHooks",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/lib/private/Files/View.php",
        "line": 702,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
        "line": 543,
        "function": "unlink",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 197,
        "function": "delete",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 281,
        "function": "delete",
        "class": "Sabre\\DAV\\Tree",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpDelete",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/dav/lib/Server.php",
        "line": 373,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/cloud/nextcloud/remote.php",
        "line": 172,
        "args": [
          "/var/www/cloud/nextcloud/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/cloud/nextcloud/lib/private/Files/Utils/PathHelper.php",
    "Line": 52,
    "message": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/cloud/nextcloud/lib/private/Files/Node/Node.php on line 344",
    "exception": {},
    "CustomMessage": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/cloud/nextcloud/lib/private/Files/Node/Node.php on line 344"
  }
}

Browser log

Request:

{
	"DELETE": {
		"scheme": "https",
		"host": "subdomain.domain.org",
		"filename": "/remote.php/dav/files/cloudadmin/01_International%20Programmes/01_Countries/Global%20Project/Neue%20Textdatei.md",
		"remote": {
			"Adresse": "144.76.91.54:443"
		}
	}
}

Response:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>TypeError</s:exception>
  <s:message>OC\Files\Utils\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/cloud/nextcloud/lib/private/Files/Node/Node.php on line 344</s:message>
</d:error>

Console:

[ERROR] files: Error while deleting a file 
Object { app: "files", uid: "cloudadmin", level: 2, error: {…}, source: "https://subdomain.domain.org/remote.php/dav/files/cloudadmin/01_International Programmes/01_Countries/Global Project/Neue Textdatei.md", node: {…} }
ConsoleLogger.js:74:18
    value ConsoleLogger.js:74
    value ConsoleLogger.js:100
    exec deleteAction.ts:119
    onActionClick FileEntryActions.vue:171
    click FileEntryActions.vue:4
    VueJS 4
    onClick actionText-bMy_49i8.mjs:118
    handleClick NcActionButton.mjs:113
    VueJS 33
@JanBoehme
Copy link
Author

The behavior seems to be somewhat dependant on the folder containing the file. In the example here, further up the directory structure it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant