mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[Issue]: Database migration fails 10.9.0.0 #5685
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @michal4132 on GitHub (May 11, 2024).
Please describe your bug
After upgrading from 10.8.13 to 10.9.0 the database migration fails due to empty rating string.
Reproduction Steps
Upgrade to 10.9.0 with empty ratings in DB
Jellyfin Version
10.9.0
if other:
No response
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@jellyfin-bot commented on GitHub (May 11, 2024):
Hi, it seems like your issue report has the following item(s) that need to be addressed:
This is an automated message, currently under testing. Please file an issue here if you encounter any problems.
@yodatak commented on GitHub (May 11, 2024):
I got the same issue too
@crobibero commented on GitHub (May 12, 2024):
I can't reproduce the issue with empty rating rating in my database, any chance either of you can send me your library.db? team@jellyfin.org
@yodatak commented on GitHub (May 12, 2024):
Thanks @crobibero just send my 300mb library ;)
@mateuszkozakiewicz commented on GitHub (May 12, 2024):
Same problem here, can't roll back either to
10.8.13@nielsvanvelzen commented on GitHub (May 12, 2024):
We do not support downgrading, you need to restore your backup when you do so. This issue will be fixed with 10.9.1 though.
@sejmann commented on GitHub (May 12, 2024):
Is this issue related to a popup saying "Jellyfin Server was unable to properly migrate old directories" -- google and searching the various jellyfin repos didn't turn up any substrings about migrating old directories. I'm thinking it's a different issue, because it didn't write anything to the logs, and didn't prevent downgrading to prior working version.
@nielsvanvelzen commented on GitHub (May 12, 2024):
This seems to be related specifically to the macOS app, please open an issue here: https://github.com/jellyfin/jellyfin-server-macos
@lockheed commented on GitHub (May 12, 2024):
When do you estimate 10.9.1 docker image to be released?
@nielsvanvelzen commented on GitHub (May 12, 2024):
When it's ready, probably in a week or so
@Expro commented on GitHub (May 12, 2024):
I hit the same issue. Week or so... time to roll second instance.
@mateuszkozakiewicz commented on GitHub (May 12, 2024):
A minute of silence for all those using watchtower or renovate and have no backups [*]
@Absent1337 commented on GitHub (May 12, 2024):
I have exactly the same issue
@MarioSob commented on GitHub (May 12, 2024):
Same problem here. Kind of hoping for hotfix release soon or at least providing a workaround (manual file edit or something).
@unikitty37 commented on GitHub (May 12, 2024):
I have restored my backup and downgraded to 10.8.13, and now the server refuses to start, and the logs are just filled with this over and over:
I can't find any clear solution on how to fix this — most advice I see seems to be about clearing cookies and site data, and I've already done this. And now, despite having a fully-restored backup, it wants me to create the library and the user from scratch.
It would really help if the release could be sooner, even if this critical bugfix (preventing people's servers from starting seems pretty critical to me 😁) was the only thing in it.
I don't know how much is involved in making a Jellyfin release, of course — I've just looked at the README to try and work out how to make my own build for now, and I'm none the wiser. I don't even know if you can build it on macOS. (This is where interpreted languages score, of course — I could just shell into the Docker container, apply the patch, and be up and running!)
BTW, a word of warning for anybody thinking of leaving Jellyfin running while they're waiting for the new release — it creates a backup of the library database each time it tries to run the migration, which is about every three or four minutes. You will end up with a very full disk if you leave it for too long!
@Dr-Axen commented on GitHub (May 12, 2024):
I have the same issue.
Is there any workaround other than downgrading or waiting for a fix? Anything that can be done from the command line since the Jellyfin does not start? For example, I fine with removing all libraries and re-adding them, but I would not want to lose all user data.
@Expro commented on GitHub (May 12, 2024):
Thanks for the warning! My Kubernetes cluster already restarted it 53 times...
@nielsvanvelzen commented on GitHub (May 12, 2024):
Normally we'd wait about a week for a patch version but considering this issue affects quite a large group we'll try to get it out a bit sooner. That could be today/tomorrow (depending on your timezone). No promises though.
@crobibero commented on GitHub (May 12, 2024):
Closing as the fix PR has been merged. Will be available with 10.9.1
@Steltek commented on GitHub (May 12, 2024):
For anyone struggling with this but database savvy and wanting to work around it: The issue is in the library.db database, in the TypedBaseItems table, specifically in the OfficialRatings field there. Look for a row with an OfficialRating that is not NULL, and not one of the standard ratings (in my case there was one with a rating set to "-"). Shut down Jellyfin (likely down already since it won't stay up with this bug), back up your database (this is important in case you mess it up), then correct those entries to help the buggy migration code to get past them.
@yodatak commented on GitHub (May 12, 2024):
Thanks i use dbeaver and open the library.db for me the faulting rating was '+14' so i emove the + and its works nice workaround ! @Steltek
@twhite96 commented on GitHub (May 13, 2024):
On macOS it is a bit different when migrating to the ARM64 version. I opened the library.db file in SQLiteStudio and found in the
MigrationIDcolumn in the__EFMigrationsHistorythe default value isNULL. I am not sure if that is supposed to be NULL, considering I am migrating from thex86_64version of Jellyfin or not. But it seems like the ARM64 version for macOS Sonoma is completely broken.@gnattu commented on GitHub (May 13, 2024):
If you are using the menu bar app then that migration is not the database migration, two different things. Current menu bar app is broken and you will not even start the database migration