Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plexrequest doesn't monitor Sonarr Episodes on the Sonarr develop branch #450

Closed
ShepherdDimaloun opened this issue Aug 2, 2016 · 20 comments

Comments

@ShepherdDimaloun
Copy link

ShepherdDimaloun commented Aug 2, 2016

If this is a bug report please make sure you have filled the following in:
(If it's not a bug and a feature request then just remove the below)

Plex Requests.Net Version:

1.8.4

Operating System:

Windows Server 2012 R2

Mono Version:

Applicable Logs (from /logs/ directory or the Admin page):

2016/08/02 09:16:07.226 PlexRequests.Api.SonarrApi Debug: Sonarr API Options: 
2016/08/02 09:16:07.337 PlexRequests.Api.SonarrApi Debug: {
  "addOptions": null,
  "title": "Buffy the Vampire Slayer",
  "seasons": [
    {
      "seasonNumber": 1,
      "monitored": false,
      "statistics": null
    },
    {
      "seasonNumber": 2,
      "monitored": false,
      "statistics": null
    },
    {
      "seasonNumber": 3,
      "monitored": false,
      "statistics": null
    },
    {
      "seasonNumber": 4,
      "monitored": false,
      "statistics": null
    },
    {
      "seasonNumber": 5,
      "monitored": false,
      "statistics": null
    },
    {
      "seasonNumber": 6,
      "monitored": false,
      "statistics": null
    },
    {
      "seasonNumber": 7,
      "monitored": true,
      "statistics": null
    }
  ],
  "rootFolderPath": "D:\\Series",
  "qualityProfileId": 6,
  "seasonFolder": true,
  "monitored": false,
  "tvdbId": 70327,
  "tvRageId": 0,
  "cleanTitle": null,
  "imdbId": null,
  "titleSlug": "Buffy the Vampire Slayer",
  "id": 0
} 
2016/08/02 09:17:00.078 PlexRequests.Services.Jobs.PlexAvailabilityChecker Debug: Requests that will 
be updated count 0 

Logs go here (Please make sure you remove any personal information from the logs)
responseText:
"{"statusCode":500,"message":"Something went horribly, horribly wrong while servicing your request.","details":"Nancy.RequestExecutionException: Oh noes! ---\u003e System.ArgumentNullException: Waarde kan niet null zijn.\r\nParameternaam: source\r\n   
bij System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)\r\n   
bij PlexRequests.UI.Helpers.ValidationHelper.SendSonarrError(List`1 result) in C:\\projects\\requestplex\\PlexRequests.UI\\Helpers\\ValidationHelper.cs:regel 64\r\n   
bijPlexRequests.UI.Modules.ApprovalModule.\u003cRequestTvAndUpdateStatus\u003ed__30.MoveNext() in C:\\projects\\requestplex\\PlexRequests.UI\\Modules\\ApprovalModule.cs:regel 140\r\n
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---\r\n   
bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   
bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   
bij PlexRequests.UI.Modules.ApprovalModule.\u003cApprove\u003ed__29.MoveNext() in C:\\projects\\requestplex\\PlexRequests.UI\\Modules\\ApprovalModule.cs:regel 111\r\n--- 
Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---\r\n   
bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   
bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   
bij PlexRequests.UI.Modules.ApprovalModule.\u003c\u003c-ctor\u003eb__0_0\u003ed.MoveNext() in C:\\projects\\requestplex\\PlexRequests.UI\\Modules\\ApprovalModule.cs:regel 67\r\n   
--- Einde van intern uitzonderingsstackpad ---\r\n   bij Nancy.NancyEngine.InvokeOnErrorHook(NancyContext context, ErrorPipeline pipeline, Exception ex)"}

Reproduction Steps:

I get this error when i do a TV show request, auto or non auto, both same error.

I have tried a fresh copy, but sadly that doesn't work either. CP works great, i have no problem with that!

This is my sonarr setup: https://gyazo.com/883fda1035a4b3ee12f6e9ebe532489f

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

I have fixed the issue you are referring to in the dev branch. But the issue you have reported is with us not being able to work out the error that has come back from Sonarr.

Can you change your Log level to Trace and then do the same thing and post the log? It should be something like "Api Content Response:"

@ShepherdDimaloun
Copy link
Author

ShepherdDimaloun commented Aug 2, 2016

Wow fast reply :D,
here is the TRACE Log:

2016/08/02 09:52:33.562 PlexRequests.Api.ApiRequest Trace: Api Content Response:
2016/08/02 09:52:33.628 PlexRequests.Api.ApiRequest Trace: {"list": [{"core": true, "_rev": "00111dbe", "finish": [true], "hide": false, "_id": "4bed7a9719fc4dc7bade29d1ea58e2cc", "_t": "profile", "label": "1080p", "qualities": ["1080p"], "wait_for": [0], "order": 0}, {"core": true, "_rev": "00110752", "finish": [true], "hide": false, "_id": "5180940741814a6d8fbc5595398228e0", "_t": "profile", "label": "720p", "qualities": ["720p"], "wait_for": [0], "order": 1}, {"core": false, "_rev": "0016087a", "finish": [true, true, true], "hide": false, "qualities": ["720p", "1080p", ""], "_id": "994e93c1996b40418f2dd9be0fe20748", "_t": "profile", "label": "Best", "minimum_score": 20, "stop_after": [0, 0, 0], "wait_for": [0, 0, 0], "order": 2, "3d": [0, 0, 0]}, {"core": true, "_rev": "0011e4d1", "finish": [true], "hide": false, "_id": "b86c3ab565ae4ce7bf94e74990c8cb24", "_t": "profile", "label": "DVD-Rip", "qualities": ["dvdrip"], "wait_for": [0], "order": 3}, {"core": true, "_rev": "00115843", "finish": [true], "hide": false, "_id": "fd2351a59e624e899a11315c2e577d03", "_t": "profile", "label": "DVD-R", "qualities": ["dvdr"], "wait_for": [0], "order": 4}, {"core": false, "_rev": "00128034", "finish": [true, true, true], "hide": true, "qualities": ["720p", "1080p", ""], "_id": "720b02e4f01a427d8c50511d318d1671", "_t": "profile", "label": "HD", "minimum_score": 10, "stop_after": [0, 0, 0], "wait_for": [0, 0, 0], "order": 5, "3d": [0, 0, 0]}, {"_rev": "00113370", "finish": [true, true], "hide": true, "qualities": ["dvdrip", "dvdr"], "_id": "33c92cfa72ab4e999a1b6ee09ad4f453", "_t": "profile", "label": "SD", "minimum_score": 1, "stop_after": [0, 0], "wait_for": [0, 0], "order": 6, "3d": [false, false]}, {"_rev": "00110727", "finish": [true, true, true, true], "hide": true, "qualities": ["1080p", "720p", "720p", "1080p"], "_id": "32e87f0ec2a14082b9553007cbdf1359", "_t": "profile", "label": "Prefer 3D HD", "minimum_score": 1, "stop_after": [0, 0, 0, 0], "wait_for": [0, 0, 0, 0], "order": 7, "3d": [true, true, false, false]}, {"_rev": "00113256", "finish": [true, true], "hide": true, "qualities": ["1080p", "720p"], "_id": "5dfe686f53a04ae8ae746ec2566639ea", "_t": "profile", "label": "3D HD", "minimum_score": 1, "stop_after": [0, 0], "wait_for": [0, 0], "order": 8, "3d": [true, true]}, {"core": true, "_rev": "00116dee", "finish": [true], "hide": true, "_id": "05cb75bf78314f34ab3beac5432787a4", "_t": "profile", "label": "BR-Disk", "qualities": ["bd50"], "wait_for": [0], "order": 9}, {"core": true, "_rev": "00118abb", "finish": [true], "hide": true, "_id": "79f0d29372f64a8289da4d7f87a720c3", "_t": "profile", "label": "BR-Rip", "qualities": ["brrip"], "wait_for": [0], "order": 10}, {"core": true, "_rev": "0011a05e", "finish": [true], "hide": true, "_id": "56537244552743cf94beb7760f843d43", "_t": "profile", "label": "Screener", "qualities": ["scr"], "wait_for": [0], "order": 11}, {"core": true, "_rev": "0011df81", "finish": [true], "hide": true, "_id": "5d2c3e8fe85042bda148f0d37f20fa7c", "_t": "profile", "label": "R5", "qualities": ["r5"], "wait_for": [0], "order": 12}, {"core": true, "_rev": "00119944", "finish": [true], "hide": true, "_id": "5a1d7e8255914031ba8f0454e101f114", "_t": "profile", "label": "TeleCine", "qualities": ["tc"], "wait_for": [0], "order": 13}, {"core": true, "_rev": "0011b246", "finish": [true], "hide": true, "_id": "c600589903eb4bc1aa52569a93c60796", "_t": "profile", "label": "TeleSync", "qualities": ["ts"], "wait_for": [0], "order": 14}, {"core": true, "_rev": "00118205", "finish": [true], "hide": true, "_id": "ca4b5500029b4db09ebd12c3ec6b5ca1", "_t": "profile", "label": "Cam", "qualities": ["cam"], "wait_for": [0], "order": 15}], "success": true}

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

Interesting. It seemed to work.

I was expecting Sonarr to throw something up.

I'll take a look at this a bit later (Currently at work).

@ShepherdDimaloun
Copy link
Author

I was going through the Sonarr log file, and found it got a request but it didn't add to the list.

Img of Sonarr log: https://gyazo.com/3bad4b698c435706b97ddb0e0bd2dbf2

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

Has it been physically added to Sonarr?

@ShepherdDimaloun
Copy link
Author

It does not show up in the Sonarr list, there is also no map created.

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

Wait, i'm not sure that log you sent me was correct, are you sure that was the Sonarr trace log?
Can you just double check? Since we will get an Api Request Response log for every api call e.g. CP calls.

And that looks like a CouchPotato response to me.

@ShepherdDimaloun
Copy link
Author

you were right, took the wrong trace response, here is de correct one:
2016/08/02 10:28:25.364 PlexRequests.Api.ApiRequest Trace: Deserialzing Object
2016/08/02 10:28:25.509 PlexRequests.Api.ApiRequest Trace: Finished Deserialzing Object
2016/08/02 10:28:31.942 PlexRequests.UI.Modules.ApprovalModule Info: approving request 22
2016/08/02 10:28:32.119 PlexRequests.UI.Modules.ApprovalModule Trace: Sending to Sonarr
2016/08/02 10:28:32.220 PlexRequests.Api.SonarrApi Debug: Adding series Buffy the Vampire Slayer
2016/08/02 10:28:32.331 PlexRequests.Api.SonarrApi Debug: Seasons = [
7
], out of 7 seasons
2016/08/02 10:28:32.442 PlexRequests.Api.SonarrApi Debug: Sonarr API Options:
2016/08/02 10:28:32.554 PlexRequests.Api.SonarrApi Debug: {
"addOptions": null,
"title": "Buffy the Vampire Slayer",
"seasons": [
{
"seasonNumber": 1,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 2,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 3,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 4,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 5,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 6,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 7,
"monitored": true,
"statistics": null
}
],
"rootFolderPath": "D:\Series",
"qualityProfileId": 6,
"seasonFolder": true,
"monitored": false,
"tvdbId": 70327,
"tvRageId": 0,
"cleanTitle": null,
"imdbId": null,
"titleSlug": "Buffy the Vampire Slayer",
"id": 0
}
2016/08/02 10:28:32.788 PlexRequests.Api.ApiRequest Trace: Api Content Response:
2016/08/02 10:28:32.936 PlexRequests.Api.ApiRequest Trace: {
"message": "constraint failed\r\nNOT NULL constraint failed: Series.Images"
}
2016/08/02 10:28:33.075 PlexRequests.Api.ApiRequest Trace: Deserialzing Object
2016/08/02 10:28:33.220 PlexRequests.Api.ApiRequest Trace: Finished Deserialzing Object
2016/08/02 10:28:33.353 PlexRequests.UI.Helpers.TvSender Trace: Sonarr Add Result:
2016/08/02 10:28:33.498 PlexRequests.UI.Helpers.TvSender Trace: {
"addOptions": null,
"title": null,
"seasons": null,
"rootFolderPath": null,
"qualityProfileId": 0,
"seasonFolder": false,
"monitored": false,
"tvdbId": 0,
"tvRageId": 0,
"cleanTitle": null,
"imdbId": null,
"titleSlug": null,
"id": 0
}
2016/08/02 10:28:33.631 PlexRequests.UI.Modules.ApprovalModule Trace: Sonarr Result:
2016/08/02 10:28:33.742 PlexRequests.UI.Modules.ApprovalModule Trace: {
"addOptions": null,
"title": null,
"seasons": null,
"rootFolderPath": null,
"qualityProfileId": 0,
"seasonFolder": false,
"monitored": false,
"tvdbId": 0,
"tvRageId": 0,
"cleanTitle": null,
"imdbId": null,
"titleSlug": null,
"id": 0
}

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

Ah found it. It's what I expected:

"message": "constraint failed\r\nNOT NULL constraint failed: Series.Images"

See this issue: #440

It's a Sonarr bug in one of their newer versions. I'm working on a workaround.

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

@ShepherdDimaloun I have created a work around, would you like to try it?

Here is the build: https://ci.appveyor.com/project/tidusjar/requestplex/build/1.8.680/artifacts

@ShepherdDimaloun
Copy link
Author

I tested it, and it works, for auto and non auto. that was a really fast workaround!
I have to say as .net developer, this looks really good!
here is the log:
2016/08/02 11:35:42.065 PlexRequests.Api.ApiRequest Trace: Deserialzing Object
2016/08/02 11:35:42.166 PlexRequests.Api.ApiRequest Trace: Finished Deserialzing Object
2016/08/02 11:35:42.254 PlexRequests.UI.Helpers.TvSender Trace: Sonarr Add Result:
2016/08/02 11:35:42.353 PlexRequests.UI.Helpers.TvSender Trace: {
"addOptions": null,
"title": "Buffy the Vampire Slayer",
"seasons": [
{
"seasonNumber": 1,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 2,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 3,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 4,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 5,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 6,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 7,
"monitored": true,
"statistics": null
}
],
"images": [],
"rootFolderPath": null,
"qualityProfileId": 6,
"seasonFolder": true,
"monitored": false,
"tvdbId": 70327,
"tvRageId": 0,
"cleanTitle": "buffyvampireslayer",
"imdbId": null,
"titleSlug": "Buffy the Vampire Slayer",
"id": 94
}
2016/08/02 11:35:42.475 PlexRequests.UI.Modules.ApprovalModule Trace: Sonarr Result:
2016/08/02 11:35:42.609 PlexRequests.UI.Modules.ApprovalModule Trace: {
"addOptions": null,
"title": "Buffy the Vampire Slayer",
"seasons": [
{
"seasonNumber": 1,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 2,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 3,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 4,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 5,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 6,
"monitored": false,
"statistics": null
},
{
"seasonNumber": 7,
"monitored": true,
"statistics": null
}
],
"images": [],
"rootFolderPath": null,
"qualityProfileId": 6,
"seasonFolder": true,
"monitored": false,
"tvdbId": 70327,
"tvRageId": 0,
"cleanTitle": "buffyvampireslayer",
"imdbId": null,
"titleSlug": "Buffy the Vampire Slayer",
"id": 94
}
2016/08/02 11:35:42.731 PlexRequests.UI.Modules.ApprovalModule Info: Sent successfully, Approving request now.
2016/08/02 11:35:42.987 PlexRequests.UI.Modules.ApprovalModule Trace: Approval result: True

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

Excellent.

Thanks! I suggest you change your logging level back to Debug (There seems to be a memory leak in the log provider we are using when using Tracing which I haven't got around to fixing yet).

Regrading the workaround, I've added that into the dev branch ready for the next release so we don't have the issue there (Sonarr are also working on fixing this at their end).

@ShepherdDimaloun
Copy link
Author

Will do, Works great now, added a few tv shows without any problem, there is only one thing.
The tv shows only getting added without downloading it, this is because the tv shows are not being monitored, this means it wont download any show that is available. is it possible to enable it in settings?
I assume you can tell through api you want the tv show monitored?

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

@ShepherdDimaloun The TV series and season selected should be monitored in Sonarr. I have raised a bug with the Sonarr guys as we are unable to actually add an unmonitored series (so currently everything added will be monitored), is this not what you are seeing in Sonarr?

@ShepherdDimaloun
Copy link
Author

ShepherdDimaloun commented Aug 2, 2016

@tidusjar no, they are auto unmonitored, i have to change it manually.

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

@ShepherdDimaloun what Sonarr version are you using?

@ShepherdDimaloun
Copy link
Author

@tidusjar Version 2.0.0.4260 develop branch

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

Ah ok that makes sense, they fixed the bug I reported, which has broken my part now. I need to update PlexRequests to work correctly now. I'll be working on this in a few hours.

It's difficult to work with the develop branch when there are API changes as not everyone is on that branch. I usually suggest for you to run the master branch so that Plex Requests is 100% compatible.

@tidusjar tidusjar reopened this Aug 2, 2016
@tidusjar tidusjar changed the title Plexrequest cannot add tv show in Sonarr Plexrequest doesn't monitor Sonarr Episodes on the Sonarr develop branch Aug 2, 2016
tidusjar pushed a commit that referenced this issue Aug 2, 2016
@ShepherdDimaloun
Copy link
Author

Will do, for now manually change it to monitored is ok. looking forward for the updates.

@tidusjar
Copy link
Member

tidusjar commented Aug 2, 2016

Sorry about that.
I have fixed this in Plex Request Dev branch, but it's currently not stable due to new features being added.
I'm expecting it to be ready for release within the next week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants