nextcloud / photos

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

404 on Image Previews #2690

Open sambibot opened 1 week ago

sambibot commented 1 week ago

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

/index.php/apps/photos/api/v1/preview/
aglidden commented 1 week ago

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)

sambibot commented 1 week ago

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

sambibot commented 1 week ago

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

aglidden commented 1 week ago

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.

sambibot commented 1 week ago

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

jkahrs commented 15 hours ago

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.

sambibot commented 14 hours ago

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.

aglidden commented 3 hours ago

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.