mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-03-02 22:57:22 -05:00
Upgrade to 1.70 database migration failed #895
Labels
No labels
Area: API
Area: Database
Area: Db-migration
Area: Download Clients
Area: Indexer
Area: Metadata API
Area: Notifications
Area: Tooling
Area: UI
Area: Update API
Priority: High
Priority: Low
Priority: Medium
Status: Cannot Reproduce
Status: Confirmed
Status: Help Wanted
Status: In Progress
Status: Indexer - need invite
Status: Info Needed
Status: Investigating
Status: Logs Needed
Status: Maybe One Day
Status: Needs Triage
Status: Unlikely
Status: Waiting for OP
Status: Won't Fix
Type: Bug
Type: Bug
Type: Documentation
Type: Duplicate
Type: Enhancement
Type: External Bug
Type: Feature Request
Type: Regression
Type: Support
Type: Support.
lidarr-pull
radarr-pull
sonarr upstream
sonarr-pull
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Prowlarr#895
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Krandor1 on GitHub (Jul 2, 2023).
Is there an existing issue for this?
Current Behavior
My prowlarr instance is set to auto-update to develop. Today it updated to 1.70 tried to migrate the database and crashed. In the event it was dabase corruption, restored DB manually from the updates folder prior to the upgrade and again from the scheduled backup from 6/28. Both still failed and crashed. Reverted to 1.63 and everything was fine.
NOTE : In the logs there is a permission error mentioned. I did fix this, delete DB, restore DB from backup and try again and it failed again. reverting to 1.63 with no DB changes worked fine.
Expected Behavior
1.70 database migration to work properly
Steps To Reproduce
Environment
What branch are you running?
Develop
Trace Logs?
2023-07-02 10:30:23.4|Info|InstallUpdateService|Downloading update 1.7.0.3623
2023-07-02 10:30:32.3|Info|InstallUpdateService|Verifying update package
2023-07-02 10:30:33.4|Info|InstallUpdateService|Update package verified successfully
2023-07-02 10:30:33.4|Info|InstallUpdateService|Extracting Update package
2023-07-02 10:30:41.2|Info|InstallUpdateService|Update package extracted successfully
2023-07-02 10:30:42.1|Info|BackupService|Starting Backup
2023-07-02 10:36:01.4|Info|InstallUpdateService|Preparing client
2023-07-02 10:36:08.3|Info|InstallUpdateService|Starting update client /tmp/prowlarr_update/Prowlarr.Update
2023-07-02 10:36:08.3|Info|InstallUpdateService|Prowlarr will restart shortly.
2023-07-02 10:36:42.6|Info|Bootstrap|Starting Prowlarr - /opt/Prowlarr/Prowlarr - Version 1.7.0.3623
2023-07-02 10:36:42.8|Info|AppFolderInfo|Data directory is being overridden to [/var/lib/prowlarr]
2023-07-02 10:36:42.8|Info|AppFolderInfo|Data directory is being overridden to [/var/lib/prowlarr]
2023-07-02 10:36:43.5|Info|AppFolderInfo|Data directory is being overridden to [/var/lib/prowlarr]
2023-07-02 10:36:43.7|Error|Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider|An error occurred while reading the key ring.
[v1.7.0.3623] System.UnauthorizedAccessException: Access to the path '/var/lib/prowlarr/asp/key-9e1c8380-693d-4645-acb0-fed67dbfed76.xml' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func
2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.File.OpenRead(String path) at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.ReadElementFromFile(String fullPath) at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElementsCore()+MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElements()
at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys()
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefresh)
2023-07-02 10:36:44.2|Info|MigrationController|*** Migrating data source=/var/lib/prowlarr/prowlarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
2023-07-02 10:36:44.5|Info|FluentMigrator.Runner.MigrationRunner|34: history_fix_data_titles migrating
2023-07-02 10:36:44.5|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Beginning Transaction
2023-07-02 10:36:44.5|Info|history_fix_data_titles|Starting migration of Main DB to 34
2023-07-02 10:36:44.5|Info|FluentMigrator.Runner.MigrationRunner|PerformDBOperation
2023-07-02 10:36:44.5|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Performing DB Operation
2023-07-02 10:39:04.6|Error|FluentMigrator.Runner.MigrationRunner|Specified cast is not valid.
[v1.7.0.3623] 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.b__1()
at FluentMigrator.Runner.StopWatch.Time(Action action)
at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions)
2023-07-02 10:39:05.0|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Rolling back transaction
2023-07-02 10:39:05.0|Fatal|Microsoft.AspNetCore.Hosting.Diagnostics|Application startup exception
[v1.7.0.3623] 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.b__1()
at FluentMigrator.Runner.StopWatch.Time(Action action)
at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection
1 expressions) at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action2 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.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, ImMapEntry1 itemRef, Object& result) in //src/DryIoc/Container.cs:line 3058at 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.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.Lazy1.ViaFactory(LazyThreadSafetyMode mode)at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue()at System.Lazy
1.get_Value() at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IStartupContext startupContext, Lazy1 mainDatabaseFactory, Lazy1 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, Span1& 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.b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.b__1(IApplicationBuilder app)
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
2023-07-02 10:39:05.2|Fatal|ConsoleApp|EPIC FAIL!
[v1.7.0.3623] 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.b__1()
at FluentMigrator.Runner.StopWatch.Time(Action action)
at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection
1 expressions) at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action2 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.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, ImMapEntry1 itemRef, Object& result) in //src/DryIoc/Container.cs:line 3058at 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.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.Lazy1.ViaFactory(LazyThreadSafetyMode mode)at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue()at System.Lazy
1.get_Value() at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IStartupContext startupContext, Lazy1 mainDatabaseFactory, Lazy1 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, Span1& 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.b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.b__1(IApplicationBuilder app)
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.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.
trace- that are relevant and show this issue.@Krandor1 commented on GitHub (Jul 2, 2023):
This looks to be to be the main place of the issue in the logs I have.
2023-07-02 10:36:44.2|Info|MigrationController|*** Migrating data source=/var/lib/prowlarr/prowlarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
2023-07-02 10:36:44.5|Info|FluentMigrator.Runner.MigrationRunner|34: history_fix_data_titles migrating
2023-07-02 10:36:44.5|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Beginning Transaction
2023-07-02 10:36:44.5|Info|history_fix_data_titles|Starting migration of Main DB to 34
2023-07-02 10:36:44.5|Info|FluentMigrator.Runner.MigrationRunner|PerformDBOperation
2023-07-02 10:36:44.5|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Performing DB Operation
2023-07-02 10:39:04.6|Error|FluentMigrator.Runner.MigrationRunner|Specified cast is not valid.
[v1.7.0.3623] System.InvalidCastException: Specified cast is not valid.
at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
@mynameisbogdan commented on GitHub (Jul 2, 2023):
Your history is broken somewhere. Delete all history before updating again.
@mynameisbogdan commented on GitHub (Jul 3, 2023):
@Krandor1 I'll need some info from you.
If you're on linux go to your config directory or even by using a backup, run
sqlite3 prowlarr.dbin the directory with the prowlarr.db file. Type.schema Historyand provide the output here. To exit sqlite cli type.quit.@mynameisbogdan commented on GitHub (Jul 3, 2023):
And you'll have to fix this as well:
@Krandor1 commented on GitHub (Jul 3, 2023):
the "Access to the path '/var/lib/prowlarr/asp/key-9e1c8380-693d-4645-acb0-fed67dbfed76.xml'" thing I did fix and then restored db from backup and ran it again and the same errors below still occurred..
I will past the history stuff in shortly.
@mynameisbogdan commented on GitHub (Jul 3, 2023):
While you're doing that, also tell me the sqlite version shown in System > Status.
@Qstick commented on GitHub (Jul 3, 2023):
@Krandor1 if you could join Discord that may be helpful. We would like to get to the bottom of this and may need some additional info from you on your DB
https://prowlarr.com/discord
@mynameisbogdan commented on GitHub (Jul 4, 2023):
@Krandor1 any news?
@zx900930 commented on GitHub (Jul 26, 2023):
Have the same problem during the migrations to version 1.7.4.3769
trace logs:
And I found the History table are full of null values.

and drop the History table return
SQLite Database Disk Image is Malformederror.I have to:
CREATE TABLE "History" ("Id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "IndexerId" INTEGER NOT NULL, "Date" DATETIME NOT NULL, "Data" TEXT NOT NULL, "EventType" INTEGER, "DownloadId" TEXT, "Successful" INTEGER NOT NULL DEFAULT 1);In order to make it work again.
@mynameisbogdan commented on GitHub (Jul 26, 2023):
I managed to recover from a corrupted db using these sqlite commands.
@uvejota commented on GitHub (Aug 1, 2023):
The previous commands did not work for me, but I managed to fix it by following the recommendations in stackoverflow:
And then restarting the service/container.