V3 Sonarr - unable to add TV show via NZB 360

Sonarr version (exact version): 3.0.0.260
Mono version (if Sonarr is not running on Windows):
OS: Windows 10
Debug logs: See below
(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. Post in .txt not .doc, .rtf or some other formatted document)
Description of issue: Unable to add a TV show to Sonarr v3 via th NZB 360 app.

Error in Sonarr log:


[v3.0.0.260] System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at NzbDrone.Core.Qualities.Quality.FindById(Int32 id) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Qualities\Quality.cs:line 152
   at NzbDrone.Api.Profiles.ProfileResourceMapper.ToResource(Profile model) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileResource.cs:line 28
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at NzbDrone.Api.Profiles.ProfileResourceMapper.ToResource(IEnumerable`1 models) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileResource.cs:line 91
   at NzbDrone.Api.Profiles.ProfileModule.GetAll() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileModule.cs:line 52
   at Sonarr.Http.REST.RestModule`1.<set_GetResourceAll>b__33_0(Object options) in M:\BuildAgent\work\63739567f01dbcc2\src\Sonarr.Http\REST\RestModule.cs:line 121
   at CallSite.Target(Closure , CallSite , Func`2 , Object )
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

Possibly a local Sonarr problem, as my son doesn’t have any issues with NZB 360 and Sonarr v3.

Also, I can add TV shows to his Sonarr if I point my NZB 360 app at his Sonarr service.

Any help would be appreciated please.

No response as yet.

Do I need to supply anything else ?

I have the NZB 360 dev investigating, so it would be nice for the Sonarr devs to comment here please, if only to provide suggestions.

Thanks.

I also currently have issues with NZB360 but I assumed it was the app not sonarr. When I try to add a show it fails on retrieving quality profiles.

[v3.0.0.260] System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at NzbDrone.Core.Qualities.Quality.FindById (System.Int32 id) [0x00009] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Qualities\Quality.cs:154 
  at NzbDrone.Core.Qualities.Quality.op_Explicit (System.Int32 id) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Qualities\Quality.cs:164 
  at NzbDrone.Api.Profiles.ProfileResourceMapper.ToResource (NzbDrone.Core.Profiles.Qualities.Profile model) [0x00005] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileResource.cs:28 
  at System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].ToList () [0x0002a] in <7aa7d6192efc4d31a9896d7a49ef2104>:0 
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <7aa7d6192efc4d31a9896d7a49ef2104>:0 
  at NzbDrone.Api.Profiles.ProfileResourceMapper.ToResource (System.Collections.Generic.IEnumerable`1[T] models) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileResource.cs:91 
  at NzbDrone.Api.Profiles.ProfileModule.GetAll () [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileModule.cs:52 
  at Sonarr.Http.REST.RestModule`1[TResource].<set_GetResourceAll>b__33_0 (System.Object options) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\Sonarr.Http\REST\RestModule.cs:121 
  at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)
  at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <bb3027f50b35411088f45475912cc2ff>:0 

1 Like

Hi Derek.

Exactly the same as mine by the looks of it.

Kevin is investigating from the app side.

https://nzb360.com/forums/viewtopic.php?t=1244

No, just haven’t had a chance to look into it or respond…

I think I might know what the issue is.

Neither of my ideas panned out, would you be able to send me a copy of your database so I can try to reproduce it? My guess is it’s a group that’s being treated as an ID, but I haven’t found a way to achieve that quite yet. I’m also going to add some additional logging in an upcoming build.

If you can send me a copy, upload it somewhere and PM me a link. It will have API keys, etc, so feel free to remove those before sending.

Hi Msrkus.
I’ll get that sorted today and supply a link.
I understand you’ve been in contact with Kev.
Thanks.

The Same problem seems to happen with “Ombi” (Plexrequests.net rename).

Sonarr log reports…

Message
Request Failed. GET /api/profile: Index was outside the bounds of the array.
Exception

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at NzbDrone.Core.Qualities.Quality.FindById(Int32 id) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Qualities\Quality.cs:line 152
   at NzbDrone.Api.Profiles.ProfileResourceMapper.ToResource(Profile model) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileResource.cs:line 28
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at NzbDrone.Api.Profiles.ProfileResourceMapper.ToResource(IEnumerable`1 models) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileResource.cs:line 91
   at NzbDrone.Api.Profiles.ProfileModule.GetAll() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Api\Profiles\ProfileModule.cs:line 52
   at Sonarr.Http.REST.RestModule`1.<set_GetResourceAll>b__33_0(Object options) in M:\BuildAgent\work\63739567f01dbcc2\src\Sonarr.Http\REST\RestModule.cs:line 121
   at CallSite.Target(Closure , CallSite , Func`2 , Object )
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

Ombi lor reports…

2018-09-25 12:30:57.782 +00:00 [Error] StatusCode: InternalServerError, Reason: Internal Server Error, RequestUri: http://127.0.0.1:8181/api/profile
2018-09-25 12:30:57.783 +00:00 [Error] Something bad happened, ErrorMiddleware caught this
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[Ombi.Api.Sonarr.Models.SonarrProfile]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'message', line 2, position 12.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Ombi.Api.Api.Request[T](Request request) in C:\projects\requestplex\src\Ombi.Api\Api.cs:line 77
   at Ombi.Api.Sonarr.SonarrApi.GetProfiles(String apiKey, String baseUrl) in C:\projects\requestplex\src\Ombi.Api.Sonarr\SonarrApi.cs:line 25
   at Ombi.Controllers.External.SonarrController.GetProfiles(SonarrSettings settings) in C:\projects\requestplex\src\Ombi\Controllers\External\SonarrController.cs:line 37
   at lambda_method(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
   at Ombi.ApiKeyMiddlewear.Invoke(HttpContext context) in C:\projects\requestplex\src\Ombi\ApiKeyMiddlewear.cs:line 50
   at Ombi.ErrorHandlingMiddleware.Invoke(HttpContext context) in C:\projects\requestplex\src\Ombi\ErrorHandlingMiddlewear.cs:line 24

I have PM’d you with a link to download my db.

Thanks

Harroguk

1 Like

PM sent Markus.

Any update yet please Markus?

I know what the issue is, but don’t yet have a fix for it. Turns out the cutoff is the culprit here, due to it being a group which is why only some people are running into it.

OK, thanks for the update.

This should be fixed in the latest update, let me know if it isn’t.

1 Like

All working again.

Thanks Markus.

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