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

404 on Image Previews #2690

Open
sambibot opened this issue Oct 21, 2024 · 10 comments
Open

404 on Image Previews #2690

sambibot opened this issue Oct 21, 2024 · 10 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@sambibot
Copy link

sambibot commented Oct 21, 2024

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/

@sambibot sambibot added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Oct 21, 2024
@aglidden
Copy link

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
Copy link
Author

sambibot commented Oct 23, 2024

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
Copy link
Author

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
Copy link

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 sambibot reopened this Oct 23, 2024
@sambibot
Copy link
Author

sambibot commented Oct 23, 2024

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
Copy link

jkahrs commented Oct 31, 2024

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.

@sambibot
Copy link
Author

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
Copy link

aglidden commented Nov 1, 2024

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.

@sambibot
Copy link
Author

sambibot commented Nov 1, 2024

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 []

@sambibot
Copy link
Author

sambibot commented Nov 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants