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

Movie Search and Suggestions not working with CouchPotato enabled #350

Closed
Narkyzz opened this issue Jun 22, 2016 · 20 comments
Closed

Movie Search and Suggestions not working with CouchPotato enabled #350

Narkyzz opened this issue Jun 22, 2016 · 20 comments
Assignees

Comments

@Narkyzz
Copy link

Narkyzz commented Jun 22, 2016

Plex Requests.Net Version: 1.8.1

Operating System: Debian 8.5

Mono Version: Mono JIT compiler version 4.4.0

Reproduction Steps:

Tried a fresh install, new PlexRequests database as well.

Searching for a movie works only when CouchPotato is disabled.
Applies to manually searching and Suggestions

TV Show searching is working fine, even with Sonarr enabled.

When searching or using the suggestions, the loading animation rolls indefinitely and no results are shown.
Tried with and without CouchPotato SubDirectory, same issue happens.

image

Working configuration:
Just disable CouchPotato.

Not working configuration:
CouchPotato enabled.
Hostname: localhost
Port: 5050
SSL: No

The 'Test Connectivity' is successful.

@tidusjar
Copy link
Member

Is there anything in your browsers console? (F12)

@Narkyzz
Copy link
Author

Narkyzz commented Jun 22, 2016

Yes, here's the error with CouchPotato enabled:

image

Nothing pops up in the console when it's disabled.

@tidusjar
Copy link
Member

That url, can you click on the network tab and you should see that request in red, and click it and press response?

Like the below:
image

@Narkyzz
Copy link
Author

Narkyzz commented Jun 22, 2016

This is the 'upcoming' response:

{"statusCode":500,"message":"Something went horribly, horribly wrong while servicing your request.","details":"Nancy.RequestExecutionException: Oh noes! ---\u003e System.NullReferenceException: Object reference not set to an instance of an object\n at PlexRequests.Services.Jobs.CouchPotatoCacher+\u003c\u003ec.\u003cQueuedIds\u003eb__15_0 (PlexRequests.Api.Models.Movie.Movie x) \u003c0x418b7130 + 0x00016\u003e in \u003cfilename unknown\u003e:0 \n at System.Linq.Enumerable+WhereSelectListIterator2[TSource,TResult].MoveNext () \u003c0x418b6f60 + 0x00126\u003e in \u003cfilename unknown\u003e:0 \n at System.Linq.Buffer1[TElement]..ctor (IEnumerable1 source) \u003c0x418b6b50 + 0x0023c\u003e in \u003cfilename unknown\u003e:0 \n at System.Linq.Enumerable.ToArray[TSource] (IEnumerable1 source) \u003c0x418b6ad0 + 0x0002f\u003e in \u003cfilename unknown\u003e:0 \n at PlexRequests.Services.Jobs.CouchPotatoCacher.QueuedIds () \u003c0x418b64b0 + 0x00143\u003e in \u003cfilename unknown\u003e:0 \n at PlexRequests.UI.Modules.SearchModule+\u003cProcessMovies\u003ed__78.MoveNext () \u003c0x418abac0 + 0x00add\u003e in \u003cfilename unknown\u003e:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () \u003c0x7f3d26d9f2a0 + 0x00029\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) \u003c0x7f3d26d9d170 + 0x000a7\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) \u003c0x7f3d26d9d0f0 + 0x0006b\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) \u003c0x7f3d26d9d0a0 + 0x0003a\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () \u003c0x7f3d26d9d4a0 + 0x00017\u003e in \u003cfilename unknown\u003e:0 \n at PlexRequests.UI.Modules.SearchModule+\u003cUpcomingMovies\u003ed__75.MoveNext () \u003c0x418bc8a0 + 0x0017e\u003e in \u003cfilename unknown\u003e:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () \u003c0x7f3d26d9f2a0 + 0x00029\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) \u003c0x7f3d26d9d170 + 0x000a7\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) \u003c0x7f3d26d9d0f0 + 0x0006b\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) \u003c0x7f3d26d9d0a0 + 0x0003a\u003e in \u003cfilename unknown\u003e:0 \n at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () \u003c0x7f3d26d9d4a0 + 0x00017\u003e in \u003cfilename unknown\u003e:0 \n at PlexRequests.UI.Modules.SearchModule+\u003c\u003c-ctor\u003eb__0_5\u003ed.MoveNext () \u003c0x418bc320 + 0x00152\u003e in \u003cfilename unknown\u003e:0 \n --- End of inner exception stack trace ---\n at Nancy.NancyEngine.InvokeOnErrorHook (Nancy.NancyContext context, Nancy.ErrorPipeline pipeline, System.Exception ex) \u003c0x418b8a60 + 0x002d7\u003e in \u003cfilename unknown\u003e:0 "}

Sorry for the formatting, it was just one line.

Edit: Seems like I also have issues with other software, getting 500 internal errors on PlexPy as well.
More edits: Nothing works, even PMS can't play any file.
Even more edits: Rebooted, seems to have fixed most of the stuff.
My PlexPy config apparently reset. Still can't search while CouchPotato is enabled.

@unhappyelf
Copy link

I also have that same issue
Here is my response as well

{"statusCode":500,"message":"Something went horribly, horribly wrong while servicing your request.","details":"Nancy.RequestExecutionException: Oh noes! ---\u003e System.NullReferenceException: Object reference not set to an instance of an object.\r\n at PlexRequests.Services.Jobs.CouchPotatoCacher.\u003c\u003ec.\u003cQueuedIds\u003eb__15_0(Movie x) in C:\projects\requestplex\PlexRequests.Services\Jobs\CouchPotatoCacher.cs:line 90\r\n at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()\r\n at System.Linq.Buffer1..ctor(IEnumerable1 source)\r\n at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)\r\n at PlexRequests.Services.Jobs.CouchPotatoCacher.QueuedIds() in C:\projects\requestplex\PlexRequests.Services\Jobs\CouchPotatoCacher.cs:line 90\r\n at PlexRequests.UI.Modules.SearchModule.\u003cProcessMovies\u003ed__78.MoveNext() in C:\projects\requestplex\PlexRequests.UI\Modules\SearchModule.cs:line 219\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at PlexRequests.UI.Modules.SearchModule.\u003cUpcomingMovies\u003ed__75.MoveNext() in C:\projects\requestplex\PlexRequests.UI\Modules\SearchModule.cs:line 156\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at PlexRequests.UI.Modules.SearchModule.\u003c\u003c-ctor\u003eb__0_5\u003ed.MoveNext() in C:\projects\requestplex\PlexRequests.UI\Modules\SearchModule.cs:line 107\r\n --- End of inner exception stack trace ---\r\n at Nancy.NancyEngine.InvokeOnErrorHook(NancyContext context, ErrorPipeline pipeline, Exception ex)"}

tidusjar pushed a commit that referenced this issue Jun 22, 2016
@tidusjar
Copy link
Member

Actually can one of you guys test my fix? I can't reproduce the issue so I am just trying to fix the exception. The build should be ready within the next 10 mins:

https://ci.appveyor.com/project/tidusjar/requestplex/build/1.8.549/artifacts

@Narkyzz
Copy link
Author

Narkyzz commented Jun 22, 2016

Don't know why my systemd stop always times out like that: plexrequests.service stop-sigterm timed out. Killing.

It still doesn't work for me. Doesn't seem to leave anything in the logs either.
Maybe it's the fact that I'm on Mono 4.4.0

Probably clearer:

image

@tidusjar
Copy link
Member

Hmmm... I'm not sure how that is still possible. I'm going to add some logging in for that area and see if I can narrow it down. Can you try out a build with extra logging? It will be in an hour or so.

@Narkyzz
Copy link
Author

Narkyzz commented Jun 22, 2016

Yeah no problem. I can access plexrequests/search/movie/upcoming only when CouchPotato is disabled as well. Otherwise it gives the 500 InternalServerError

@unhappyelf
Copy link

Ok this is going to sound noobish, but if I just leave the SqlTables.sql file in my current install will that preserve my settings when I try your fix?

@tidusjar
Copy link
Member

All of your settings are stored in plexrequests.sqlite

tidusjar pushed a commit that referenced this issue Jun 22, 2016
@tidusjar
Copy link
Member

tidusjar commented Jun 22, 2016

https://ci.appveyor.com/project/tidusjar/requestplex/build/1.8.551/artifacts
(Build has just started)
We should have some logs now. It starts with:

This is not an error, starting to get the CP Cached Id's

Can you do the search and post the logs.

(Logging at level Error).

@Narkyzz
Copy link
Author

Narkyzz commented Jun 22, 2016

Alright, this is what I get:

image

Forgot to mention but it requires a restart when disabling CP for the search to work.

@tidusjar
Copy link
Member

You restart and then it's fine?

So it's enabled, you disable it and then it doesn't work?

@Narkyzz
Copy link
Author

Narkyzz commented Jun 22, 2016

CP enabled: Doesn't work.
Disabling CP (without restarting PlexRequests): Doesn't work.
Restart PlexRequests (CP disabled): Works.

If I enable it back again without restarting, it works.
But when I restart PlexRequests again, stops working.

So if it starts with CP Enabled, then the search doesn't work.

This is what it reports when the search works:

image

@unhappyelf
Copy link

unhappyelf commented Jun 22, 2016

Here is mine if its any different

image

I also get the same result if is disable couchpotato

@tidusjar
Copy link
Member

OK, this should fix it. New build will be here once it completes: https://ci.appveyor.com/project/tidusjar/requestplex/build/1.8.552/artifacts

@Narkyzz
Copy link
Author

Narkyzz commented Jun 22, 2016

Yup, that fixed it 👍
Thanks a lot.

@unhappyelf
Copy link

Yes me too, thanks!

@tidusjar
Copy link
Member

You guys may as well use that build until the next release :)

On 22 Jun 2016, at 10:32 pm, unhappyelf notifications@github.com wrote:

Yes me too, thanks!


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

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

3 participants