2.0.0.4370 won't start - DB Migration failing

Sonarr version (exact version): 2.0.0.4326
Mono version (if Sonarr is not running on Windows):4.6.1 (mono-4.6.0-branch-c8sr0/abb06f1 Fri Sep 23 19:24:23 EDT 2016)
OS: OS X 10.10.5
((Debug logs)):
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue:

Just updated to the latest version and it won’t start. I’ve rolled back to the last release and all is working as expected.

Error from the log -

16-10-28 16:00:34.7|Fatal|ConsoleApp|EPIC FAIL!

[v2.0.0.4370] System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0009c] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:1266
at System.String.Substring (System.Int32 startIndex) [0x00000] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:1232
at NzbDrone.Core.Datastore.Migration.extra_and_subtitle_files.SetMetadataFileExtension (System.Data.IDbConnection conn, System.Data.IDbTransaction tran) [0x00031] in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Datastore\Migration\099_extra_and_subtitle_files.cs:55
at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process (FluentMigrator.Builders.Execute.PerformDBOperationExpression expression) [0x0002c] in c:\Community\schambers\fluentmigrator\src\FluentMigrator.Runner\Processors\SQLite\SQLiteProcessor.cs:116
at FluentMigrator.Builders.Execute.PerformDBOperationExpression.ExecuteWith (FluentMigrator.IMigrationProcessor processor) [0x00000] in c:\Community\schambers\fluentmigrator\src\FluentMigrator\Builders\Execute\ExecuteExpressionRoot.cs:67
at FluentMigrator.Runner.MigrationRunner+<>c__DisplayClass18.b__15 () [0x00000] in c:\Community\schambers\fluentmigrator\src\FluentMigrator.Runner\MigrationRunner.cs:419
at FluentMigrator.Runner.StopWatch.Time (System.Action action) [0x00006] in c:\Community\schambers\fluentmigrator\src\FluentMigrator.Runner\StopWatch.cs:57
at FluentMigrator.Runner.MigrationRunner.AnnounceTime (System.String message, System.Action action) [0x0000c] in c:\Community\schambers\fluentmigrator\src\FluentMigrator.Runner\MigrationRunner.cs:447
at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions (System.Collections.Generic.ICollection`1[T] expressions) [0x00071] in c:\Community\schambers\fluentmigrator\src\FluentMigrator.Runner\MigrationRunner.cs:419

I’m happy running the Sep release but thought you might like the feedback.

Thanks for Sonarr !

Beemer

Same here on Debian 7.11 with Mono 4.2.3.

I upgraded from 4326 to 4370.

Here is the log:

16-10-28 17:08:56.7|Info|Bootstrap|Starting Sonarr - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.4370
16-10-28 17:08:57.3|Info|MigrationLogger|*** Migrating data source=/tank/nzb/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journa
l mode=Wal;pooling=True;version=3 ***
16-10-28 17:08:57.5|Info|MigrationLogger|*** 99: extra_and_subtitle_files migrating ***
16-10-28 17:08:57.5|Info|extra_and_subtitle_files|Starting migration to 99
16-10-28 17:08:57.5|Error|MigrationLogger|StartIndex cannot be less than zero.
Parameter name: startIndex

[v2.0.0.4370] System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
  at System.String.Substring (Int32 startIndex, Int32 length) <0x7fe97ac34950 + 0x000c1> in <filename unknown>:0
  at System.String.Substring (Int32 startIndex) <0x7fe97ac34920 + 0x0001e> in <filename unknown>:0
  at NzbDrone.Core.Datastore.Migration.extra_and_subtitle_files.SetMetadataFileExtension (IDbConnection conn, IDbTransaction tran) <0x4036ed10 + 0x001
32> in <filename unknown>:0
  at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process (FluentMigrator.Builders.Execute.PerformDBOperationExpression expression) <0x4036
ec70 + 0x0007d> in <filename unknown>:0
  at FluentMigrator.Builders.Execute.PerformDBOperationExpression.ExecuteWith (IMigrationProcessor processor) <0x4036ebf0 + 0x00023> in <filename unkn
own>:0
  at FluentMigrator.Runner.MigrationRunner+<>c__DisplayClass18.<ExecuteExpressions>b__15 () <0x4036a9e0 + 0x00029> in <filename unknown>:0
  at FluentMigrator.Runner.StopWatch.Time (System.Action action) <0x4036a960 + 0x0001e> in <filename unknown>:0
  at FluentMigrator.Runner.MigrationRunner.AnnounceTime (System.String message, System.Action action) <0x4036a8a0 + 0x00057> in <filename unknown>:0
  at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions (ICollection`1 expressions) <0x4036a000 + 0x00517> in <filename unknown>:0

16-10-28 17:08:57.5|Fatal|ConsoleApp|EPIC FAIL!

[v2.0.0.4370] System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
  at System.String.Substring (Int32 startIndex, Int32 length) <0x7fe97ac34950 + 0x000c1> in <filename unknown>:0
  at System.String.Substring (Int32 startIndex) <0x7fe97ac34920 + 0x0001e> in <filename unknown>:0
  at NzbDrone.Core.Datastore.Migration.extra_and_subtitle_files.SetMetadataFileExtension (IDbConnection conn, IDbTransaction tran) <0x4036ed10 + 0x00132> in <filename unknown>:0
  at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process (FluentMigrator.Builders.Execute.PerformDBOperationExpression expression) <0x4036ec70 + 0x0007d> in <filename unknown>:0
  at FluentMigrator.Builders.Execute.PerformDBOperationExpression.ExecuteWith (IMigrationProcessor processor) <0x4036ebf0 + 0x00023> in <filename unknown>:0
  at FluentMigrator.Runner.MigrationRunner+<>c__DisplayClass18.<ExecuteExpressions>b__15 () <0x4036a9e0 + 0x00029> in <filename unknown>:0
  at FluentMigrator.Runner.StopWatch.Time (System.Action action) <0x4036a960 + 0x0001e> in <filename unknown>:0
  at FluentMigrator.Runner.MigrationRunner.AnnounceTime (System.String message, System.Action action) <0x4036a8a0 + 0x00057> in <filename unknown>:0
  at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions (ICollection`1 expressions) <0x4036a000 + 0x00517> in <filename unknown>:0

Sonarr versiion: Version 2.0.0.4370
Mono version: Mono JIT compiler version 4.6.1
OS: Arch Linux (pkg installed from AUR)
((debug logs)): http://pastebin.com/y8sS4EQe
Description of issue: Previously working installation of Sonarr. Upgraded to 2.0 in the Arch AUR, and upon running it fails, puking out a Mono error in the migration process. No habla C#, but the error msg appears to be indicating a bad value passed into a data stucture during DB access?

Just blindly reinstalling the pkg didn’t work. I’d appreciate any help in tracking down what broke.

I’d used sickbeard for several years, and tried switching to Sonarr about a month ago. So far Sonarr’s pretty much been blowing my hair back - love your work - I’d definitely like to get the installation back in service. Thanks.

Could someone PM me a link to download a backup of your database? I want to see how it could have gotten in a state where this would fail.

This issue is fixed in 2.0.0.4374. You’ll need to manually install it manually as Sonarr isn’t able to startup and check for an update.

2.0.0.4374 fixes the issue for me. Thank you.

Note for Arch users: the sha512sum for NzbDrone.master.2.0.0.4374.mono.tar.gz is

e18ec5af06f9a0c4fdd3caddcc303367bf963a4669653eec73cad96957b1bd61b35e106d2770da025796ee5c7e25790ead3e9b5b41070ac3dbc632ece2022e8c
1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.