Radarr update corrupted main database

Created on 4 Dec 2020  路  4Comments  路  Source: Radarr/Radarr

Describe the bug
Startup failure due to what looks like a version update migration failure

To Reproduce
Steps to reproduce the behavior:
Started Radarr after an update

Expected behavior
Radarr starts

image

Platform Information (please complete the following information):

  • OS: Windows 7
  • Docker: No
  • Mono or.NET Core Version: [e.g. Mono 5.8 or .Net Core 3.1.10] (found under System -> Status)
  • Browser and Version [e.g. chrome 86.0.4240.198] (Only needed for UI issues)
  • Radarr Version [e.g. 3.0.0.2956]
  • Radarr Branch [e.g. master]

Trace Logs

2020-11-29 02:55:16.4|Info|Bootstrap|Starting Radarr - C:\ProgramData\Radarr\bin\Radarr.dll - Version 3.0.0.4204
2020-11-29 02:55:17.1|Info|Router|Application mode: Interactive
2020-11-29 02:55:17.1|Info|MigrationController|*** Migrating data source=C:\ProgramData\Radarr\radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
2020-11-29 02:55:17.3|Info|MigrationLoggerProvider|*** 130: remove_wombles_kickass migrating ***
2020-11-29 02:55:17.3|Info|remove_wombles_kickass|Starting migration to 130
2020-11-29 02:55:18.1|Info|MigrationLoggerProvider|*** 152: add_custom_filters migrating ***
2020-11-29 02:55:18.1|Info|add_custom_filters|Starting migration to 152
2020-11-29 02:55:18.2|Info|MigrationLoggerProvider|*** 153: indexer_client_status_search_changes migrating ***
2020-11-29 02:55:18.2|Info|indexer_client_status_search_changes|Starting migration to 153
2020-11-29 02:55:18.3|Info|MigrationLoggerProvider|*** 154: add_language_to_files_history_blacklist migrating ***
2020-11-29 02:55:18.3|Info|add_language_to_files_history_blacklist|Starting migration to 154
2020-11-29 02:55:19.6|Info|MigrationLoggerProvider|*** 155: add_update_allowed_quality_profile migrating ***
2020-11-29 02:55:19.6|Info|add_update_allowed_quality_profile|Starting migration to 155
2020-11-29 02:55:19.6|Info|MigrationLoggerProvider|*** 156: add_download_client_priority migrating ***
2020-11-29 02:55:19.6|Info|add_download_client_priority|Starting migration to 156
2020-11-29 02:55:19.7|Info|MigrationLoggerProvider|*** 157: remove_growl_prowl migrating ***
2020-11-29 02:55:19.7|Info|remove_growl_prowl|Starting migration to 157
2020-11-29 02:55:19.7|Info|MigrationLoggerProvider|*** 158: remove_plex_hometheatre migrating ***
2020-11-29 02:55:19.7|Info|remove_plex_hometheatre|Starting migration to 158
2020-11-29 02:55:19.7|Info|MigrationLoggerProvider|*** 159: add_webrip_qualites migrating ***
2020-11-29 02:55:19.7|Info|add_webrip_qualites|Starting migration to 159
2020-11-29 02:55:19.8|Info|MigrationLoggerProvider|*** 160: health_issue_notification migrating ***
2020-11-29 02:55:19.8|Info|health_issue_notification|Starting migration to 160
2020-11-29 02:55:19.8|Info|MigrationLoggerProvider|*** 161: speed_improvements migrating ***
2020-11-29 02:55:19.8|Info|speed_improvements|Starting migration to 161
2020-11-29 02:55:19.9|Info|MigrationLoggerProvider|*** 162: fix_profile_format_default migrating ***
2020-11-29 02:55:19.9|Info|fix_profile_format_default|Starting migration to 162
2020-11-29 02:55:19.9|Info|MigrationLoggerProvider|*** 163: task_duration migrating ***
2020-11-29 02:55:19.9|Info|task_duration|Starting migration to 163
2020-11-29 02:55:20.0|Info|MigrationLoggerProvider|*** 164: movie_collections_crew migrating ***
2020-11-29 02:55:20.0|Info|movie_collections_crew|Starting migration to 164
2020-11-29 02:55:20.5|Info|MigrationLoggerProvider|*** 165: remove_custom_formats_from_quality_model migrating ***
2020-11-29 02:55:20.5|Info|remove_custom_formats_from_quality_model|Starting migration to 165
2020-11-29 02:55:21.5|Info|MigrationLoggerProvider|*** 166: fix_tmdb_list_config migrating ***
2020-11-29 02:55:21.5|Info|fix_tmdb_list_config|Starting migration to 166
2020-11-29 02:55:21.5|Info|MigrationLoggerProvider|*** 167: remove_movie_pathstate migrating ***
2020-11-29 02:55:21.5|Info|remove_movie_pathstate|Starting migration to 167
2020-11-29 02:55:22.3|Info|MigrationLoggerProvider|*** 168: custom_format_rework migrating ***
2020-11-29 02:55:22.3|Info|custom_format_rework|Starting migration to 168
2020-11-29 02:55:22.4|Info|MigrationLoggerProvider|*** 169: custom_format_scores migrating ***
2020-11-29 02:55:22.4|Info|custom_format_scores|Starting migration to 169
2020-11-29 02:55:22.4|Info|MigrationLoggerProvider|*** 170: fix_trakt_list_config migrating ***
2020-11-29 02:55:22.4|Info|fix_trakt_list_config|Starting migration to 170
2020-11-29 02:55:22.5|Info|MigrationLoggerProvider|*** 171: quality_definition_preferred_size migrating ***
2020-11-29 02:55:22.5|Info|quality_definition_preferred_size|Starting migration to 171
2020-11-29 02:55:22.5|Info|MigrationLoggerProvider|*** 172: add_download_history migrating ***
2020-11-29 02:55:22.5|Info|add_download_history|Starting migration to 172
2020-11-29 02:55:22.6|Error|MigrationLoggerProvider|System.FormatException: String '2019-01-08 q1:03:56.9786364Z' was not recognized as a valid DateTime.
   at System.DateTimeParse.ParseExactMultiple(ReadOnlySpan`1 s, String[] formats, DateTimeFormatInfo dtfi, DateTimeStyles style)
   at System.DateTime.ParseExact(String s, String[] formats, IFormatProvider provider, DateTimeStyles style)
   at System.Data.SQLite.SQLiteConvert.ToDateTime(String dateText, SQLiteDateFormats format, DateTimeKind kind, String formatString)
   at System.Data.SQLite.SQLiteConvert.ToDateTime(String dateText)
   at System.Data.SQLite.SQLiteConvert.ToDateTime(IntPtr ptr, Int32 len)
   at System.Data.SQLite.SQLite3.GetDateTime(SQLiteStatement stmt, Int32 index)
   at System.Data.SQLite.SQLiteDataReader.GetDateTime(Int32 i)
   at NzbDrone.Core.Datastore.Migration.add_download_history.InitialImportedDownloadHistory(IDbConnection conn, IDbTransaction tran) in D:\a\1\s\src\NzbDrone.Core\Datastore\Migration\172_add_download_history.cs:line 57
   at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression)
   at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor)
   at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass70_0.<ExecuteExpressions>b__1()
   at FluentMigrator.Runner.StopWatch.Time(Action action)
   at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions)

[v3.0.0.4204] System.FormatException: String '2019-01-08 q1:03:56.9786364Z' was not recognized as a valid DateTime.
   at System.DateTimeParse.ParseExactMultiple(ReadOnlySpan`1 s, String[] formats, DateTimeFormatInfo dtfi, DateTimeStyles style)
   at System.DateTime.ParseExact(String s, String[] formats, IFormatProvider provider, DateTimeStyles style)
   at System.Data.SQLite.SQLiteConvert.ToDateTime(String dateText, SQLiteDateFormats format, DateTimeKind kind, String formatString)
   at System.Data.SQLite.SQLiteConvert.ToDateTime(String dateText)
   at System.Data.SQLite.SQLiteConvert.ToDateTime(IntPtr ptr, Int32 len)
   at System.Data.SQLite.SQLite3.GetDateTime(SQLiteStatement stmt, Int32 index)
   at System.Data.SQLite.SQLiteDataReader.GetDateTime(Int32 i)
   at NzbDrone.Core.Datastore.Migration.add_download_history.InitialImportedDownloadHistory(IDbConnection conn, IDbTransaction tran) in D:\a\1\s\src\NzbDrone.Core\Datastore\Migration\172_add_download_history.cs:line 57
   at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression)
   at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor)
   at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass70_0.<ExecuteExpressions>b__1()
   at FluentMigrator.Runner.StopWatch.Time(Action action)
   at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions)


2020-11-29 02:55:22.7|Fatal|WindowsApp|EPIC FAIL: Radarr failed to start: Error creating main database

All 4 comments

We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please hop over onto our Discord or Subreddit

Slightly Corrupted DB it looks like possibly.

Or

might also be an edge case on the migration; we鈥檒l take a look

I found the one record that was in the History table and removed it. That solved the problem and allowed the migration to complete. I think the data was corrupt for some reason and is probably a one off issue

Closing then, not a bug in the end.

For future reference for people coming by we have a FAQ entry on malformed database; effectively you dump the new DB, use the SQL to try to create a new one and delete or fix whatever SQL is causing problems

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattman86 picture mattman86  路  3Comments

DaveidWeba picture DaveidWeba  路  3Comments

onedr0p picture onedr0p  路  3Comments

NewUser9 picture NewUser9  路  3Comments

jurpeedurp picture jurpeedurp  路  3Comments