jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.35k stars 1.26k forks source link

Errors in editing library should produce an error message #1012

Open jahmad opened 4 years ago

jahmad commented 4 years ago

Describe the bug Trying to change library settings, only results loading symbol forever, no changes happen.

System (please complete the following information):

To Reproduce

  1. Go to Dashboard -> Library
  2. Pick a library
  3. Click on three dots
  4. Select manage library
  5. Change some setting, Click OK
  6. Loading symbol keep spinning, no changes happened on settings.

Expected behavior Setting changes

Logs Browser console game me this error:

 Uncaught Error: null name
    at ApiClient.updateVirtualFolderOptions (apiclientcore.js?v=10.5.0:883)
    at HTMLButtonElement.onEditLibrary (medialibraryeditor.js?v=10.5.0:14)
ApiClient.updateVirtualFolderOptions @ apiclientcore.js?v=10.5.0:883
onEditLibrary @ medialibraryeditor.js?v=10.5.0:14
Artiume commented 4 years ago

Were you trying to rename the library?

jahmad commented 4 years ago

Nope, I was trying to disable inotify. I've tried it a few times, even doing nothing and go straight to clicking OK. results is the same.

jahmad commented 4 years ago

OK, found the culprit, my own mistake.

So i changed installation from official image to linuxserver image (playing out with /dev/dri permissions), and moved folders around due to different directory layout.

this issue came from different root path on metadata record (/config/root) with actual path (/config/data/root). trying symlink to fix it doesn't help.

so, new question: where is this record located? is there a quicker way to change this instead of rebuilding the whole library?

last, feel free to close this issue, consider my request has changed to "please make a clearer error message."

thank you.

Artiume commented 4 years ago

One of the things I want to fix is the disparity between our image and the linuxserver image. I'd like to be able to freely switch between images.

If you want to use HWA with our image, you can but you need to drop your compose to v2 and use user: 1000:1000 and group_add: 44 (or whatever group is video uses)

jahmad commented 4 years ago

Ah! so there is group_add on older compose file version.. thank you for the hint.

jahmad commented 4 years ago

decoding works but not encoding.

card0 and renderD128 owned by different group, video(44) and render(107). I think there is a need for both group existed inside the container for add_group to works.

I'll go back to linuxserver image for now and deal with consequence of moving folder around.

Artiume commented 4 years ago

Hm, what if you add the render to the video group on the host?

You can also try 44,107 iirc you can add multiple groups at once

jahmad commented 4 years ago

I've added both gids to group_add, but since there is no group with gid 107 inside the container, there is no effect.

I believe linuxserver workaround this problem by adding new group in their startup.

as for changing device permission directly, I don't think I want to mess around with udev rules, don't have enough knowledge on it.

Artiume commented 4 years ago

Can I see your compose?

I was thinking about it. Instead of manually moving all on your files, you could mount each folder explicitly. This'll dirty up the compose a bit but it'd be an easy template to convert between the two images.

jahmad commented 4 years ago

official image:

version: "2"

services:
  jellyfin:
    container_name: jellyfin
    image: jellyfin/jellyfin:latest
    network_mode: host
    logging:
      options:
        tag: jellyfin
    user: 120:120
    group_add:
    - 44
    - 107
    devices:
    - /dev/dri:/dev/dri
    volumes:
    - /srv/jellyfin:/config:rw
    - /data/media:/data/media:ro
    restart: unless-stopped

linuxserver image

version: "3"

services:
  jellyfin:
    container_name: jellyfin
    image: linuxserver/jellyfin:latest
    network_mode: host
    logging:
      options:
        tag: jellyfin
    environment:
    - PUID=120
    - PGID=120
    - TZ=Asia/Jakarta
    - UMASK_SET=022
    devices:
    - /dev/dri:/dev/dri
    volumes:
    - /srv/jellyfin-ls:/config:rw
    - /data/media:/data/media:ro
    restart: unless-stopped

(edit path to avoid confusion)

Artiume commented 4 years ago

You should be able to add /dev/card0 as a device alongside /dev/dri

You can also add the TZ:TZ env tag to the JF/JF image.

What's your ram like? You can pass /dev/shm:/transcodingfolder of you'd like a ram disk that is allowed up to 50% system ram.

If you have the time, can you document the Path file changes you have to make? I'll be able to add a template a lot faster if I know where to look :)

jahmad commented 4 years ago

env TZ is available in official image, nice to know.

alongside, why though? using /dev/dri already add both card and render device.

only using 6G out of 16G ram, but i don't think there is a need to move out transcode dir for now, probably later.

path changes:

jellyfin/config/* -> linuxserver/
jellyfin/data     -> linuxserver/data/data
jellyfin/metadata -> linuxserver/data/metadata
jellyfin/root     -> linuxserver/data/root
Artiume commented 4 years ago

Ah, mine is located at /dev/card0, not /dev/dri/card0

I wonder what needs to be done to fix the group issue?

Thanks for the paths :)

JustAMan commented 4 years ago

@jahmad I've edited your issue title (to request an error message) and transferred to the repo that I think is responsible for the issue you're seeing.

stale[bot] commented 4 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.

joshuaboniface commented 6 months ago

This is definitely still relevant, as seen in jellyfin/jellyfin#12100. Any errors should generate a valid error popup to indicate what's (possibly) going wrong rather than silently dying with a spinner.