nextcloud / notes

✎ Distraction-free notes and writing
https://apps.nextcloud.com/apps/notes
GNU Affero General Public License v3.0
623 stars 133 forks source link

"Failed to overwrite share target for notes" logged when creating guest account (without storage/quota?) #1333

Open nickvergessen opened 3 months ago

nickvergessen commented 3 months ago

Please make a clear and concise description of what the bug is.

Steps to reproduce

  1. Create a folder
  2. Enter an email into the share dropdown
  3. Use the guests app option to create them an account
  4. Save the share

Expected behaviour

:sparkles:

Actual behaviour

{
  "reqId": "HkqeCFThhPjdHs8TQuDm",
  "level": 3,
  "time": "2024-07-30T12:44:39+00:00",
  "remoteAddr": "…",
  "user": "…",
  "app": "notes",
  "method": "POST",
  "url": "/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json",
  "message": "Failed to overwrite share target for notes",
  "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0",
  "version": "29.0.4.1",
  "exception": {
    "Exception": "OCP\\Files\\NotPermittedException",
    "Message": "Could not create folder \"/…/files/Notes\"",
    "Code": 0,
    "Trace": [
      {
        "function": "newFolder",
        "class": "OC\\Files\\Node\\Folder",
        "type": "->",
        "args": [
          "Notes"
        ]
      },
      {
        "file": "…/lib/private/Files/Node/LazyFolder.php",
        "line": 84,
        "function": "call_user_func_array",
        "args": [
          [
            [
              "OC\\Files\\Node\\Folder"
            ],
            "newFolder"
          ],
          [
            "Notes"
          ]
        ]
      },
      {
        "file": "…/lib/private/Files/Node/LazyFolder.php",
        "line": 456,
        "function": "__call",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->",
        "args": [
          "newFolder",
          [
            "Notes"
          ]
        ]
      },
      {
        "file": "…/apps/notes/lib/Service/NoteUtil.php",
        "line": 196,
        "function": "newFolder",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->",
        "args": [
          "Notes"
        ]
      },
      {
        "file": "…/apps/notes/lib/AppInfo/BeforeShareCreatedListener.php",
        "line": 52,
        "function": "getOrCreateNotesFolder",
        "class": "OCA\\Notes\\Service\\NoteUtil",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "…/apps/notes/lib/AppInfo/BeforeShareCreatedListener.php",
        "line": 32,
        "function": "overwriteShareTarget",
        "class": "OCA\\Notes\\AppInfo\\BeforeShareCreatedListener",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "…/lib/private/EventDispatcher/ServiceEventListener.php",
        "line": 86,
        "function": "handle",
        "class": "OCA\\Notes\\AppInfo\\BeforeShareCreatedListener",
        "type": "->",
        "args": [
          [
            "OCP\\Share\\Events\\BeforeShareCreatedEvent"
          ]
        ]
      },
      {
        "file": "…/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 230,
        "function": "__invoke",
        "class": "OC\\EventDispatcher\\ServiceEventListener",
        "type": "->",
        "args": [
          [
            "OCP\\Share\\Events\\BeforeShareCreatedEvent"
          ],
          "OCP\\Share\\Events\\BeforeShareCreatedEvent",
          [
            "Symfony\\Component\\EventDispatcher\\EventDispatcher"
          ]
        ]
      },
      {
        "file": "…/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 59,
        "function": "callListeners",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            [
              "Closure"
            ],
            [
              "Closure"
            ],
            [
              "Closure"
            ],
            [
              "Closure"
            ],
            [
              "Closure"
            ]
          ],
          "OCP\\Share\\Events\\BeforeShareCreatedEvent",
          [
            "OCP\\Share\\Events\\BeforeShareCreatedEvent"
          ]
        ]
      },
      {
        "file": "…/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 86,
        "function": "dispatch",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            "OCP\\Share\\Events\\BeforeShareCreatedEvent"
          ],
          "OCP\\Share\\Events\\BeforeShareCreatedEvent"
        ]
      },
      {
        "file": "…/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 98,
        "function": "dispatch",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          "OCP\\Share\\Events\\BeforeShareCreatedEvent",
          [
            "OCP\\Share\\Events\\BeforeShareCreatedEvent"
          ]
        ]
      },
      {
        "file": "…/lib/private/Share20/Manager.php",
        "line": 741,
        "function": "dispatchTyped",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            "OCP\\Share\\Events\\BeforeShareCreatedEvent"
          ]
        ]
      },
      {
        "file": "…/apps/files_sharing/lib/Controller/ShareAPIController.php",
        "line": 805,
        "function": "createShare",
        "class": "OC\\Share20\\Manager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 232,
        "function": "createShare",
        "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 138,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Files_Sharing\\Controller\\ShareAPIController"
          ],
          "createShare"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Files_Sharing\\Controller\\ShareAPIController"
          ],
          "createShare"
        ]
      },
      {
        "file": "…/lib/private/Route/Router.php",
        "line": 338,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Files_Sharing\\Controller\\ShareAPIController",
          "createShare",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "ocs.files_sharing.shareapi.createshare"
          ]
        ]
      },
      {
        "file": "…/ocs/v1.php",
        "line": 66,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/files_sharing/api/v1/shares"
        ]
      },
      {
        "file": "…/ocs/v2.php",
        "line": 23,
        "args": [
          "…/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "…/lib/private/Files/Node/Folder.php",
    "Line": 162,
    "message": "Failed to overwrite share target for notes",
    "exception": {},
    "CustomMessage": "Failed to overwrite share target for notes"
  }
}

Screenshots

Bildschirmfoto vom 2024-07-30 14-45-16

Server

Please complete the following information.