photos icon indicating copy to clipboard operation
photos copied to clipboard

404 on Image Previews

Open rawiweb opened this issue 1 year ago • 13 comments

Describe the bug Photo app Produces tons of 404 not found in Preview image files

To Reproduce Steps to reproduce the behavior:

  1. Go to '...' Photos in nextcloud
  2. Click on '....' Any Album or just the overview
  3. Scroll down to any place, it won*t show any picture
  4. See error No image Previews are shown instead tons og 404 Errors in console log

Expected behavior Preview images to show

Linux Server Apache / nginx php8.3 / [Nextcloud Hub 9] (30.0.1) Image The URL to the preview not found images would be <DOMAIN>/index.php/apps/photos/api/v1/preview/

rawiweb avatar Oct 21 '24 09:10 rawiweb

Same issue here but the 404s are SEARCH calls to /remote.php/dav/

As a workaround, navigating to my photo directory in "/apps/photos/folders" instead of "/apps/photos/photos" seems to display previews fine.

(Linux, Apache, PHP 8.2.24, Nextcloud 30.0.1, Photos 3.0.2)

aglidden avatar Oct 22 '24 18:10 aglidden

Same issue here but the 404s are SEARCH calls to /remote.php/dav/

As a workaround, navigating to my photo directory in "/apps/photos/folders" instead of "/apps/photos/photos" seems to display previews fine.

(Linux, Apache, PHP 8.2.24, Nextcloud 30.0.1, Photos 3.0.2)

In that case previews on photos an folders are displayed for a very short time until there is a 404 in XHR requests from core, then Images vanish alongside with javascript errors. Image Image

rawiweb avatar Oct 23 '24 07:10 rawiweb

So finally I tested something, I created a new NC instance on a subdomain, everything worked Then I connected Database and Data Directory of the not working Instance and ....... (listen to the drums) All was Broken again :-D So I guess it is NC Upgrade data shit migration what causes the trouble. It happened when I upgraded recently from 27 to 28,29,30

rawiweb avatar Oct 23 '24 13:10 rawiweb

That upgrade path is what I did to get here as well. Could you please reopen the issue, I'm hoping for a fix that doesn't involve creating a whole new instance.

aglidden avatar Oct 23 '24 18:10 aglidden

That upgrade path is what I did to get here as well. Could you please reopen the issue, I'm hoping for a fix that doesn't involve creating a whole new instance.

sure, but actually it is a data migration problem what might or might not be in the core or whereever upgrade process

rawiweb avatar Oct 23 '24 18:10 rawiweb

Might be linked to https://github.com/nextcloud/photos/issues/141

Had the same issue with repeating 404 calls to remote.php/dav/ seemingly after upgrading from 28.0.10 to 29.0.8. Turned out that the config of the photos app was configured to use the default "Photos" as a media folder which was not present in the filesystem. Fixed by setting the correct media folder.

jkahrs avatar Oct 31 '24 17:10 jkahrs

Do you have any path to the config of the photos app and/or the "Photos" dir in the filesystem? I put P/photos in the data dir where the users data lives with no effect.

rawiweb avatar Oct 31 '24 17:10 rawiweb

Had the same issue with repeating 404 calls to remote.php/dav/ seemingly after upgrading from 28.0.10 to 29.0.8. Turned out that the config of the photos app was configured to use the default "Photos" as a media folder which was not present in the filesystem. Fixed by setting the correct media folder.

Oh, hey! That fixed it for me. Thank you so much, @jkahrs! @sambibot, I just clicked "Photo settings" in the bottom left of /apps/photos/ and under "Media folder" added the correct folder. That must have changed during the upgrade.

aglidden avatar Nov 01 '24 05:11 aglidden

nope, that did not solve it for me, the setting was right, the folder existed, I chose another folder with pics in it, deleted the other and still /index.php/apps/photos/api/v1/preview/768?etag=8dee73c4145ef303badb0cc1291f12c9&x=64&y=64 404, it returns an empty json []

rawiweb avatar Nov 01 '24 10:11 rawiweb

Also I found this: Error index Exception: OCA\Photos\Album\AlbumFile::__construct(): Argument #2 ($name) must be of type string, null given, 2024-11-01T11:00:30+00:00
called in ..../cloud/apps/photos/lib/Album/AlbumMapper.php on line 235 in file
'..../cloud/apps/photos/lib/Album/AlbumFile.php' line 17 at
lib/private/AppFramework/Http/Dispatcher.php line 146
My guess it is a mess in the filechach table

rawiweb avatar Nov 01 '24 15:11 rawiweb

Possibly related/duplicate:

  • #2677
  • #1398

joshtrichards avatar Mar 09 '25 15:03 joshtrichards

Might be linked to #141

Had the same issue with repeating 404 calls to remote.php/dav/ seemingly after upgrading from 28.0.10 to 29.0.8. Turned out that the config of the photos app was configured to use the default "Photos" as a media folder which was not present in the filesystem. Fixed by setting the correct media folder.

Had a similar problem. When upgraded a "Photos" folder appeared in the root of the files which was empty. The Photos app had the configuration to get the entries from that empty folder and that was creating a loop of requests with a 404 http status code.

It got fixed when I removed that folder from the Photos app config

suditugeorge avatar Apr 26 '25 06:04 suditugeorge

Hey guys, I wanted to share my little "discovery" maybe this helps other people.

So, previews were working fine, but for images only. When I tried adding previews for videos I added enable_previews => true in config/config.php I forgot to explicitly add some preview providers in enabledPreviewProviders.

So, just a small hint, maybe check your configuration for previews.

More info

Oh and by the way, I have completely commented out these explicit configurations for previews. For video previews I just installed ffmpeg and everything started working. Thank you everyone.

NikolozCh avatar Jul 04 '25 13:07 NikolozCh