10.6 ILogger DI fails for plugins #2034

Closed
opened 2026-02-06 21:40:10 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Legogris on GitHub (Aug 12, 2020).

After upgrading to 10.6.2 to 10.5.5 several plugins fail due to not being able to resolve IILogger:

System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)
[15:20:06] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.KodiSyncQueue.Plugin'.
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)

The Anime plugin is also failing with another error:

[15:25:35] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error loading types from Jellyfin.Plugin.Anime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null.
System.TypeLoadException: Method 'get_ProviderName' in type 'Jellyfin.Plugin.Anime.Providers.AniSearch.AniSearchExternalId' from assembly 'Jellyfin.Plugin.Anime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at Emby.Server.Implementations.ApplicationHost.GetTypes(IEnumerable`1 assemblies)+MoveNext()

After the upgrade my server keeps crashing/restarting but I'm yet to deduce if any of these are the cause or if something else is going on.

Originally created by @Legogris on GitHub (Aug 12, 2020). After upgrading to 10.6.2 to 10.5.5 several plugins fail due to not being able to resolve `IILogger`: ``` System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification'. at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type) [15:20:06] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification'. at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type) System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'Jellyfin.Plugin.KodiSyncQueue.Plugin'. at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type) ``` The Anime plugin is also failing with another error: ``` [15:25:35] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error loading types from Jellyfin.Plugin.Anime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null. System.TypeLoadException: Method 'get_ProviderName' in type 'Jellyfin.Plugin.Anime.Providers.AniSearch.AniSearchExternalId' from assembly 'Jellyfin.Plugin.Anime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. at System.Reflection.RuntimeAssembly.GetExportedTypes() at Emby.Server.Implementations.ApplicationHost.GetTypes(IEnumerable`1 assemblies)+MoveNext() ``` After the upgrade my server keeps crashing/restarting but I'm yet to deduce if any of these are the cause or if something else is going on.
OVERLORD added the bugstale labels 2026-02-06 21:40:10 +03:00
Author
Owner

@Legogris commented on GitHub (Aug 12, 2020):

Doing a git bisect I realized this is most likely the reason: 62420a6eb1 (diff-5ff7dd3f2f09dc8b526fc45b5264635f) in https://github.com/jellyfin/jellyfin/pull/3098

Not having seen this mentioned in release notes as a breaking change, some questions and thoughts:

  • Unless something else is going on that I'm missing, exceptions raised in plugins seem to be able to crash the Jellyfin process. Is this the case and if so, can safeguards be added for this?
  • What are advised steps for users with already installed older version of plugins?
  • Is there no way this can be reconsidered (specifically not removing support for the untyped loggers)? This is a breaking change that IMO should have provided a longer upgrade path with more clear communication and, considering it's a somewhat external API. Especially considering I installed some of these plugins from the official Jellyfin catalog only within the past month.
@Legogris commented on GitHub (Aug 12, 2020): Doing a git bisect I realized this is most likely the reason: https://github.com/jellyfin/jellyfin/commit/62420a6eb195f3119dc640b134d689d0de193a85#diff-5ff7dd3f2f09dc8b526fc45b5264635f in https://github.com/jellyfin/jellyfin/pull/3098 Not having seen this mentioned in release notes as a breaking change, some questions and thoughts: * Unless something else is going on that I'm missing, exceptions raised in plugins seem to be able to crash the Jellyfin process. Is this the case and if so, can safeguards be added for this? * What are advised steps for users with already installed older version of plugins? * Is there no way this can be reconsidered (specifically not removing support for the untyped loggers)? This is a breaking change that IMO should have provided a longer upgrade path with more clear communication and, considering it's a somewhat external API. Especially considering I installed some of these plugins from the official Jellyfin catalog only within the past month.
Author
Owner

@stale[bot] commented on GitHub (Dec 10, 2020):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale[bot] commented on GitHub (Dec 10, 2020): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#2034