Jump to content

Error System.InvalidCastException


Recommended Posts

Kenacious_D
Posted

Today I was logged into my Emby server and noticed the Emby tray icon was not showing. I went into Task Manager and sure enough, no Emby Server. So, I manually started Emby Server. The tray icon showed up briefly and then it was gone. I rebooted the computer, logged in and saw the Emby Server icon show up in the tray again and then disappear. I checked my hard drive, plenty of open space. I deleted the Library.db file. Rebooted. Same thing. I re-installed the latest version of Ember server and rebooted. Same thing. I finally checked the log file and I'm getting the following error. 

Can anyone tell me what happened and what I need to do to fix it? I'm not new to Emby. I've been running it for many years. I hadn't changed anything in settings for a long time. This just happened out of thin air.

Any help would be greatly appreciated!

2026-02-22 15:59:21.792 Error GlobalExceptionHandler: UnhandledException
    *** Error Report ***
    Version: 4.9.3.0
    Command line: C:\Users\soopa\AppData\Roaming\Emby-Server\system\EmbyServer.dll
    Operating system: Microsoft Windows 10.0.19045
    OS/Process: x64/x64
    Framework: .NET 8.0.22
    Runtime: C:/Users/soopa/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: C:\Users\soopa\AppData\Roaming\Emby-Server\programdata
    Application path: C:\Users\soopa\AppData\Roaming\Emby-Server\system
    System.InvalidCastException: System.InvalidCastException: [A]Emby.Dlna.DlnaOptions cannot be cast to [B]Emby.Dlna.DlnaOptions. Type A originates from 'Emby.Dlna, Version=1.5.4.0, Culture=neutral, PublicKeyToken=null' in the context '"Assembly.Load(byte[], ...)" System.Runtime.Loader.IndividualAssemblyLoadContext #8' in a byte array. Type B originates from 'Emby.Dlna, Version=1.5.4.0, Culture=neutral, PublicKeyToken=null' in the context '"Assembly.Load(byte[], ...)" System.Runtime.Loader.IndividualAssemblyLoadContext #9' in a byte array.
       at MediaBrowser.Common.Configuration.ConfigurationManagerExtensions.GetConfiguration[T](IConfigurationManager manager, String key)
       at Emby.Dlna.ConfigurationExtension.GetDlnaConfiguration(IConfigurationManager manager)
       at Emby.Dlna.Main.DlnaEntryPoint.ReloadComponents(CancellationToken cancellationToken)
       at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
       at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
       at System.Threading.QueueUserWorkItemCallback`1.Execute()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
    Source: System.Private.CoreLib
    TargetSite: System.Object ChkCastAny(Void*, System.Object)
    
2026-02-22 15:59:21.792 Info App: Entry point completed: Emby.Server.Implementations.Library.DeviceAccessEntryPoint. Duration: 9.36E-05 seconds
2026-02-22 15:59:21.792 Info App: Starting entry point Emby.Server.Implementations.IO.LibraryMonitorStartup
2026-02-22 15:59:21.806 Info App: Entry point completed: Emby.Server.Implementations.IO.LibraryMonitorStartup. Duration: 0.0138036 seconds
2026-02-22 15:59:21.806 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.AutomaticRestartEntryPoint
2026-02-22 15:59:21.806 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.AutomaticRestartEntryPoint. Duration: 5.08E-05 seconds
2026-02-22 15:59:21.806 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.KeepServerAwake
2026-02-22 15:59:21.806 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.KeepServerAwake. Duration: 2.61E-05 seconds
2026-02-22 15:59:21.806 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.LibraryChangedNotifier
2026-02-22 15:59:21.806 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.LibraryChangedNotifier. Duration: 0.0001138 seconds
2026-02-22 15:59:21.806 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.LogLibrariesEntryPoint
2026-02-22 15:59:21.806 Info App: Libraries
    Server Configuration: CollapseVideoFolders: True
2026-02-22 15:59:21.806 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.LogLibrariesEntryPoint. Duration: 0.000156 seconds
2026-02-22 15:59:21.806 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.ServerEventNotifier
2026-02-22 15:59:21.807 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.ServerEventNotifier. Duration: 0.0002096 seconds
2026-02-22 15:59:21.807 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.StartupWizard
2026-02-22 15:59:21.807 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.StartupWizard. Duration: 6.31E-05 seconds
2026-02-22 15:59:21.807 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.SystemEvents
2026-02-22 15:59:21.807 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.SystemEvents. Duration: 2.07E-05 seconds
2026-02-22 15:59:21.807 Info App: Starting entry point Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier
2026-02-22 15:59:21.807 Info App: Entry point completed: Emby.Server.Implementations.EntryPoints.UserDataChangeNotifier. Duration: 5.14E-05 seconds
2026-02-22 15:59:21.807 Info App: Starting entry point Emby.Server.Implementations.Channels.ChannelsEntryPoint
2026-02-22 15:59:21.810 Info App: Entry point completed: Emby.Server.Implementations.Channels.ChannelsEntryPoint. Duration: 0.0030843 seconds
2026-02-22 15:59:21.810 Info App: Starting entry point Emby.LiveTV.EntryPoint
2026-02-22 15:59:21.810 Info LiveTV: Loading live tv data from C:\Users\soopa\AppData\Roaming\Emby-Server\programdata\data\livetv\timers
2026-02-22 15:59:21.811 Info App: Entry point completed: Emby.LiveTV.EntryPoint. Duration: 0.001113 seconds
2026-02-22 15:59:21.811 Info App: Starting entry point Emby.LiveTV.RecordingNotifier
2026-02-22 15:59:21.811 Info App: Entry point completed: Emby.LiveTV.RecordingNotifier. Duration: 0.0001244 seconds
2026-02-22 15:59:21.811 Info App: Starting entry point Emby.Server.MediaEncoding.Api.EncodingManagerEntryPoint
2026-02-22 15:59:21.813 Info App: Entry point completed: Emby.Server.MediaEncoding.Api.EncodingManagerEntryPoint. Duration: 0.0022981 seconds
2026-02-22 15:59:21.814 Info App: Starting entry point Emby.Notifications.NotificationManagerEntryPoint
2026-02-22 15:59:21.830 Info Main: Closing tray icon
2026-02-22 15:59:21.830 Info HttpClient: POST http://127.0.0.1:8024/exit
2026-02-22 15:59:21.835 Info Notifications: Registering event nofitier Activity Log
2026-02-22 15:59:21.835 Info Notifications: Registering event nofitier Emby Server User Notifications
2026-02-22 15:59:21.835 Info Notifications: Registering event factory CoreNotificationTypeFactory
2026-02-22 15:59:21.835 Info Notifications: Registering event factory BackupNotificationTypeFactory
2026-02-22 15:59:21.835 Info Notifications: Registering event factory BackupNotificationTypeFactory
2026-02-22 15:59:21.846 Info App: Entry point completed: Emby.Notifications.NotificationManagerEntryPoint. Duration: 0.0325017 seconds
2026-02-22 15:59:21.846 Info App: Starting entry point Emby.Server.Sync.SyncNotificationEntryPoint
2026-02-22 15:59:21.846 Info App: Entry point completed: Emby.Server.Sync.SyncNotificationEntryPoint. Duration: 0.0002812 seconds
2026-02-22 15:59:21.846 Info App: Starting entry point EmbyServer.Windows.LoopUtilEntryPoint
2026-02-22 15:59:21.872 Info HttpClient: Http response 200 from http://127.0.0.1:8024/exit after 42ms
2026-02-22 15:59:21.876 Info Main: tray icon WaitForExit
2026-02-22 15:59:21.897 Info App: Entry point completed: EmbyServer.Windows.LoopUtilEntryPoint. Duration: 0.0507313 seconds
2026-02-22 15:59:21.897 Info App: Starting entry point CoverArt.ServerEntryPoint
2026-02-22 15:59:21.901 Info CoverArt: CoverArt plugin loading SkiaCoverArtImageProcessor image processor
2026-02-22 15:59:21.903 Info CoverArt: CoverArt plugin loading NetVipsCoverArtImageProcessor image processor
2026-02-22 15:59:21.911 Info App: Init BeginReceive on 0.0.0.0
2026-02-22 15:59:21.911 Info App: Init BeginReceive on 0.0.0.0
2026-02-22 15:59:21.911 Info App: Init BeginReceive on 10.0.0.232
2026-02-22 15:59:21.911 Info App: Init BeginReceive on 127.0.0.1
2026-02-22 15:59:22.016 Info HttpClient: POST https://mb3admin.com/admin/service/registration/validate
2026-02-22 15:59:22.021 Info App: Entry point completed: CoverArt.ServerEntryPoint. Duration: 0.1239535 seconds
2026-02-22 15:59:22.021 Info App: Starting entry point Emby.PortMapper.ExternalPortForwarding
2026-02-22 15:59:22.022 Info App: Entry point completed: Emby.PortMapper.ExternalPortForwarding. Duration: 0.0009212 seconds
2026-02-22 15:59:22.022 Info App: Starting entry point Emby.PortMapper.ExternalPortForwarding
2026-02-22 15:59:22.023 Info App: Entry point completed: Emby.PortMapper.ExternalPortForwarding. Duration: 0.000601 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point Emby.Security.PluginSecurityManager
2026-02-22 15:59:22.023 Info App: Entry point completed: Emby.Security.PluginSecurityManager. Duration: 3.2E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point Emby.Server.CinemaMode.IntrosEntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: Emby.Server.CinemaMode.IntrosEntryPoint. Duration: 8.35E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point Emby.Security.PluginSecurityManager
2026-02-22 15:59:22.023 Info App: Entry point completed: Emby.Security.PluginSecurityManager. Duration: 3.02E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point Emby.Server.CinemaMode.IntrosEntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: Emby.Server.CinemaMode.IntrosEntryPoint. Duration: 6.95E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point MBBackup.ServerEntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: MBBackup.ServerEntryPoint. Duration: 2.58E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point MBBackup.ServerEntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: MBBackup.ServerEntryPoint. Duration: 4.57E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point MediaBrowser.Plugins.Trailers.EntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: MediaBrowser.Plugins.Trailers.EntryPoint. Duration: 2.35E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point NfoMetadata.EntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: NfoMetadata.EntryPoint. Duration: 0.0001028 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point NfoMetadata.EntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: NfoMetadata.EntryPoint. Duration: 7.65E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point Tvdb.EntryPoint
2026-02-22 15:59:22.023 Info App: Entry point completed: Tvdb.EntryPoint. Duration: 2.68E-05 seconds
2026-02-22 15:59:22.023 Info App: Starting entry point Tvdb.EntryPoint
2026-02-22 15:59:22.024 Info App: Entry point completed: Tvdb.EntryPoint. Duration: 2.63E-05 seconds
2026-02-22 15:59:22.024 Info App: All entry points have started
2026-02-22 15:59:22.183 Info Main: tray icon exited
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...