Prowlarr failed to start: Error creating main database #907

Closed
opened 2026-02-20 10:05:01 -05:00 by deekerman · 3 comments
Owner

Originally created by @Snazzie on GitHub (Jul 31, 2023).

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Current Behavior

failing to start

possibly related to https://github.com/Prowlarr/Prowlarr/issues/729

Expected Behavior

starts

Steps To Reproduce

  1. boot docker container.

Environment

- OS: unraid/docker
- Prowlarr: 1.7.4.3769
- Docker Install: yes
- Using Reverse Proxy: no
- Browser:

What branch are you running?

Master

Trace Logs?

2023-07-31 15:42:04.2|Debug|ProcessProvider|Found 0 processes with the name: Prowlarr.Console
2023-07-31 15:42:04.3|Debug|ProcessProvider|Found 1 processes with the name: Prowlarr
2023-07-31 15:42:04.3|Debug|ProcessProvider| - [61] Prowlarr
2023-07-31 15:42:04.3|Info|MigrationController|*** Migrating data source=/config/prowlarr/prowlarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
2023-07-31 15:42:06.6|Info|FluentMigrator.Runner.MigrationRunner|34: history_fix_data_titles migrating
2023-07-31 15:42:06.7|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Beginning Transaction
2023-07-31 15:42:06.7|Info|history_fix_data_titles|Starting migration of Main DB to 34
2023-07-31 15:42:06.7|Info|FluentMigrator.Runner.MigrationRunner|PerformDBOperation 
2023-07-31 15:42:06.7|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Performing DB Operation
2023-07-31 15:42:07.1|Error|FluentMigrator.Runner.MigrationRunner|Specified cast is not valid.

[v1.7.4.3769] System.InvalidCastException: Specified cast is not valid.
   at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
   at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i)
   at NzbDrone.Core.Datastore.Migration.history_fix_data_titles.MigrateHistoryDataTitle(IDbConnection conn, IDbTransaction tran) in ./Prowlarr.Core/Datastore/Migration/034_history_fix_data_titles.cs:line 33
   at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression)
   at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor)
   at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass80_0.<ExecuteExpressions>b__1()
   at FluentMigrator.Runner.StopWatch.Time(Action action)
   at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions)


2023-07-31 15:42:07.2|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Rolling back transaction
2023-07-31 15:42:07.2|Fatal|Microsoft.AspNetCore.Hosting.Diagnostics|Application startup exception

[v1.7.4.3769] NzbDrone.Common.Exceptions.ProwlarrStartupException: Prowlarr failed to start: Error creating main database
 ---> System.InvalidCastException: Specified cast is not valid.
   at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
   at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i)
   at NzbDrone.Core.Datastore.Migration.history_fix_data_titles.MigrateHistoryDataTitle(IDbConnection conn, IDbTransaction tran) in ./Prowlarr.Core/Datastore/Migration/034_history_fix_data_titles.cs:line 33
   at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression)
   at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor)
   at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass80_0.<ExecuteExpressions>b__1()
   at FluentMigrator.Runner.StopWatch.Time(Action action)
   at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions)
   at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action`2 getExpressions)
   at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp(IMigrationInfo migrationInfo, Boolean useTransaction)
   at FluentMigrator.Runner.MigrationRunner.MigrateUp(Int64 targetVersion, Boolean useAutomaticTransactionManagement)
   at FluentMigrator.Runner.MigrationRunner.MigrateUp(Boolean useAutomaticTransactionManagement)
   at FluentMigrator.Runner.MigrationRunner.MigrateUp()
   at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/Migration/Framework/MigrationController.cs:line 79
   at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 115
   --- End of inner exception stack trace ---
   at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 161
   at NzbDrone.Core.Datastore.DbFactory.Create(MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 70
   at NzbDrone.Core.Datastore.DbFactory.Create(MigrationType migrationType) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 58
   at NzbDrone.Core.Datastore.Extensions.CompositionExtensions.<>c.<AddDatabase>b__0_0(IDbFactory f) in ./Prowlarr.Core/Datastore/Extensions/CompositionExtensions.cs:line 10
   at DryIoc.Registrator.ToFuncWithObjParams[D1,TService](Func`2 f, Object d1) in /_/src/DryIoc/Container.cs:line 7977
   at DryIoc.Interpreter.TryInterpretFuncInvoke(IResolverContext r, MethodCallExpression e, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3680
   at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3478
   at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3129
   at DryIoc.Interpreter.TryInterpretSingletonAndUnwrapContainerException(IResolverContext r, Expression expr, ImMapEntry`1 itemRef, Object& result) in /_/src/DryIoc/Container.cs:line 3058
   at DryIoc.Factory.ApplyReuse(Expression serviceExpr, Request request) in /_/src/DryIoc/Container.cs:line 11017
   at DryIoc.Factory.GetExpressionOrDefault(Request request) in /_/src/DryIoc/Container.cs:line 10936
   at DryIoc.Container.ResolveAndCacheKeyed(Int32 serviceTypeHash, Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Object scopeName, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 535
   at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 463
   at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3614
   at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3141
   at DryIoc.Interpreter.TryInterpretNestedLambdaBodyAndUnwrapException(IResolverContext r, Expression bodyExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs) in /_/src/DryIoc/Container.cs:line 3424
   at DryIoc.Interpreter.<>c__DisplayClass5_0.<TryInterpretNestedLambda>b__0() in /_/src/DryIoc/Container.cs:line 3323
   at DryIoc.Interpreter.<>c__DisplayClass9_0`1.<ConvertFunc>b__0() in /_/src/DryIoc/Container.cs:line 3434
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, ProwlarrErrorPipeline errorHandler) in ./Prowlarr.Host/Startup.cs:line 235
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)


2023-07-31 15:42:07.5|Fatal|ConsoleApp|EPIC FAIL!

[v1.7.4.3769] NzbDrone.Common.Exceptions.ProwlarrStartupException: Prowlarr failed to start: Error creating main database
 ---> System.InvalidCastException: Specified cast is not valid.
   at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
   at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i)
   at NzbDrone.Core.Datastore.Migration.history_fix_data_titles.MigrateHistoryDataTitle(IDbConnection conn, IDbTransaction tran) in ./Prowlarr.Core/Datastore/Migration/034_history_fix_data_titles.cs:line 33
   at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression)
   at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor)
   at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass80_0.<ExecuteExpressions>b__1()
   at FluentMigrator.Runner.StopWatch.Time(Action action)
   at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions)
   at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action`2 getExpressions)
   at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp(IMigrationInfo migrationInfo, Boolean useTransaction)
   at FluentMigrator.Runner.MigrationRunner.MigrateUp(Int64 targetVersion, Boolean useAutomaticTransactionManagement)
   at FluentMigrator.Runner.MigrationRunner.MigrateUp(Boolean useAutomaticTransactionManagement)
   at FluentMigrator.Runner.MigrationRunner.MigrateUp()
   at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/Migration/Framework/MigrationController.cs:line 79
   at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 115
   --- End of inner exception stack trace ---
   at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 161
   at NzbDrone.Core.Datastore.DbFactory.Create(MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 70
   at NzbDrone.Core.Datastore.DbFactory.Create(MigrationType migrationType) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 58
   at NzbDrone.Core.Datastore.Extensions.CompositionExtensions.<>c.<AddDatabase>b__0_0(IDbFactory f) in ./Prowlarr.Core/Datastore/Extensions/CompositionExtensions.cs:line 10
   at DryIoc.Registrator.ToFuncWithObjParams[D1,TService](Func`2 f, Object d1) in /_/src/DryIoc/Container.cs:line 7977
   at DryIoc.Interpreter.TryInterpretFuncInvoke(IResolverContext r, MethodCallExpression e, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3680
   at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3478
   at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3129
   at DryIoc.Interpreter.TryInterpretSingletonAndUnwrapContainerException(IResolverContext r, Expression expr, ImMapEntry`1 itemRef, Object& result) in /_/src/DryIoc/Container.cs:line 3058
   at DryIoc.Factory.ApplyReuse(Expression serviceExpr, Request request) in /_/src/DryIoc/Container.cs:line 11017
   at DryIoc.Factory.GetExpressionOrDefault(Request request) in /_/src/DryIoc/Container.cs:line 10936
   at DryIoc.Container.ResolveAndCacheKeyed(Int32 serviceTypeHash, Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Object scopeName, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 535
   at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 463
   at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3614
   at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3141
   at DryIoc.Interpreter.TryInterpretNestedLambdaBodyAndUnwrapException(IResolverContext r, Expression bodyExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs) in /_/src/DryIoc/Container.cs:line 3424
   at DryIoc.Interpreter.<>c__DisplayClass5_0.<TryInterpretNestedLambda>b__0() in /_/src/DryIoc/Container.cs:line 3323
   at DryIoc.Interpreter.<>c__DisplayClass9_0`1.<ConvertFunc>b__0() in /_/src/DryIoc/Container.cs:line 3434
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, ProwlarrErrorPipeline errorHandler) in ./Prowlarr.Host/Startup.cs:line 235
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at NzbDrone.Host.Bootstrap.Start(String[] args, Action`1 trayCallback) in ./Prowlarr.Host/Bootstrap.cs:line 79
   at NzbDrone.Console.ConsoleApp.Main(String[] args) in ./Prowlarr.Console/ConsoleApp.cs:line 43

Trace Logs have been provided as applicable. Reports may be closed if the required logs are not provided.

  • I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain trace - that are relevant and show this issue.
Originally created by @Snazzie on GitHub (Jul 31, 2023). ### Is there an existing issue for this? - [X] I have searched the existing open and closed issues ### Current Behavior failing to start possibly related to https://github.com/Prowlarr/Prowlarr/issues/729 ### Expected Behavior starts ### Steps To Reproduce 1. boot docker container. ### Environment ```markdown - OS: unraid/docker - Prowlarr: 1.7.4.3769 - Docker Install: yes - Using Reverse Proxy: no - Browser: ``` ### What branch are you running? Master ### Trace Logs? ``` 2023-07-31 15:42:04.2|Debug|ProcessProvider|Found 0 processes with the name: Prowlarr.Console 2023-07-31 15:42:04.3|Debug|ProcessProvider|Found 1 processes with the name: Prowlarr 2023-07-31 15:42:04.3|Debug|ProcessProvider| - [61] Prowlarr 2023-07-31 15:42:04.3|Info|MigrationController|*** Migrating data source=/config/prowlarr/prowlarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 2023-07-31 15:42:06.6|Info|FluentMigrator.Runner.MigrationRunner|34: history_fix_data_titles migrating 2023-07-31 15:42:06.7|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Beginning Transaction 2023-07-31 15:42:06.7|Info|history_fix_data_titles|Starting migration of Main DB to 34 2023-07-31 15:42:06.7|Info|FluentMigrator.Runner.MigrationRunner|PerformDBOperation 2023-07-31 15:42:06.7|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Performing DB Operation 2023-07-31 15:42:07.1|Error|FluentMigrator.Runner.MigrationRunner|Specified cast is not valid. [v1.7.4.3769] System.InvalidCastException: Specified cast is not valid. at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ) at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i) at NzbDrone.Core.Datastore.Migration.history_fix_data_titles.MigrateHistoryDataTitle(IDbConnection conn, IDbTransaction tran) in ./Prowlarr.Core/Datastore/Migration/034_history_fix_data_titles.cs:line 33 at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression) at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor) at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass80_0.<ExecuteExpressions>b__1() at FluentMigrator.Runner.StopWatch.Time(Action action) at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions) 2023-07-31 15:42:07.2|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Rolling back transaction 2023-07-31 15:42:07.2|Fatal|Microsoft.AspNetCore.Hosting.Diagnostics|Application startup exception [v1.7.4.3769] NzbDrone.Common.Exceptions.ProwlarrStartupException: Prowlarr failed to start: Error creating main database ---> System.InvalidCastException: Specified cast is not valid. at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ) at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i) at NzbDrone.Core.Datastore.Migration.history_fix_data_titles.MigrateHistoryDataTitle(IDbConnection conn, IDbTransaction tran) in ./Prowlarr.Core/Datastore/Migration/034_history_fix_data_titles.cs:line 33 at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression) at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor) at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass80_0.<ExecuteExpressions>b__1() at FluentMigrator.Runner.StopWatch.Time(Action action) at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions) at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action`2 getExpressions) at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp(IMigrationInfo migrationInfo, Boolean useTransaction) at FluentMigrator.Runner.MigrationRunner.MigrateUp(Int64 targetVersion, Boolean useAutomaticTransactionManagement) at FluentMigrator.Runner.MigrationRunner.MigrateUp(Boolean useAutomaticTransactionManagement) at FluentMigrator.Runner.MigrationRunner.MigrateUp() at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/Migration/Framework/MigrationController.cs:line 79 at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 115 --- End of inner exception stack trace --- at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 161 at NzbDrone.Core.Datastore.DbFactory.Create(MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 70 at NzbDrone.Core.Datastore.DbFactory.Create(MigrationType migrationType) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 58 at NzbDrone.Core.Datastore.Extensions.CompositionExtensions.<>c.<AddDatabase>b__0_0(IDbFactory f) in ./Prowlarr.Core/Datastore/Extensions/CompositionExtensions.cs:line 10 at DryIoc.Registrator.ToFuncWithObjParams[D1,TService](Func`2 f, Object d1) in /_/src/DryIoc/Container.cs:line 7977 at DryIoc.Interpreter.TryInterpretFuncInvoke(IResolverContext r, MethodCallExpression e, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3680 at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3478 at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3129 at DryIoc.Interpreter.TryInterpretSingletonAndUnwrapContainerException(IResolverContext r, Expression expr, ImMapEntry`1 itemRef, Object& result) in /_/src/DryIoc/Container.cs:line 3058 at DryIoc.Factory.ApplyReuse(Expression serviceExpr, Request request) in /_/src/DryIoc/Container.cs:line 11017 at DryIoc.Factory.GetExpressionOrDefault(Request request) in /_/src/DryIoc/Container.cs:line 10936 at DryIoc.Container.ResolveAndCacheKeyed(Int32 serviceTypeHash, Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Object scopeName, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 535 at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 463 at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3614 at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3141 at DryIoc.Interpreter.TryInterpretNestedLambdaBodyAndUnwrapException(IResolverContext r, Expression bodyExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs) in /_/src/DryIoc/Container.cs:line 3424 at DryIoc.Interpreter.<>c__DisplayClass5_0.<TryInterpretNestedLambda>b__0() in /_/src/DryIoc/Container.cs:line 3323 at DryIoc.Interpreter.<>c__DisplayClass9_0`1.<ConvertFunc>b__0() in /_/src/DryIoc/Container.cs:line 3434 at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy`1.CreateValue() at System.Lazy`1.get_Value() at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, ProwlarrErrorPipeline errorHandler) in ./Prowlarr.Host/Startup.cs:line 235 at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app) at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) 2023-07-31 15:42:07.5|Fatal|ConsoleApp|EPIC FAIL! [v1.7.4.3769] NzbDrone.Common.Exceptions.ProwlarrStartupException: Prowlarr failed to start: Error creating main database ---> System.InvalidCastException: Specified cast is not valid. at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ) at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i) at NzbDrone.Core.Datastore.Migration.history_fix_data_titles.MigrateHistoryDataTitle(IDbConnection conn, IDbTransaction tran) in ./Prowlarr.Core/Datastore/Migration/034_history_fix_data_titles.cs:line 33 at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression) at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor) at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass80_0.<ExecuteExpressions>b__1() at FluentMigrator.Runner.StopWatch.Time(Action action) at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions) at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action`2 getExpressions) at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp(IMigrationInfo migrationInfo, Boolean useTransaction) at FluentMigrator.Runner.MigrationRunner.MigrateUp(Int64 targetVersion, Boolean useAutomaticTransactionManagement) at FluentMigrator.Runner.MigrationRunner.MigrateUp(Boolean useAutomaticTransactionManagement) at FluentMigrator.Runner.MigrationRunner.MigrateUp() at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/Migration/Framework/MigrationController.cs:line 79 at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 115 --- End of inner exception stack trace --- at NzbDrone.Core.Datastore.DbFactory.CreateMain(String connectionString, MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 161 at NzbDrone.Core.Datastore.DbFactory.Create(MigrationContext migrationContext) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 70 at NzbDrone.Core.Datastore.DbFactory.Create(MigrationType migrationType) in ./Prowlarr.Core/Datastore/DbFactory.cs:line 58 at NzbDrone.Core.Datastore.Extensions.CompositionExtensions.<>c.<AddDatabase>b__0_0(IDbFactory f) in ./Prowlarr.Core/Datastore/Extensions/CompositionExtensions.cs:line 10 at DryIoc.Registrator.ToFuncWithObjParams[D1,TService](Func`2 f, Object d1) in /_/src/DryIoc/Container.cs:line 7977 at DryIoc.Interpreter.TryInterpretFuncInvoke(IResolverContext r, MethodCallExpression e, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3680 at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3478 at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3129 at DryIoc.Interpreter.TryInterpretSingletonAndUnwrapContainerException(IResolverContext r, Expression expr, ImMapEntry`1 itemRef, Object& result) in /_/src/DryIoc/Container.cs:line 3058 at DryIoc.Factory.ApplyReuse(Expression serviceExpr, Request request) in /_/src/DryIoc/Container.cs:line 11017 at DryIoc.Factory.GetExpressionOrDefault(Request request) in /_/src/DryIoc/Container.cs:line 10936 at DryIoc.Container.ResolveAndCacheKeyed(Int32 serviceTypeHash, Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Object scopeName, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 535 at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, Object serviceKey, IfUnresolved ifUnresolved, Type requiredServiceType, Request preResolveParent, Object[] args) in /_/src/DryIoc/Container.cs:line 463 at DryIoc.Interpreter.TryInterpretMethodCall(IResolverContext r, MethodCallExpression callExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3614 at DryIoc.Interpreter.TryInterpret(IResolverContext r, Expression expr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs, Object& result) in /_/src/DryIoc/Container.cs:line 3141 at DryIoc.Interpreter.TryInterpretNestedLambdaBodyAndUnwrapException(IResolverContext r, Expression bodyExpr, IParameterProvider paramExprs, Object paramValues, ParentLambdaArgs parentArgs) in /_/src/DryIoc/Container.cs:line 3424 at DryIoc.Interpreter.<>c__DisplayClass5_0.<TryInterpretNestedLambda>b__0() in /_/src/DryIoc/Container.cs:line 3323 at DryIoc.Interpreter.<>c__DisplayClass9_0`1.<ConvertFunc>b__0() in /_/src/DryIoc/Container.cs:line 3434 at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy`1.CreateValue() at System.Lazy`1.get_Value() at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, ProwlarrErrorPipeline errorHandler) in ./Prowlarr.Host/Startup.cs:line 235 at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app) at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at NzbDrone.Host.Bootstrap.Start(String[] args, Action`1 trayCallback) in ./Prowlarr.Host/Bootstrap.cs:line 79 at NzbDrone.Console.ConsoleApp.Main(String[] args) in ./Prowlarr.Console/ConsoleApp.cs:line 43 ``` ### Trace Logs have been provided as applicable. Reports may be closed if the required logs are not provided. - [X] I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain `trace` - that are relevant and show this issue.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 31, 2023):

👋 @Snazzie, in order to help you further we'll need to see logs. You'll need to enable trace logging and replicate the problem that you encountered. Guidance on how to enable trace logging can be found in our troubleshooting guide.

@github-actions[bot] commented on GitHub (Jul 31, 2023): :wave: @Snazzie, in order to help you further we'll need to see logs. You'll need to enable trace logging and replicate the problem that you encountered. Guidance on how to enable trace logging can be found in our [troubleshooting guide](https://wiki.servarr.com/prowlarr/troubleshooting#logging-and-log-files).
Author
Owner

@Snazzie commented on GitHub (Jul 31, 2023):

i enabled trace

@Snazzie commented on GitHub (Jul 31, 2023): i enabled trace
Author
Owner

@mynameisbogdan commented on GitHub (Jul 31, 2023):

This happens when your database is corrupted.

See https://github.com/Prowlarr/Prowlarr/issues/1757#issuecomment-1652795222 for steps to fix it.

@mynameisbogdan commented on GitHub (Jul 31, 2023): This happens when your database is corrupted. See https://github.com/Prowlarr/Prowlarr/issues/1757#issuecomment-1652795222 for steps to fix it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Prowlarr#907
No description provided.