Ombi Integration Broken
Summary
Ombi and SickRage have undergone various levels of development since they were last integrated and it appears as though now, Ombi no longer properly integrates with SickRage. Connecting the two in Ombi shows a successful connection but the Event Viewer on my Windows machine reveals another story after the successful connection occurs. Briefly, it appears as though Ombi throws an exception when trying to cache SickRage and insists that the data it retrieves from SickRage in impossible to deserialize (JSON object). There are multiple repeated errors in my Event viewer similar to the one below:
`Category: Ombi.Schedule.Jobs.SickRage.SickRageSync EventId: 2009
Exception when trying to cache SickRage
Exception:
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List1[System.Int32]' 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 'data', line 1, position 116. 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.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) 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.CreateValueInternal(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, CancellationToken cancellationToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Api/Api.cs:line 90 at Ombi.Api.SickRage.SickRageApi.GetSeasonList(Int32 tvdbId, String apikey, String baseurl) in /home/runner/work/Ombi/Ombi/src/Ombi.Api.SickRage/SickRageApi.cs:line 116 at Ombi.Schedule.Jobs.SickRage.SickRageSync.Execute(IJobExecutionContext job) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs:line 67
Branch/Commit
This has been happening for the last six months if not a year: Current Branch / Commit is 10.0.46
OS
Windows 11 Version 10.0.22000 Build 22000
Steps to reproduce
Install Ombi, alongside Sickrage: https://ombi.io/. Once installed, and operating properly, connect it to SickRage. Then, request a TV show you don't have in Plex with Ombi. Approve it in Ombi. Check SickRage for TV show.
What is the current bug behavior?
Ombi sends the new TV shows request to SickRage but fails to register the new entry or begin looking for the episodes.
What is the expected correct behavior?
When it worked correctly, all approved TV shows in Ombi were automatically added to the SickRage inventory and searching was begun for the various titles. Expected behaviour is this.
Relevant logs and/or screenshots
This is the repeated core error: ` Category: Ombi.Schedule.Jobs.SickRage.SickRageSync EventId: 2009
Exception when trying to cache SickRage
Exception:
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List1[System.Int32]' 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 'data', line 1, position 116. 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.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) 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.CreateValueInternal(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, CancellationToken cancellationToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Api/Api.cs:line 90 at Ombi.Api.SickRage.SickRageApi.GetSeasonList(Int32 tvdbId, String apikey, String baseurl) in /home/runner/work/Ombi/Ombi/src/Ombi.Api.SickRage/SickRageApi.cs:line 116 at Ombi.Schedule.Jobs.SickRage.SickRageSync.Execute(IJobExecutionContext job) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs:line 67
Possible fixes
I don't know enough about the backend of SickRage but this is the declared error and it's fix:
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List
1[System.Int32]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
`
I suspect that Ombi is looking for an array where there is none.