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

Edit Library can't save #4945

Open
Mars160 opened this issue Nov 7, 2023 · 5 comments · May be fixed by jellyfin/jellyfin#11520
Open

Edit Library can't save #4945

Mars160 opened this issue Nov 7, 2023 · 5 comments · May be fixed by jellyfin/jellyfin#11520
Labels
bug Something isn't working
Milestone

Comments

@Mars160
Copy link

Mars160 commented Nov 7, 2023

Describe The Bug

I edited a library and click the submit button, and there is a blue circle means loading.
And the circle is always here not disappear.
The chrome console said:
image

Steps To Reproduce

  1. Go to 'Console'
  2. Click on 'Library'
  3. Choose a library and click manage the library
  4. Cancel some metadata downloader
  5. submit
  6. See error

Expected Behavior

It should save it and take effect.

Logs

image

Screenshots

image

System (please complete the following information):

  • Platform: Windows
  • Browser: Chrome
  • Jellyfin Version: 10.8.12.0

Additional Context

@Mars160 Mars160 added the bug Something isn't working label Nov 7, 2023
@dmitrylyzo
Copy link
Contributor

dmitrylyzo commented Nov 7, 2023

For those who want to reproduce the "null name".
I was able to get such broken state on an unstable server with Skia update (the one that crashes).
When you create a library, the server creates a folder for it (in /data/root/default/) and crashes. We see the new library, but it has no id (="null name").

Btw, #1012

@Mars160 Mars160 closed this as completed Jan 10, 2024
@joshuaboniface
Copy link
Member

joshuaboniface commented Apr 20, 2024

Ran into this as well using the latest unstables (10.9.0, build version 2024041505) after upgrading my instance from 10.8.13 (and previous versions).

The issue was that the Path entries in the TypedBaseItems table of the library.db for each library did not match the actual filesystem paths.

My data is in /srv/jellyfin, with a symlink from /var/lib/jellyfin to /srv/jellyfin, which seemed to be enough in 10.8.z. But this resulted in TypedBaseItems entries that looked like this:

sqlite> SELECT Path FROM TypedBaseItems WHERE Path LIKE '%/jellyfin/root/default/%';
/var/lib/jellyfin/root/default/Collections
/var/lib/jellyfin/root/default/Movies
/var/lib/jellyfin/root/default/Music
/var/lib/jellyfin/root/default/Shows
/var/lib/jellyfin/root/default/YouTube

I suspect due to having the data directory path configured wrong when initially setting up the libraries.

Manually updating these DB entries to the correct paths corrected the issue (i.e. UPDATE TypedBaseItems SET Path='/srv/jellyfin/root/default/Collections' WHERE Path='/var/lib/jellyfin/root/default/Collections; et al.). I no longer get the "null name" error and library settings save correctly.

@joshuaboniface
Copy link
Member

At this point in the release cycle, I think this is probably an esoteric enough issue to leave as-is for now. We should definitely improve the error handling portion, but the actual bug we'll have to evaluate after release to see if it's majorly affecting people and fix it if so.

@gnattu
Copy link
Member

gnattu commented May 9, 2024

Ran into this as well using the latest unstables (10.9.0, build version 2024041505) after upgrading my instance from 10.8.13 (and previous versions).

The issue was that the Path entries in the TypedBaseItems table of the library.db for each library did not match the actual filesystem paths.

My data is in /srv/jellyfin, with a symlink from /var/lib/jellyfin to /srv/jellyfin, which seemed to be enough in 10.8.z. But this resulted in TypedBaseItems entries that looked like this:

sqlite> SELECT Path FROM TypedBaseItems WHERE Path LIKE '%/jellyfin/root/default/%';
/var/lib/jellyfin/root/default/Collections
/var/lib/jellyfin/root/default/Movies
/var/lib/jellyfin/root/default/Music
/var/lib/jellyfin/root/default/Shows
/var/lib/jellyfin/root/default/YouTube

I suspect due to having the data directory path configured wrong when initially setting up the libraries.

Manually updating these DB entries to the correct paths corrected the issue (i.e. UPDATE TypedBaseItems SET Path='/srv/jellyfin/root/default/Collections' WHERE Path='/var/lib/jellyfin/root/default/Collections; et al.). I no longer get the "null name" error and library settings save correctly.

This is super duper weird. I just looked at the code and the returned library info is indeed derived from the stored library path, and will be incomplete if the path does not match. The problem is, such matching mechanism is very, very old and is actually emby code. I have no idea why this ever worked in 10.8. My guessing is that this could be a migration issue that the path is updated wrong, but it is only guessing.

@joshuaboniface
Copy link
Member

Agreed there, not sure how it worked fine before. I think we can leave the fix pending for 10.9.1 and see if we really need it based on real-world reports after 10.9.0 drops.

@thornbill thornbill modified the milestones: v10.9.0, v10.9.2, v10.9.3 May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Release 10.9.z
  
To do
Development

Successfully merging a pull request may close this issue.

5 participants