ShokoAnime / ShokoDesktop

Repository for Shoko Desktop
http://shokoanime.com/shokodesktop/
105 stars 25 forks source link

Unable to add or edit filter condition on a collection #589

Closed boppen closed 6 years ago

boppen commented 6 years ago

Server Version: 3.9.3.36320 Desktop Version: 3.9.3.0

I've downloaded and reinstalled both Server and Desktop using the latest stable.

LOG FILE

[2018-09-29 22:42:03:896] Info|App.Main => App..ctor App startup - Loaded settings
[2018-09-29 22:42:03:940] Info|App.Main => App..ctor App startup - Setting up culture
[2018-09-29 22:42:03:946] Info|App.Main => App..ctor App startup - Culture set up
[2018-09-29 22:42:03:946] Info|App.Main => App..ctor App startup - Loading UI
[2018-09-29 22:42:11:539] Trace|BackgroundWorker.OnDoWork => MainWindow.showDashboardWorker_DoWork => VM_Dashboard.RefreshData Dashboard Time: RefreshGroupsSeriesData: 3633.8044
[2018-09-29 22:42:11:580] Trace|MainWindow.showDashboardWorker_DoWork => VM_Dashboard.RefreshData => VM_Dashboard.RefreshEpsWatchNext_Recent Dashboard Time: RefreshEpsWatchNext_Recent: contracts: 32.9897
[2018-09-29 22:42:11:585] Trace|MainWindow.showDashboardWorker_DoWork => VM_Dashboard.RefreshData => VM_Dashboard.RefreshEpsWatchNext_Recent Dashboard Time: RefreshEpsWatchNext_Recent: episode details: 0
[2018-09-29 22:43:22:986] Error|MainWindow.CommandBinding_NewFilterCondition => GroupFilterConditionForm.Init => Utils.ShowErrorMessage System.AggregateException: One or more errors occurred. ---> Nancy.Rest.Client.Exceptions.RestClientException: Exception has been thrown by the target of an invocation.
   at Nancy.Rest.Client.Rest.SmallWebClient.<RestRequest>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Nancy.Rest.Client.ClientFactory.<>c__DisplayClass2_0.<<DoSyncClient>b__0>d.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Nancy.Rest.Client.ClientFactory.DoSyncClient(Object dexp, MethodDefinition def, IWebProxy proxy, Object[] parameters)
   at Nancy.Rest.Client.ClientFactory.<>c__DisplayClass1_1`1.<Create>b__12()
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at ActLike_IShokoServer_f10db9f5bf284c22bac2e20848036a94.GetAllYears()
   at Shoko.Desktop.Forms.GroupFilterConditionForm.PopulateYears() in D:\Documents\GitHub\ShokoDesktop\Shoko.Desktop\Forms\GroupFilterConditionForm.xaml.cs:line 644
   at Shoko.Desktop.Forms.GroupFilterConditionForm.Init(VM_GroupFilter gf, VM_GroupFilterCondition gfc) in D:\Documents\GitHub\ShokoDesktop\Shoko.Desktop\Forms\GroupFilterConditionForm.xaml.cs:line 741
---> (Inner Exception #0) Nancy.Rest.Client.Exceptions.RestClientException: Exception has been thrown by the target of an invocation.
   at Nancy.Rest.Client.Rest.SmallWebClient.<RestRequest>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Nancy.Rest.Client.ClientFactory.<>c__DisplayClass2_0.<<DoSyncClient>b__0>d.MoveNext()<---

DESCRIPTION

When trying to add or edit a filter condition I get a 'One or more errors occurred' dialog. After closing it the Group Filter Condition dialog opens, the Condition Type drop down contains all types but the Operator drop down is empty.

STEPS TO REPRODUCE

  1. Open Collection tab
  2. Select any collection and hit edit or create a new collection
  3. Try to add a new filter condition or edit an existing filter condition.
da3dsoul commented 6 years ago

I don't experience this. It's saying that it thinks the server is returning an error. Does the server log have an error from that time?

boppen commented 6 years ago

You are right, the server log has an error at the same time

[2018-09-29 22:43:21:135] Error|NancyEngine.InvokeOnErrorHook => ErrorPipeline.Invoke => Bootstrapper.onError Nancy Error => System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: count
   at System.Linq.Enumerable.Range(Int32 start, Int32 count)
   at Shoko.Server.ShokoServiceImplementation.GetAllYears() in D:\Documents\GitHub\ShokoServer\Shoko.Server\API\v1\Implementations\ShokoServiceImplementation\ShokoServiceImplementation.cs:line 314
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Nancy.Rest.Module.RestModule.Route(Object cls, RouteCacheItem ci, Object d) in C:\Users\mpiva\Documents\GIT\Nancy.Rest\Nancy.Rest.Module\RestModule.cs:line 256
   at Nancy.Rest.Module.RestModule.<>c__DisplayClass13_0.<MapRoute>b__1(Object o) in C:\Users\mpiva\Documents\GIT\Nancy.Rest\Nancy.Rest.Module\RestModule.cs:line 75
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
[2018-09-29 22:43:21:135] Error|NancyEngine.InvokeOnErrorHook => ErrorPipeline.Invoke => Bootstrapper.onError Nancy Error => Request URL: http://127.0.0.1:8111/v1/Years
[2018-09-29 22:43:21:152] Error|NancyEngine.InvokeOnErrorHook => ErrorPipeline.Invoke => Bootstrapper.onError System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: count
   at System.Linq.Enumerable.Range(Int32 start, Int32 count)
   at Shoko.Server.ShokoServiceImplementation.GetAllYears() in D:\Documents\GitHub\ShokoServer\Shoko.Server\API\v1\Implementations\ShokoServiceImplementation\ShokoServiceImplementation.cs:line 314
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Nancy.Rest.Module.RestModule.Route(Object cls, RouteCacheItem ci, Object d) in C:\Users\mpiva\Documents\GIT\Nancy.Rest\Nancy.Rest.Module\RestModule.cs:line 256
   at Nancy.Rest.Module.RestModule.<>c__DisplayClass13_0.<MapRoute>b__1(Object o) in C:\Users\mpiva\Documents\GIT\Nancy.Rest\Nancy.Rest.Module\RestModule.cs:line 75
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context) 
da3dsoul commented 6 years ago

I don't know if you planned to make another issue in server, but don't worry about it. If you'd like, I can look into it and hand you an unofficial build, but the next release will not be stable for a long while

da3dsoul commented 6 years ago

Question. If you open the Years filter, what years does it list?

boppen commented 6 years ago

Doh, I hit the wrong button. I'm too used with TFS where you have a 'save and close' button which returns you to the list of work items. :)

In the Years filter I see the following years: 1973, 1974, 1985, 1988, 1990-2018

da3dsoul commented 6 years ago

Okay, nothing odd there. I was looking for an edge case.

da3dsoul commented 6 years ago

Okay, I'm gonna post a shady looking zip file. I made a change, and hopefully it will work. Close Server, unpack the zip to anywhere that's not Downloads, and run ShokoServer.exe. If it works, then just overwrite your current C:\Program Files\ShokoServer folder with the contents of it. This is assuming of course that your Server is Windows....

notavirus.zip

da3dsoul commented 6 years ago

I had another user report this same issue in a different place, and he/she confirmed it fixed. I will close this issue, you may still grab and use that build if you are impatient for a hotfix release.