nextcloud / photos

📸 Your memories under your control
GNU Affero General Public License v3.0
516 stars 59 forks source link

Error when trying to add photos to album #1917

Open G1FEF opened 12 months ago

G1FEF commented 12 months ago

Describe the bug When attempting to add a photo to an album an error results: Failed to add IMGxxxx.jpg to album xxxx. The photo is not added to the album.

To Reproduce Steps to reproduce the behavior:

  1. Go to /index.php/apps/photos
  2. Hover over a photo, then tick checkbox to select it.
  3. Now click on button that appears "+ Add to album"
  4. Click on any album already created
    1. The error is displayed top right of the page.

Expected behavior The photo is added to the album.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Browser log

JQMIGRATE: Migrate is installed, version 3.4.1Proxying an event bus of version 3.0.2 with 1.3.0jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.Proxying an event bus of version 3.0.2 with 1.3.0OCA.Files.Sidebar initializedOCA.Files.Sidebar initializedProxying an event bus of version 3.0.2 with 1.3.0Proxying an event bus of version 3.0.2 with 1.3.0OCA.Sharing.ShareSearch initializedOCA.Sharing.ExternalLinkActions initializedOCA.Sharing.ExternalShareActions initializedProxying an event bus of version 3.0.2 with 1.3.0jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.OCA.Comments.View initializedHandlebars is deprecated: please ship your own, this will be removed in Nextcloud 20jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.[WARN] viewer: Some mimes were ignored because they are not enabled in the server previews configOCA.Viewer initializedProxying an event bus of version 3.0.2 with 1.3.0Proxying an event bus of version 3.0.2 with 1.3.0oc_appswebroots is deprecated: use OC.appswebroots instead, this will be removed in Nextcloud 20Proxying an event bus of version 3.0.2 with 1.3.0The `name` prop is required. Please migrate away from the deprecated `title` prop.The `name` prop is required. Please migrate away from the deprecated `title` prop.jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.Proxying an event bus of version 3.0.2 with 1.3.0session heartbeat polling startedProxying an event bus of version 3.0.2 with 1.3.0$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.Registering notifications container as a menu$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.Notifications permissions not yet requestedPolling interval updated to 30000Started background fetcher as session_keepalive is enabledResizeObserver loop completed with undelivered notifications.Got notification data, restoring default polling interval.$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.Failed to load resource: the server responded with a status of 404 (Not Found)Failed to load resource: the server responded with a status of 404 (Not Found)Failed to load resource: the server responded with a status of 404 (Not Found)Failed to load resource: the server responded with a status of 403 (Forbidden)[ERROR] photos: Failed to add IMG20230623110032.jpg to album TEST.Failed to load resource: the server responded with a status of 403 (Forbidden)
joshtrichards commented 12 months ago

Can you look in your Nextcloud logs for the error log entry corresponding with these steps?

G1FEF commented 12 months ago

Nothing until I changed log_level from 2 to 0 then I got the below. Not sure why only files from admin can be added to a photo album?

{"reqId":"G09esHgz6HODnNHH8qmH","level":0,"time":"2023-07-06T18:57:34+00:00","remoteAddr":"199.15.238.203","user":"admin","app":"webdav","method":"COPY","url":"/remote.php/dav/files/admin/Pictures/Friedrichshafen/2023-Friedrichshafen/Rosy/IMG20230623123132.jpg","message":"Can't add file to album, only files from admin can be added","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.1 Safari/605.1.15","version":"27.0.0.8","exception":{"Exception":"Sabre\DAV\Exception\Forbidden","Message":"Can't add file to album, only files from admin can be added","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":132,"function":"copyInto","class":"OCA\Photos\Sabre\Album\AlbumRoot","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":659,"function":"copy","class":"Sabre\DAV\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpCopy","class":"Sabre\DAV\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\DAV\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/photos/lib/Sabre/Album/AlbumRoot.php","Line":167,"message":"Can't add file to album, only files from admin can be added","exception":{},"CustomMessage":"Can't add file to album, only files from admin can be added"}}

On 6 Jul 2023, at 19:30, Josh Richards @.***> wrote:

Can you look in your Nextcloud logs for the error log entry corresponding with these steps?

— Reply to this email directly, view it on GitHub https://github.com/nextcloud/photos/issues/1917#issuecomment-1624137721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ5OVEXLFMDBZXEYB4R4MLXO375LANCNFSM6AAAAAAZ5SPOUM. You are receiving this because you authored the thread.

joshtrichards commented 11 months ago

Is some part of the path /Pictures/Friedrichshafen/2023-Friedrichshafen/Rosy/IMG20230623123132.jpg either a shared folder or a file uploaded by another user?

joshtrichards commented 11 months ago

Probably a duplicate of #1558

s1nistr4 commented 1 week ago

Nah this is a major issue, freshly installed Nextcloud and this doesn't work. This makes nextcloud photos unusable for any serious data storage because major, personal data is at the hands of lack of unit/e2e testing before release. It's literally impossible to miss this if any effort at all was put into testing it before shipping to the public.