Getting an error trying to access the "Settings" tab

Hey there.

I am having issues pulling up the settings pane on my Sonarr client.

When I open the Network tab in my browser, when sending a request to “host” it returns an error with the code 500.

I am on Ubuntu 14.04.3

This is the log I am getting from mono --debug NzbDrone.exe

[Debug] OwinAppFactory: Attaching NzbDroneVersionMiddleWare to host 
[Debug] OwinAppFactory: Attaching SignalRMiddleWare to host 
[Debug] OwinAppFactory: Attaching NancyMiddleWare to host 
[Info] NancyBootstrapper: Starting NzbDrone API 
[Trace] EventAggregator: Publishing ApplicationStartedEvent 
[Trace] EventAggregator: ApplicationStartedEvent -> UserService 
[Trace] EventAggregator: ApplicationStartedEvent <- UserService 
[Trace] EventAggregator: ApplicationStartedEvent -> DownloadClientFactory 
[Debug] DownloadClientFactory: Initializing Providers. Count 9 
[Trace] EventAggregator: ApplicationStartedEvent <- DownloadClientFactory 
[Trace] EventAggregator: ApplicationStartedEvent -> IndexerFactory 
[Debug] IndexerFactory: Initializing Providers. Count 14 
[Trace] EventAggregator: ApplicationStartedEvent <- IndexerFactory 
[Trace] EventAggregator: ApplicationStartedEvent -> ReconfigureLogging 
[Info] SceneMappingService: Updating Scene mappings 
[Info] HousekeepingService: Running housecleaning tasks 
[Info] Database: Vacuuming Log database 
[Info] Database: Log database compressed 
[Info] Database: Vacuuming Main database 
[Info] Database: Main database compressed 
[Warn] GlobalExceptionHandlers: SignalR Heartbeat interupted 
[Fatal] NzbDroneErrorPipeline: Request Failed 

System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.Single<NzbDrone.Core.Authentication.User> (System.Collections.Generic.IEnumerable`1<NzbDrone.Core.Authentication.User>,System.Func`2<NzbDrone.Core.Authentication.User, bool>,System.Linq.Enumerable/Fallback) <0x000a7>
at System.Linq.Enumerable.SingleOrDefault<NzbDrone.Core.Authentication.User> (System.Collections.Generic.IEnumerable`1<NzbDrone.Core.Authentication.User>) <0x0005f>
at NzbDrone.Core.Datastore.BasicRepository`1<NzbDrone.Core.Authentication.User>.SingleOrDefault () <0x00033>
at NzbDrone.Core.Authentication.UserService.FindUser () [0x00000] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Authentication\UserService.cs:71
at NzbDrone.Api.Config.HostConfigModule.GetHostConfig () [0x00025] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Api\Config\HostConfigModule.cs:55
at NzbDrone.Api.REST.RestModule`1<NzbDrone.Api.Config.HostConfigResource>.<set_GetResourceSingle>b__e (object) <0x0001a>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object) <IL 0x00038, 0x000a0>
at Nancy.Routing.Route/<>c__DisplayClass4.<Wrap>b__3 (object,System.Threading.CancellationToken) <IL 0x0005f, 0x00137>


[Fatal] NzbDroneErrorPipeline: Request Failed 

System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.Single<NzbDrone.Core.Authentication.User> (System.Collections.Generic.IEnumerable`1<NzbDrone.Core.Authentication.User>,System.Func`2<NzbDrone.Core.Authentication.User, bool>,System.Linq.Enumerable/Fallback) <0x000a7>
at System.Linq.Enumerable.SingleOrDefault<NzbDrone.Core.Authentication.User> (System.Collections.Generic.IEnumerable`1<NzbDrone.Core.Authentication.User>) <0x0005f>
at NzbDrone.Core.Datastore.BasicRepository`1<NzbDrone.Core.Authentication.User>.SingleOrDefault () <0x00033>
at NzbDrone.Core.Authentication.UserService.FindUser () [0x00000] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Authentication\UserService.cs:71
at NzbDrone.Api.Config.HostConfigModule.GetHostConfig () [0x00025] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Api\Config\HostConfigModule.cs:55
at NzbDrone.Api.REST.RestModule`1<NzbDrone.Api.Config.HostConfigResource>.<set_GetResourceSingle>b__e (object) <0x0001a>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object) <IL 0x00038, 0x000a0>
at Nancy.Routing.Route/<>c__DisplayClass4.<Wrap>b__3 (object,System.Threading.CancellationToken) <IL 0x0005f, 0x00137>

Sonarr version: 2.0.0.3357

Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)

Thanks. :smile:

The issue is that somehow multiple users were inserted into the database, but Sonarr expects only one to exist.

The easiest solution would be to edit the database and remove the users and let Sonarr re-create it, its a SQLite database located in Sonarr’s AppData directory (as shown on System: Status).

Running this SQL command with delete the users:
DELETE FROM Users

We’ll also take a look at preventing this from happening.

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