Jellyfin Forum
MigrateKeyframeData Migration error during upgrade to 10.11.0 - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: MigrateKeyframeData Migration error during upgrade to 10.11.0 (/t-migratekeyframedata-migration-error-during-upgrade-to-10-11-0)



MigrateKeyframeData Migration error during upgrade to 10.11.0 - marmata75 - 2025-10-20

Hi all,

Just realized there's a new version of Jellyfin server so jumped straight away to upgrade! I'm using 10.10.7 happily, installed in a debian trixie  LXC container. I stopped jellyfin, upgraded it, restarted and the migration stops here:

Code:
[2025-10-20 07:43:32.985 +02:00] [INF] Perform migration "20250421000000_MigrateKeyframeData"
[2025-10-20 07:43:33.037 +02:00] [INF] Checking 65149 items for importable keyframe data.
[2025-10-20 07:43:34.115 +02:00] [INF] Checked: 5000 - Imported: 81 - Time: 00:00:01.1282475
[2025-10-20 07:43:34.962 +02:00] [FTL] Error: "The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
[2025-10-20 07:43:34.962 +02:00] [ERR] Migration "20250421000000_MigrateKeyframeData" failed
System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
  at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
  at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
  --- End of inner exception stack trace ---
  at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
  at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
  at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
  at System.Text.Json.JsonSerializer.Deserialize[TValue](ReadOnlySpan`1 utf8Json, JsonSerializerOptions options)
  at Jellyfin.Server.Migrations.Routines.MigrateKeyframeData.TryGetKeyframeData(Guid id, String path, KeyframeData& data)
  at Jellyfin.Server.Migrations.Routines.MigrateKeyframeData.Perform()
  at Jellyfin.Server.Migrations.Stages.CodeMigration.Perform(IServiceProvider serviceProvider, IStartupLogger logger, CancellationToken cancellationToken)
  at Jellyfin.Server.Migrations.JellyfinMigrationService.InternalCodeMigration.PerformAsync(IStartupLogger logger)
  at Jellyfin.Server.Migrations.JellyfinMigrationService.MigrateStepAsync(JellyfinMigrationStageTypes stage, IServiceProvider serviceProvider)
[2025-10-20 07:43:34.973 +02:00] [INF] Attempt to rollback librarydb.
[2025-10-20 07:43:34.973 +02:00] [INF] Attempt to rollback JellyfinDb.
[2025-10-20 07:43:35.095 +02:00] [FTL] Error while starting server
System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
  at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
  at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
  --- End of inner exception stack trace ---
  at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
  at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
  at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
  at System.Text.Json.JsonSerializer.Deserialize[TValue](ReadOnlySpan`1 utf8Json, JsonSerializerOptions options)
  at Jellyfin.Server.Migrations.Routines.MigrateKeyframeData.TryGetKeyframeData(Guid id, String path, KeyframeData& data)
  at Jellyfin.Server.Migrations.Routines.MigrateKeyframeData.Perform()
  at Jellyfin.Server.Migrations.Stages.CodeMigration.Perform(IServiceProvider serviceProvider, IStartupLogger logger, CancellationToken cancellationToken)
  at Jellyfin.Server.Migrations.JellyfinMigrationService.InternalCodeMigration.PerformAsync(IStartupLogger logger)
  at Jellyfin.Server.Migrations.JellyfinMigrationService.MigrateStepAsync(JellyfinMigrationStageTypes stage, IServiceProvider serviceProvider)
  at Jellyfin.Server.Migrations.JellyfinMigrationService.MigrateStepAsync(JellyfinMigrationStageTypes stage, IServiceProvider serviceProvider)
  at Jellyfin.Server.Migrations.JellyfinMigrationService.MigrateStepAsync(JellyfinMigrationStageTypes stage, IServiceProvider serviceProvider)
  at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
Full log is here on pastebin if needed!
Any hint on what is going wrong?


RE: MigrateKeyframeData Migration error during upgrade to 10.11.0 - Pleat2341 - 2025-10-21

I'm in a very similar situation - same error, was working fine in 10.10.7 in a Debian (bullseye) LXC container.

When trying to recover and re-attempt the migration by renaming library.db.old to library.db, I see

Code:
10/21/2025 16:01:35 +01:00 - Error while starting server
10/21/2025 16:01:35 +01:00 - Migration "20250420070000_MigrateActivityLogDb" failed
10/21/2025 16:01:35 +01:00 - Error: "SQLite Error 1: 'no such table: ActivityLog'."
10/21/2025 16:01:26 +01:00 - Migrate stage AppInitialisation.

    10/21/2025 16:01:26 +01:00 - 20250420070000_MigrateActivityLogDb
        10/21/2025 16:01:35 +01:00 - Attempt to rollback JellyfinDb.
        10/21/2025 16:01:35 +01:00 - Attempt to rollback librarydb.
        10/21/2025 16:01:35 +01:00 - Migration 20250420070000_MigrateActivityLogDb failed
        10/21/2025 16:01:35 +01:00 - Error: SQLite Error 1: 'no such table: ActivityLog'.
        10/21/2025 16:01:26 +01:00 - Perform migration 20250420070000_MigrateActivityLogDb
    10/21/2025 16:01:26 +01:00 - 20250420060000_CreateUserLoggingConfigFile
        10/21/2025 16:01:26 +01:00 - Migration 20250420060000_CreateUserLoggingConfigFile was successfully applied
        10/21/2025 16:01:26 +01:00 - Perform migration 20250420060000_CreateUserLoggingConfigFile
    10/21/2025 16:01:26 +01:00 - 20250420050000_DisableTranscodingThrottling
        10/21/2025 16:01:26 +01:00 - Migration 20250420050000_DisableTranscodingThrottling was successfully applied
        10/21/2025 16:01:26 +01:00 - Perform migration 20250420050000_DisableTranscodingThrottling
    10/21/2025 16:01:26 +01:00 - There are 26 migrations for stage AppInitialisation.



RE: MigrateKeyframeData Migration error during upgrade to 10.11.0 - theguymadmax - 2025-10-21

(2025-10-20, 06:16 AM)marmata75 Wrote: Any hint on what is going wrong?

The fix is already in the works for this issue. You can track the progress here: https://github.com/jellyfin/jellyfin/issues/15029