Jump to content

Unhandled Exception at Startup


Go to solution Solved by Luke,

Recommended Posts

Posted

Over the past week or 2 I've noticed that when I reboot my system I get the following error: Unhandled Exception: One or more errors occurred

 

I figured updating to the latest release would fix the issue, but it persists.  I see a log that begins with "unhandled_" that contains the following:

 

 

 

One or more errors occurred.
System.AggregateException
at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at MediaBrowser.ServerApplication.MainStartup.RunApplication(ServerApplicationPaths appPaths, ILogManager logManager, Boolean runService, StartupOptions options)
at MediaBrowser.ServerApplication.MainStartup.Main()
InnerException: System.Data.SQLite.SQLiteException
database is locked
database is locked
at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
at System.Data.SQLite.SQLiteConnection.Open()
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MediaBrowser.Server.Implementations.Persistence.SqliteExtensions.<ConnectToDb>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MediaBrowser.Server.Implementations.Persistence.SqliteItemRepository.<CreateConnection>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MediaBrowser.Server.Implementations.Persistence.SqliteItemRepository.<Initialize>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at MediaBrowser.Server.Startup.Common.ApplicationHost.<RegisterResources>d__1b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MediaBrowser.Common.Implementations.BaseApplicationHost`1.<Init>d__4.MoveNext()

 

Once I click "OK" for the unhandled exception error, EMBY seems to function properly.  Any idea what's going on?

 

TIA

Posted

Try rebooting your computer, then make sure there's only one instance of the server starting up. Then if you've created anything that might interact with the emby database, shut that down.

Posted

I shutdown my Windows Media Center system (not using it any longer), removed the KODI plugin from my Nvidia Shield TV (not using it any longer), rebooted the system, and got the same error at boot.

 

Also, I noticed that I'm only downloading 3 days of guide data instead of 14.  I don't see where that is configurable.

Posted

You can configure guide data length under live tv settings.

Posted

Got the guide data length.  Thanks.  What can I do about the unhandled exception at startup?

Posted

Please attach a complete log file. Thanks.

  • Solution
Posted

You're starting two instances of the server, one with the tray icon, the other as the windows service. pick one and remove it from startup. we are supposed to have a safeguard against simultaneous instances so i'll have to double check that it's still working.

  • Like 1
Posted

I think I got it resolved. I had to go into Task Manager and disable Emby in the Startup tab. I rebooted and no more errors. This is in Windows 10.

Happy2Play
Posted

I guess you have a shortcut in a startup folder somewhere since the setting is disabled in the config.

Posted

Well done. Thanks for reporting back.

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...