linuxserver / docker-lychee

GNU General Public License v3.0
45 stars 16 forks source link

[BUG] Added pictures do not show within Web GUI, however no upload error is shown #77

Closed h3rb1n4t0r closed 9 months ago

h3rb1n4t0r commented 10 months ago

Is there an existing issue for this?

Current Behavior

Pictures are uploaded without printing any error, but no thumbnail is shown. Pictures can be clicked upon, but are not shown. ncdu indicates that files have been uploaded to the specified /pictures path. I am not using the reverse proxy on swag (yet) and accessing the container via IP:80. Download of Pictures to a client works.

Screenshot_20231227_111645 Screenshot_20231227_111715

Diagnostics from the container Web GUI show the following:

    Diagnostics
    -----------
        Warning: Dropbox import not working. dropbox_key is empty.
        Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.
        Error: APP_URL does not match the current url. This will break WebAuthn authentication. Please update APP_URL to reflect this change.
        Info: Latest version of PHP is 8.3
        Error: /app/www/.git (and subdirectories) are not executable, check the permissions
         Foreign key: access_permissions.user_id     → users.id             : CASCADE
         Foreign key: albums.parent_id               → albums.id            : RESTRICT
         Foreign key: albums.id                      → base_albums.id       : RESTRICT
         Foreign key: albums.cover_id                → photos.id            : CASCADE
         Foreign key: base_albums.owner_id           → users.id             : RESTRICT
         Foreign key: jobs_history.owner_id          → users.id             : RESTRICT
         Foreign key: photos.album_id                → albums.id            : RESTRICT
         Foreign key: photos.owner_id                → users.id             : RESTRICT
         Foreign key: size_variants.photo_id         → photos.id            : RESTRICT
         Foreign key: sym_links.size_variant_id      → size_variants.id     : RESTRICT
         Foreign key: tag_albums.id                  → base_albums.id       : RESTRICT

Expected Behavior

If I upload a picture, a thumbnail should be generated and visible. I should be able to view the full picture by clicking on it.

Steps To Reproduce

  1. Install Lychee via Docker-Compose
  2. Setup Admin Account
  3. Upload Pictures
  4. /pictures can be set for actual VM disk or passed through disk, results in the same

Environment

- OS: Debian 12 VM & Debian 12 Docker LXC on Proxmox VE 8.1.3
- How docker service was installed: VM = Official Convenience Script / LXC = Pre-installed

CPU architecture

x86-64

Docker creation

version: "3"
services:
  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: lychee_mariadb
    restart: always
    volumes:
      - ./mariadb:/config
    environment:
      - MYSQL_ROOT_PASSWORD=masked
      - MYSQL_DATABASE=lychee
      - MYSQL_USER=lychee
      - MYSQL_PASSWORD=masked
      - PGID=1000
      - PUID=1000
      - TZ=Europe/Zurich

  swag:
    image: lscr.io/linuxserver/swag:latest
    container_name: swag
    cap_add:
      - NET_ADMIN
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Zurich
      - URL=masked
      - VALIDATION=dns
      - SUBDOMAINS=wildcard #optional
      - CERTPROVIDER=cloudflare #optional
      - DNSPLUGIN=cloudflare #optional
      #- PROPAGATION= #optional
      - EMAIL=masked #optional
      - ONLY_SUBDOMAINS=false #optional
      #- EXTRA_DOMAINS= #optional
      - STAGING=false #optional
    volumes:
      - ./swag:/config
    ports:
      - 53443:443
      #- 80:80 #optional
    restart: unless-stopped

  lychee:
    image: lscr.io/linuxserver/lychee:latest
    container_name: lychee
    restart: always
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
    depends_on:
      - mariadb
    volumes:
      - ./lychee:/config
      - /mnt/crucial/pictures:/pictures
    environment:
      - DB_CONNECTION=mysql
      - DB_HOST=mariadb
      - DB_PORT=3306
      - DB_USERNAME=lychee
      - DB_PASSWORD=masked
      - DB_DATABASE=lychee
      - PGID=1000
      - PUID=1000
      - TZ=Europe/Zurich
    ports:
      - 80:80

  watchtower:
      image: containrrr/watchtower
      container_name: watchtower
      volumes:
         - /var/run/docker.sock:/var/run/docker.sock
      environment:
         - TZ=Europe/Zurich
         - WATCHTOWER_CLEANUP=true
         - WATCHTOWER_SCHEDULE=0 0 0 4 * *
         - WATCHTOWER_LABEL_ENABLE=true
      restart: unless-stopped

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /config/keys
**** Make sure the uploads (pictures), sym, and logs folders exist ****
**** Create the symbolic link for the uploads folder ****
cp: not replacing '/pictures/import/index.html'
cp: not replacing '/pictures/medium/index.html'
cp: not replacing '/pictures/medium2x/index.html'
cp: not replacing '/pictures/original/index.html'
cp: not replacing '/pictures/small/index.html'
cp: not replacing '/pictures/small2x/index.html'
cp: not replacing '/pictures/thumb/index.html'
cp: not replacing '/pictures/thumb2x/index.html'
cp: not replacing '/pictures/tracks/index.html'
**** Create the symbolic link for the sym folder ****
cp: not replacing '/config/sym/empty_file'
**** Create the symbolic link for the logs folder ****
cp: not replacing '/config/logs/empty_file'
**** Create user.ini for php settings ****
cp: not replacing '/config/user.ini'
Connection to mariadb (172.22.0.2) 3306 port [tcp/mysql] succeeded!
**** Copy the .env to /config ****
**** Inject .env values ****
**** Generate the key (to make sure that cookies cannot be decrypted etc) ****

                           APPLICATION IN PRODUCTION.                           

   WARN  Command cancelled.  

**** Migrate the database ****

   INFO  Nothing to migrate.  

**** Make sure user.css exists and symlink it ****
**** Make sure custom.js exists and symlink it ****
**** Make sure Laravel's log exists ****
**** Set Permissions ****
[custom-init] No custom files found, skipping...
[ls.io-init] done.

   INFO  No scheduled commands are ready to run.  

   INFO  No scheduled commands are ready to run.  

   INFO  No scheduled commands are ready to run.  

   INFO  No scheduled commands are ready to run.
github-actions[bot] commented 10 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

h3rb1n4t0r commented 10 months ago

Ubuntu 22.04 LXC instead of Debian 12 did not work either. I also altered the DB password to not include any special characters which it did before (docker-compose did not want to up -d the stack due to MYSQL Password Variable, but docker compose did it anyway before). Permissions on the /pictures are set to

drwxr-xr-x 12 $USER $USER 4096 Dec 27 12:53 pictures/

Update: Installing the same docker-compose.yaml on a completely different Debian 12 Host (Bare Metal on my desktop machine) leads to the same results. My Pi-Holes are not indicating any blocked domains when querying Lychee.

Please let me know in case further information about environment, logs or similar are needed.

drizuid commented 10 months ago

as noted https://discord.com/channels/354974912613449730/1189302179325018182 we are unable to replicate the issue. This is also the ONLY user reporting this issue.

StefanescuCristian commented 10 months ago

I think I'm having the same issue. Updated to the latest tag yesterday, and the galley shows this instead of actual images:

image

Clicking on an album does nothing:

image
h3rb1n4t0r commented 10 months ago

As communicated by @drizuid

the csp doesn't allow loading from non-self in v5. this new csp policy isn't listed in the upstream project's documentation at all. so we will address it in OUR docs

Fixed by adding the following to environment:

- APP_URL=http://IP:80/

Leaving open as a PR will be tied to it.

drizuid commented 10 months ago

note that if you access via reverse proxy, your APP_URL should reflect that address instead. Do note the upload issues with lycheev5 via reverse proxy, it is an open issue still with the main project

LinuxServer-CI commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 8 months ago

This issue is locked due to inactivity