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

[Bug] Viewer in public albums is broken #1452

Closed
nicokaiser opened this issue Nov 3, 2022 · 36 comments · Fixed by #1602
Closed

[Bug] Viewer in public albums is broken #1452

nicokaiser opened this issue Nov 3, 2022 · 36 comments · Fixed by #1602
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working feature: albums Related to the albums section

Comments

@nicokaiser
Copy link
Contributor

Describe the bug
When clicking on a thumbnail in public album view, the image is not loaded, but an error message "Error loading ..." is displayed.

The console reveals that the app is trying to load something like

https://nextcloud.example.com/apps/files_sharing/publicpreview/null?file=/photospublic/G3gmrpTgqfRLI1GA6RRG1yoyLoIhGyVM/275392-myimage.jpg&fileId=275392&x=2560&y=1440&a=true

which returns a 404 error.

To Reproduce
Steps to reproduce the behavior:

  1. Create an album
  2. Create a public link
  3. Open the link (in a fresh browser / incognito mode)
  4. Click on a thumbnail

Expected behavior
The image should be displayed

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

Server:

  • Nextcloud 25.0.1
@nicokaiser nicokaiser added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Nov 3, 2022
@nicokaiser nicokaiser changed the title Viewer in public albums is broken [Bug] Viewer in public albums is broken Nov 3, 2022
@ximmox
Copy link

ximmox commented Dec 9, 2022

Still the same on Nextcloud 25.0.2 released yesterday.

Sadly the long awaited "public albums" function for Photos is basically useless like this. 🙁

@nicokaiser
Copy link
Contributor Author

I'm not sure if this behaviour has been there before, but with 25.0.2, opening photos in the grid view of a public album now asks for HTTP Basic Auth credentials.

I do not want to sound rude, but has the public album feature ever been tested at all, before being released to the public (and announced as a major new feature in NC25!)? I really do not understand how this could make it into the "stable" version.

If there is any help I can provide (e.g. provide a test installation – however it is broken in the official Docker image, so this does not seem like an edge case), please let me know.

@ChristianHirsch
Copy link

I can confirm that it's still not working. In case you need a quick workaround and are using a nginx server, you can add the following to your Nextcloud nginx config:

location ~ ^/apps/files_sharing/publicpreview/null {
        if ($args ~ "^file=/photospublic/([a-zA-Z0-9]*)/([0-9]*).*$") {
                set $w1 $1;
                rewrite .* /apps/photos/api/v1/publicPreview/$arg_fileId?x=1080&y=1080&token=$w1? redirect;
        }
}

@DivineDominion
Copy link

Ran into this just today, too. Sharing a public link to an album shows the album just fine, but looking at the pictures requires HTTP BASIC AUTH.

@ProjektCamping
Copy link

to share Albums in Public is a really nice function. I am heading the same problem that if you click on the pic to get the full res. pic it is asking for a AUTH. Is there a workaround or solution?

@klauweg
Copy link

klauweg commented Dec 16, 2022

I can confirm this behaviour with 25.0.2. It's really a pitty that this long awaited feature is unusable.
Of course i can supply further information, logs etc. But since it is easy reproducible it may be not necessary anyway.

libf-de added a commit to libf-de/docker-nextcloud-fixes that referenced this issue Dec 23, 2022
libf-de added a commit to libf-de/docker-nextcloud-fixes that referenced this issue Dec 23, 2022
@libf-de
Copy link

libf-de commented Dec 23, 2022

I can confirm that it's still not working. In case you need a quick workaround and are using a nginx server, you can add the following to your Nextcloud nginx config:

location ~ ^/apps/files_sharing/publicpreview/null {
        if ($args ~ "^file=/photospublic/([a-zA-Z0-9]*)/([0-9]*).*$") {
                set $w1 $1;
                rewrite .* /apps/photos/api/v1/publicPreview/$arg_fileId?x=1080&y=1080&token=$w1? redirect;
        }
}

When running in Docker (and/or with reverse proxy), I had to add absolute_redirect off; in the location block to prevent redirection to the internal port

@Draluy
Copy link

Draluy commented Dec 26, 2022

Same here using 25.0.2. Basic auth asked, and "Error loading" message.

@avinashpudota
Copy link

I can confirm that it's still not working. In case you need a quick workaround and are using a nginx server, you can add the following to your Nextcloud nginx config:

Facing the same issue. Is there any workaround for Apache?
Thanks.

@bsaggy
Copy link

bsaggy commented Dec 29, 2022

Also hoping for a workaround in Apache.

@simonspa simonspa added 1. to develop Accepted and waiting to be taken care of feature: albums Related to the albums section and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Dec 31, 2022
@iamjameswalters
Copy link

iamjameswalters commented Jan 3, 2023

Glad to find and +1 this bug. @XorgMC that looks promising, does this mean a PR is coming soon?

Edit: sorry, just saw that was your workaround. Thought that the issue might be related to the AIO Docker image.

@ProjektCamping
Copy link

I can confirm that it's still not working. In case you need a quick workaround and are using a nginx server, you can add the following to your Nextcloud nginx config:

location ~ ^/apps/files_sharing/publicpreview/null {
        if ($args ~ "^file=/photospublic/([a-zA-Z0-9]*)/([0-9]*).*$") {
                set $w1 $1;
                rewrite .* /apps/photos/api/v1/publicPreview/$arg_fileId?x=1080&y=1080&token=$w1? redirect;
        }
}

For me that workaround is not working. Still asking for the log in :/

@kovlo
Copy link

kovlo commented Jan 12, 2023

For me that workaround is not working. Still asking for the log in :/

@ProjektCamping, in NGINX Proxy Manager I set the following and the proposed workaround works:

image

@jdaviescoates
Copy link

Great there are workarounds flying about that seem to be working for some, but given this is a major new app shipped by default I can't help wondering why actually fixing it isn't a higher priority 🤔

@darguez
Copy link

darguez commented Jan 17, 2023

It seems the bug is still there in v25.0.3 😔

@nicokaiser
Copy link
Contributor Author

Sorry to say it like this, but Nextcloud Photos seems to be completely abandoned. Features (like this one) are teased in press statements but do not work at all (not just in some rare edge cases), fixes are – if at all – included in the next major version (i.e. ~once a year).

Memories seem to be maintained much much better, but also is very limited feature-wise. It requires Photos to be installed for some features and also does not support public album links (only public folder links, which then are displayed grouped by month).

@jdaviescoates
Copy link

Sorry to say it like this, but Nextcloud Photos seems to be completely abandoned.

I'd agree that it is a bit crazy that a core feature in a new featured plugin just not working at all, and that it is really rather bad, but I'm not sure it's fair to say it's been completely abandoned given the last commit was only 7 hours ago.

@nicokaiser
Copy link
Contributor Author

Yes, the last commit was only 7 hours ago, but these commits are likely to not land in the next release (25.0.x) or in any minor or patch release, but only in the next major version (Nextcloud 26).

I know it might be unfair to say this is abandoned (it is not). However it is frustrating to see new features being only released as non-working UI skeletons which never worked and neither are fixed ASAP in a patch release. E.g. the public album feature should never have made it into the UI, it would be totally okay if it was greyed out and disabled. But adding a half-baked feature which breaks in production and produces unintuitive error messages is not the correct way IMHO.

@jdaviescoates
Copy link

jdaviescoates commented Jan 17, 2023

But adding a half-baked feature which breaks in production and produces unintuitive error messages is not the correct way IMHO.

I'd have to agree with that.

Photos mostly works great! But it's really disappointing sharing public folders just doesn't work at all.

I agree that they should've just never mentioned the public sharing feature, nor included it anywhere in the UI, until it actually worked.

@pulsejet
Copy link
Member

Memories seem to be maintained much much better, but also is very limited feature-wise. It requires Photos to be installed for some features and also does not support public album links (only public folder links, which then are displayed grouped by month).

FYI: Memories supports public album links now (v4.10+).

@darguez
Copy link

darguez commented Jan 18, 2023

OMG, this is really amazing @pulsejet!!! Thank you for your excellent work with Memories app!! 👏👏

@klauweg
Copy link

klauweg commented Jan 18, 2023

Yes, it looks promising. But as far as i can see the album feature in Memories depends on installed and activated Photos app. And so public shared album links do not work either.

EDIT: That is a special problem with an installation on synology-diskstation.

@kampfflunder
Copy link

Nope, public albums work for me. Both photos and memories need to be activated.

@darguez
Copy link

darguez commented Jan 18, 2023

Sharing albums via public link works like a charm for me with Memories v4.10+ and NC 25.0.3

@darguez
Copy link

darguez commented Jan 18, 2023

BTW, @pulsejet how difficult would be to add a password to increase the security of sharing an album via public link? It would be nice to have an additional security layer when you share sensitive photos (e.g. children's albums)

@Draluy
Copy link

Draluy commented Jan 18, 2023

BTW, @pulsejet how difficult would be to add a password to increase the security of sharing an album via public link? It would be nice to have an additional security layer when you share sensitive photos (e.g. children's albums)

Seconded, it would be nice :)

Btw, just tested public album sharing and it works perfectly, thanks.

@pulsejet
Copy link
Member

BTW, @pulsejet how difficult would be to add a password to increase the security of sharing an album via public link? It would be nice to have an additional security layer when you share sensitive photos (e.g. children's albums)

Opened an issue for this, but won't be trivial unless Photos supports this directly. Worst case we need yet another table to store the passwords; best case the hash can somehow be squeezed into the link token itself.

@devnull4242
Copy link

devnull4242 commented Jan 19, 2023

I can not understand why it can be a security issue. It is no problem to see the thumbnails but access the normal photos. Why does the access work when sharing images via "Files" (one file or the directory). Where is the difference?

Photos 2.0 (thumbnails ok, photos not ok)
https://i.imgur.com/1Ax7qP6.png

Files (thumbnails ok, photos ok)
https://i.imgur.com/wEuCap6.png

@ventoux84
Copy link

I want to share an album, but Nextcloud wants the user to log in when using the shared public link.
The mozaic is displayed, but a password is required when clicking on a thumbnail.
Nextcloud 25.0.3 - Photo 2.0.1
With "Firefox -safe-mode" the error message is :
"Erreur au chargement de ..."

With Chromium, it asks for user name and password in a popup window "Se connecter".

@simonspa
Copy link

Hi @ventoux84

Nextcloud 25.0.4 has been released yesterday, it contains the fix to correctly display public albums. :)

@ventoux84
Copy link

Thanks, it works after upgrade to 25.0.4.

@darguez
Copy link

darguez commented Feb 24, 2023

Awesome! Thanks!

@artonge, is it planed to allow setting a password in a near future to increase security?

@stefan-franz
Copy link

I i share a link of an album via public link (NC 25.0.4) everyone can remove images. I think that is a bug.

@devnull4242
Copy link

Yes. I think also it is a bug or a feature. I wrote an issue: #1655

@iamjameswalters
Copy link

Thanks so much to @starypatyk for working on this for us!

@starypatyk
Copy link
Contributor

@iamjameswalters Doing this for selfish reasons. 😉 I use Nextcloud myself...

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 feature: albums Related to the albums section
Projects
None yet
Development

Successfully merging a pull request may close this issue.