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

500 error if you remove a file belonging to an album #1226

Closed
1 task
skjnldsv opened this issue Sep 8, 2022 · 2 comments · Fixed by #1161 or #1228
Closed
1 task

500 error if you remove a file belonging to an album #1226

skjnldsv opened this issue Sep 8, 2022 · 2 comments · Fixed by #1161 or #1228
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working high High priority
Milestone

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Sep 8, 2022

  • Watch for file deletion event and edit the album accordingly
{
  "reqId": "ozZ8J8lLHpAMUxHvqoaX",
  "level": 3,
  "time": "2022-09-08T21:22:42+00:00",
  "remoteAddr": "172.18.0.1",
  "user": "admin",
  "app": "webdav",
  "method": "PROPFIND",
  "url": "/remote.php/dav/photos/admin/albums/",
  "message": "Photo not found for user",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36",
  "version": "25.0.0.8",
  "exception": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "Photo not found for user",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps2/photos/lib/Sabre/Album/AlbumRoot.php",
        "line": 164,
        "function": "getFileInfo",
        "class": "OCA\\Photos\\Sabre\\Album\\AlbumPhoto",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/apps2/photos/lib/Sabre/Album/PropFindPlugin.php",
        "line": 111,
        "function": "getDateRange",
        "class": "OCA\\Photos\\Sabre\\Album\\AlbumRoot",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php",
        "line": 95,
        "function": "OCA\\Photos\\Sabre\\Album\\{closure}",
        "class": "OCA\\Photos\\Sabre\\Album\\PropFindPlugin",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps2/photos/lib/Sabre/Album/PropFindPlugin.php",
        "line": 111,
        "function": "handle",
        "class": "Sabre\\DAV\\PropFind",
        "type": "->",
        "args": [
          "{http://nextcloud.org/ns}dateRange",
          {
            "__class__": "Closure"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "propFind",
        "class": "OCA\\Photos\\Sabre\\Album\\PropFindPlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\DAV\\PropFind"
          },
          {
            "__class__": "OCA\\Photos\\Sabre\\Album\\AlbumRoot",
            "rootFolder": {
              "__class__": "OC\\Files\\Node\\LazyRoot"
            }
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1052,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "propFind",
          [
            {
              "__class__": "Sabre\\DAV\\PropFind"
            },
            {
              "__class__": "OCA\\Photos\\Sabre\\Album\\AlbumRoot",
              "rootFolder": {
                "__class__": "OC\\Files\\Node\\LazyRoot"
              }
            }
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 984,
        "function": "getPropertiesByNode",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\DAV\\PropFind"
          },
          {
            "__class__": "OCA\\Photos\\Sabre\\Album\\AlbumRoot",
            "rootFolder": {
              "__class__": "OC\\Files\\Node\\LazyRoot"
            }
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1662,
        "function": "getPropertiesIteratorForPath",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "photos/admin/albums",
          [
            "{http://nextcloud.org/ns}last-photo",
            "{http://nextcloud.org/ns}nbItems",
            "{http://nextcloud.org/ns}location",
            "{http://nextcloud.org/ns}dateRange"
          ],
          1
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1647,
        "function": "writeMultiStatus",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\Xml\\Writer",
            "elementMap": [],
            "contextUri": "/remote.php/dav/",
            "namespaceMap": {
              "DAV:": "d",
              "http://sabredav.org/ns": "s",
              "http://owncloud.org/ns": "oc",
              "http://nextcloud.org/ns": "nc"
            },
            "classMap": []
          },
          {
            "__class__": "Generator"
          },
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 346,
        "function": "generateMultiStatus",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Generator"
          },
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpPropFind",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:PROPFIND",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Server.php",
        "line": 360,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/remote.php",
        "line": 167,
        "args": [
          "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/nextcloud/apps2/photos/lib/Sabre/Album/AlbumPhoto.php",
    "Line": 102,
    "message": "Photo not found for user",
    "exception": {},
    "CustomMessage": "Photo not found for user"
  }
}
@skjnldsv skjnldsv added bug Something isn't working high High priority 1. to develop Accepted and waiting to be taken care of labels Sep 8, 2022
@skjnldsv skjnldsv added this to the Nextcloud 25 milestone Sep 8, 2022
@artonge
Copy link
Collaborator

artonge commented Sep 8, 2022

Seen and is fixed in #1161 ;)

@skjnldsv
Copy link
Member Author

skjnldsv commented Sep 9, 2022

Seen and is fixed in #1161 ;)

Maybe better split off :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants