nextcloud / viewer

🖼 Simple file viewer with slideshow for media
GNU Affero General Public License v3.0
97 stars 55 forks source link

Viewer does not show images on public shared links 18.0.4 #500

Closed Grimmwicht closed 4 years ago

Grimmwicht commented 4 years ago

Describe the bug I recently updated my nextcloud instance from 16.x over 17.x to now 18.0.4. When I create a public link, the viewer opens but shows only an endless loading animation. Here is such a link: https://cloud.lightframefx.de/index.php/s/37qznEAKkJDGbkj

Since viewing functioned as expected some days before the update, I guess no server setting should be the problem. But since my Nextcloud instance lies on a shared hoster, I can't completely rule out that anything changed on the hosters side.

To Reproduce Steps to reproduce the behavior:

  1. Create a file folder
  2. Drop some images there
  3. Share the link publicly
  4. Click on any image

Expected behavior A lightbox should open so that anyone who gets the public link could watch and cycle through the images.

Screenshots When opening the link, console shows this: Screenshot_20200522_165250

There are some GET requests denied because of CSP, but they get loaded later (third screenshot), so I’d guess that that’s not the problem: Screenshot_20200522_165742-1 Screenshot_20200522_165908

After clicking one of the images, the network tab shows this error, and keeps showing the load animation forever: Screenshot_20200522_170358

Desktop (please complete the following information):

Smartphone (please complete the following information): Can't test at the moment.

Browser log Please also see attached screenshots.

Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert ("script-src"). content-script.js:40:65
JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js:2:551
Diese Seite verwendet die nicht standardisierte Eigenschaft "zoom". Stattdessen sollte calc() in den entsprechenden Eigenschaftswerten oder "transform" zusammen mit "transform-origin: 0 0" verwendet werden. addStylesClient.js:220:17
Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 2 globals.js:66:15
OCA.Viewer initialized Viewer.js:41:10
The humanFileSize library is deprecated! It will be removed in nextcloud 19. 3 globals.js:66:15
Opening the viewer with a single string parameter is deprecated. Please use a destructuring object instead OCA.Viewer.open({ path: '/Friedwald_DSC_5693_morguefile_small.jpg' }) Viewer.js:97:11
Opening viewer for file  /Friedwald_DSC_5693_morguefile_small.jpg Viewer.vue:219
Error: "Request failed with status code 401"
    exports createError.js:16
    exports settle.js:17
    onreadystatechange xhr.js:61
Viewer.vue:391
OC.requestToken changed tW8TR6PYn2jTQqy21Swn35kl13xeKGLb9GGwRCk2qJg=:hTV2I9Dh8imHL+GdrXYShutLhTg6Swm+tQX6KH1FxPQ= index.js:281:9
OC.requestToken changed 1YyRpnJ7RTL+eRTpzEt72FYAjVFynOMcnPcbeXmhtWE=:5db0wgFCKHOqFFnCtBFOgSRu3xUW/4h53ZNRFS3S2Q0= index.js:281:9
OC.requestToken changed /zr0zC4PCAqTcMRPFYVIQNyzIiLXvRfkNJIpAyLVzII=:z2CRqF02ZUvHHYlkbd99Ga7dcGaz3nyBdfZjb3amoO4=
szaimen commented 4 years ago

https://github.com/nextcloud/server/issues/20132#issue-586804521

You have to enable the sharing option: "Allow users on this server to send shares to other servers" Then it will work.

Grimmwicht commented 4 years ago

Well, yeah, that did the trick. Kind of illogical, because I didn't change any options, and it worked before the update, but I can follow the arguments on the thread you posted. So thank you very much!