[Issue]: Solution to corrupt database during migration #4827

Closed
opened 2026-02-07 01:11:36 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @AnonymousWebHacker on GitHub (May 1, 2023).

Please describe your bug

It happens to many that during a server migration, upgrade or forced shutdown, the database is corrupted during a migration or optimization.

Example Logs

May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Error while starting server.
May  1 02:24:15 MediaX-Server jellyfin[23097]: System.ArgumentNullException: Value cannot be null. (Parameter 'authenticationProviderId')
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Data.Entities.User..ctor(String username, String authenticationProviderId, String passwordResetProviderId)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at lambda_method44(Closure , QueryContext , DbDataReader , ResultContext , SingleQueryResultCoordinator )
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Implementations.Users.UserManager..ctor(JellyfinDbProvider dbProvider, IEventManager eventManager, ICryptoProvider cryptoProvider, INetworkManager networkManager, IApplicationHost appHost, IImageProcessor imageProcessor, ILogger`1 logger)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.Resolve[T]()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.InitializeServices()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Running query planner optimizations in the database... This might take a while
May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Disposing CoreAppHost
May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Unhandled Exception
May  1 02:24:15 MediaX-Server jellyfin[23097]: System.NullReferenceException: Object reference not set to an instance of an object.
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsync()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.<Main>(String[] args)
May  1 02:24:15 MediaX-Server jellyfin[23097]: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsync()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.<Main>(String[] args)
May  1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Main process exited, code=killed, status=6/ABRT
May  1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Failed with result 'signal'.
May  1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Consumed 2.435s CPU time.
May  1 02:24:16 MediaX-Server systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 2.
May  1 02:24:16 MediaX-Server systemd[1]: Stopped Jellyfin Media Server.

The line of error that interests us is the following

May  1 02:24:15 MediaX-Server jellyfin[23097]: System.ArgumentNullException: Value cannot be null. (Parameter 'authenticationProviderId')
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Data.Entities.User..ctor(String username, String authenticationProviderId, String passwordResetProviderId)

What happen ?

During migration, forced stop ..etc, sqlite creates an external database temporarily to organize the data, example

/var/lib/jellyfin/jellyfin.db
/var/lib/jellyfin/jellyfin.db-shm

and
/var/lib/jellyfin/*.json <----- Data of the user that was being processed at that moment. you may run into multiple .json files in that path.

Solution

Copy the database, to your personal PC, and install sqlitebrowser or any other sqlite database manager (maybe terminal as well)
You are interested in the Users table

If I manage to open the previous .json files, I will notice that it is from UserA, and it turns out that in the Users table, that user A, has abnormal values, to the others.
Simply edit, or delete said users .json

Jellyfin Version

10.8.z

if other:

No response

Environment

- OS:
- Linux Kernel:
- Virtualization:
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:

Jellyfin logs

May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Error while starting server.
May  1 02:24:15 MediaX-Server jellyfin[23097]: System.ArgumentNullException: Value cannot be null. (Parameter 'authenticationProviderId')
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Data.Entities.User..ctor(String username, String authenticationProviderId, String passwordResetProviderId)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at lambda_method44(Closure , QueryContext , DbDataReader , ResultContext , SingleQueryResultCoordinator )
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Implementations.Users.UserManager..ctor(JellyfinDbProvider dbProvider, IEventManager eventManager, ICryptoProvider cryptoProvider, INetworkManager networkManager, IApplicationHost appHost, IImageProcessor imageProcessor, ILogger`1 logger)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.Resolve[T]()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.InitializeServices()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Running query planner optimizations in the database... This might take a while
May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Disposing CoreAppHost
May  1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Unhandled Exception
May  1 02:24:15 MediaX-Server jellyfin[23097]: System.NullReferenceException: Object reference not set to an instance of an object.
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsync()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.<Main>(String[] args)
May  1 02:24:15 MediaX-Server jellyfin[23097]: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Emby.Server.Implementations.ApplicationHost.DisposeAsync()
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
May  1 02:24:15 MediaX-Server jellyfin[23097]:    at Jellyfin.Server.Program.<Main>(String[] args)
May  1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Main process exited, code=killed, status=6/ABRT
May  1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Failed with result 'signal'.
May  1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Consumed 2.435s CPU time.
May  1 02:24:16 MediaX-Server systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 2.
May  1 02:24:16 MediaX-Server systemd[1]: Stopped Jellyfin Media Server.

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @AnonymousWebHacker on GitHub (May 1, 2023). ### Please describe your bug It happens to many that during a server migration, upgrade or forced shutdown, the database is corrupted during a migration or optimization. Example Logs ``` May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Error while starting server. May 1 02:24:15 MediaX-Server jellyfin[23097]: System.ArgumentNullException: Value cannot be null. (Parameter 'authenticationProviderId') May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Data.Entities.User..ctor(String username, String authenticationProviderId, String passwordResetProviderId) May 1 02:24:15 MediaX-Server jellyfin[23097]: at lambda_method44(Closure , QueryContext , DbDataReader , ResultContext , SingleQueryResultCoordinator ) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Implementations.Users.UserManager..ctor(JellyfinDbProvider dbProvider, IEventManager eventManager, ICryptoProvider cryptoProvider, INetworkManager networkManager, IApplicationHost appHost, IImageProcessor imageProcessor, ILogger`1 logger) May 1 02:24:15 MediaX-Server jellyfin[23097]: at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) May 1 02:24:15 MediaX-Server jellyfin[23097]: at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) May 1 02:24:15 MediaX-Server jellyfin[23097]: at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.Resolve[T]() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.InitializeServices() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.StartApp(StartupOptions options) May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Running query planner optimizations in the database... This might take a while May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Disposing CoreAppHost May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Unhandled Exception May 1 02:24:15 MediaX-Server jellyfin[23097]: System.NullReferenceException: Object reference not set to an instance of an object. May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsync() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.StartApp(StartupOptions options) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.<Main>(String[] args) May 1 02:24:15 MediaX-Server jellyfin[23097]: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsync() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.StartApp(StartupOptions options) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.<Main>(String[] args) May 1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Main process exited, code=killed, status=6/ABRT May 1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Failed with result 'signal'. May 1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Consumed 2.435s CPU time. May 1 02:24:16 MediaX-Server systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 2. May 1 02:24:16 MediaX-Server systemd[1]: Stopped Jellyfin Media Server. ``` ## The line of error that interests us is the following ``` May 1 02:24:15 MediaX-Server jellyfin[23097]: System.ArgumentNullException: Value cannot be null. (Parameter 'authenticationProviderId') May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Data.Entities.User..ctor(String username, String authenticationProviderId, String passwordResetProviderId) ``` ## What happen ? During migration, forced stop ..etc, sqlite creates an external database temporarily to organize the data, example ``` /var/lib/jellyfin/jellyfin.db /var/lib/jellyfin/jellyfin.db-shm ``` and `/var/lib/jellyfin/*.json` <----- Data of the user that was being processed at that moment. you may run into multiple .json files in that path. ## Solution Copy the database, to your personal PC, and install sqlitebrowser or any other sqlite database manager (maybe terminal as well) You are interested in the `Users` table If I manage to open the previous .json files, I will notice that it is from UserA, and it turns out that in the Users table, that user A, has abnormal values, to the others. Simply edit, or delete said users .json ### Jellyfin Version 10.8.z ### if other: _No response_ ### Environment ```markdown - OS: - Linux Kernel: - Virtualization: - Clients: - Browser: - FFmpeg Version: - Playback Method: - Hardware Acceleration: - GPU Model: - Plugins: - Reverse Proxy: - Base URL: - Networking: - Storage: ``` ### Jellyfin logs ```shell May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Error while starting server. May 1 02:24:15 MediaX-Server jellyfin[23097]: System.ArgumentNullException: Value cannot be null. (Parameter 'authenticationProviderId') May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Data.Entities.User..ctor(String username, String authenticationProviderId, String passwordResetProviderId) May 1 02:24:15 MediaX-Server jellyfin[23097]: at lambda_method44(Closure , QueryContext , DbDataReader , ResultContext , SingleQueryResultCoordinator ) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Implementations.Users.UserManager..ctor(JellyfinDbProvider dbProvider, IEventManager eventManager, ICryptoProvider cryptoProvider, INetworkManager networkManager, IApplicationHost appHost, IImageProcessor imageProcessor, ILogger`1 logger) May 1 02:24:15 MediaX-Server jellyfin[23097]: at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) May 1 02:24:15 MediaX-Server jellyfin[23097]: at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) May 1 02:24:15 MediaX-Server jellyfin[23097]: at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.Resolve[T]() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.InitializeServices() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.StartApp(StartupOptions options) May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Running query planner optimizations in the database... This might take a while May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [INF] Disposing CoreAppHost May 1 02:24:15 MediaX-Server jellyfin[23097]: [02:24:15] [FTL] Unhandled Exception May 1 02:24:15 MediaX-Server jellyfin[23097]: System.NullReferenceException: Object reference not set to an instance of an object. May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsync() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.StartApp(StartupOptions options) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.<Main>(String[] args) May 1 02:24:15 MediaX-Server jellyfin[23097]: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsyncCore() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Emby.Server.Implementations.ApplicationHost.DisposeAsync() May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.StartApp(StartupOptions options) May 1 02:24:15 MediaX-Server jellyfin[23097]: at Jellyfin.Server.Program.<Main>(String[] args) May 1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Main process exited, code=killed, status=6/ABRT May 1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Failed with result 'signal'. May 1 02:24:15 MediaX-Server systemd[1]: jellyfin.service: Consumed 2.435s CPU time. May 1 02:24:16 MediaX-Server systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 2. May 1 02:24:16 MediaX-Server systemd[1]: Stopped Jellyfin Media Server. ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 01:11:36 +03:00
Author
Owner

@AnonymousWebHacker commented on GitHub (May 1, 2023):

Fix https://github.com/jellyfin/jellyfin/issues/7928

@AnonymousWebHacker commented on GitHub (May 1, 2023): Fix https://github.com/jellyfin/jellyfin/issues/7928
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#4827