LycheeOrg / Lychee-Docker

Docker image for Lychee
https://lycheeorg.github.io/
165 stars 56 forks source link

Lychee gallery not working anymore after recent update. #171

Closed sloniupl closed 8 months ago

sloniupl commented 8 months ago

I'm using watchtower to update my containers and all containers of lychee (image: lycheeorg/lychee:latest) that i have are broken since update yesterday.

containers are starting correctly but the website is displayed like that (on every instance):

image

I did try to get it back to version v4.13.0 but it's only showing migrate website and not working also.

Any ideas what changed and why it's not working correctly now. Logs don't show anything wrong:

-------------------------------------
  _               _                
 | |   _   _  ___| |__   ___  ___  
 | |  | | | |/ __|  _ \ / _ \/ _ \ 
 | |__| |_| | (__| | | |  __/  __/ 
 |_____\__, |\___|_| |_|\___|\___| 
       |___/                       
-------------------------------------
Lychee Version: 5.0.0 (release)
Lychee Commit:  f3be74f
https://github.com/LycheeOrg/Lychee/commit/f3be74fa2f28ab54bf51ad3c53fc83de03af80e8
-------------------------------------
**** Delaying startup (30 seconds)... ****
**** Make sure the /conf /uploads /sym /logs folders exist ****
**** Create the symbolic link for the /uploads folder ****
**** Create the symbolic link for the /sym folder ****
**** Create the symbolic link for the /logs folder ****
**** Copy the .env to /conf ****
**** Inject .env values ****
**** Make sure user.css exists and symlink it ****
**** Make sure custom.js exists and symlink it ****
**** Create user and use PUID/PGID ****
    User UID :  1000
    User GID :  1000
**** Make sure Laravel's log exists ****
**** Set Permissions ****
**** Start cron daemon ****
Starting periodic command scheduler: cron.
**** Setup complete, starting the server. ****
127.0.0.1 - - [26/Dec/2023:18:23:08 +0000] "GET / HTTP/1.1" 500 2081 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:23:39 +0000] "GET / HTTP/1.1" 500 2081 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:24:09 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:24:40 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:25:11 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:25:42 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:26:12 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:26:42 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:27:12 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:27:42 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:28:13 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:28:43 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:29:13 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:29:43 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:30:13 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:30:44 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:31:14 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:31:44 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:32:14 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:32:45 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
127.0.0.1 - - [26/Dec/2023:18:33:15 +0000] "GET / HTTP/1.1" 302 354 "-" "curl/7.88.1" "-"
172.30.0.1 - - [26/Dec/2023:18:33:23 +0000] "GET / HTTP/1.1" 302 422 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "192.168.1.1"
172.30.0.1 - - [26/Dec/2023:18:33:23 +0000] "GET /gallery HTTP/1.1" 200 29034 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "192.168.1.1"
172.30.0.1 - - [26/Dec/2023:18:33:23 +0000] "GET /img/no_images.svg HTTP/1.1" 200 337 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "192.168.1.1"
172.30.0.1 - - [26/Dec/2023:18:33:23 +0000] "GET /livewire/livewire.js?id=f121a5df HTTP/1.1" 200 320657 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "192.168.1.1"
ildyria commented 8 months ago

You should try the tag 5.0.0 instead. I don't think nightly has been updated correctly yet.

Can you check your developer console in your browser what is blocking the css and JS ? That smells like CSP.

In the mean time you can disable the new front-end by setting in your .env :

LIVEWIRE_ENABLED=false
sloniupl commented 8 months ago

Thanks for quick reply, i was trying to set up image: lycheeorg/lychee:v5.0.0 and as you suggested LIVEWIRE_ENABLED=false in env but still not working. Interesting when i try to open it using the direct port for local network bypasing Nginx Proxy Manager looks like it is working but not via nginx proxy manager translation. This is how it looks when accessing directly via local ip:port : image

sloniupl commented 8 months ago

Looks like i needed to add to my compose yaml file this option:

Now the page loads correctly but when i wan to open as a not logged user an album that is set to public and password protected i get this: image

ildyria commented 8 months ago

Hoho, I'll check that one.

ildyria commented 8 months ago

BTW from the broken thumbnails, it seems that your APP_URL are not set properly or that you have LYCHEE_UPLOAD_URL= left empty in your .env.

sloniupl commented 8 months ago

Now it works correctly after i added TRUSTED_PROXIES=*

Before it was not working as i was testing it from container ip:port and not the domain it is configured for that is specified in Nginx Proxy Manager. Now it loads correctly: image

The only issue is that i can't access public albums that are password protected (if album is not password protected it works correctly): image

sloniupl commented 8 months ago

On some lychee galleries that i host i had to also do fastcgi_param HTTPS on; in manually /etc/nginx/nginx.conf as suggested here: https://github.com/LycheeOrg/Lychee/issues/2106#issuecomment-1869746168 Despite already adding TRUSTED_PROXIES=* in my compose yaml file. After doing those two things my galleries started working with only the password protected issue that you are working on already.

Hope this info will help and maybe we can add fastcgi_param HTTPS on; to nginx.conf

d7415 commented 8 months ago

maybe we can add fastcgi_param HTTPS on; to nginx.conf

I'm not ruling it out, but certainly not adding it yet. That and the `TRUSTED_PROXIES=*" are workarounds, not solutions.