Jump to content

New server is blowing up GetScheduledTasksAsync()


BillOatman

Recommended Posts

BillOatman

Hi:

 

My server updated to Version 4.1.0.26 and now a helper app I wrote that has been working for some time to have Emby refresh its guide crashes and burns on the call to GetScheduledTasksAsync(). trying to deserialize the response.

 

The exception I get is 

{"Error converting value \"DisplayConfigurationChange\" to type 'System.Nullable`1[MediaBrowser.Model.Tasks.SystemEvent]'. Path '[6].Triggers[0].SystemEvent', line 1, position 3543."}

 

"   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.Task.Wait()\r\n   at GuideRefresh.GuideRefresh.RealMain(String[] args) in C:\\Stuff\\Plex Stuff\\GuideRefresh\\GuideRefresh\\GuideRefresh.cs:line 23\r\n   at GuideRefresh.GuideRefresh.Main(String[] args) in C:\\Stuff\\Plex Stuff\\GuideRefresh\\GuideRefresh\\GuideRefresh.cs:line 18"

Link to comment
Share on other sites

Ah ok, so now the ApiClient library will need an update. There's no more getting around it.

Link to comment
Share on other sites

BillOatman

Took a quick look and I see there is an update to the nuget package MediaBrowser.Common (4.1.0.26) that I'm assuming would fix this issue.  Sadly it is incompatible with the current APIClient solution (which I'm sure is the reason for you lamenting needing to update this code :) ).  I'll play around some more and see just how bad this is.

 

EDIT:

There is something interesting going on with this solution regarding the target framework. The updated nuget package won't install because it says it needs .netstandard2.0.  But VS won't even display a target framework much less let me change it.   I edited the ,csproj file directly to make it only .netstandard2.0 (.net46 was also in there which I haven't seen before) and the nuget package updated ... that's the good news ... 158 errors when I tried to build it is the bad news.

Edited by BillOatman
Link to comment
Share on other sites

BillOatman

I had some free time so I created a new solution and .netstandard2 project and moved all the existing apiclient code in there and added the nuget packages (v4 of the mediabrowser.common).  The first compile error is 

 public event EventHandler<GenericEventArgs<AuthenticationResult>> Authenticated;

AuthenticationResult apparently no longer exists.  The swagger UI has 

 

 5cba27b8f2d38_Clipboard01.jpg

 

But I'll be damned if I can find it.  And that's just the first of 192 errors :)

Link to comment
Share on other sites

BillOatman

Got past that one by also including MediaBrowser.Server.Core.  Gets me down under 100 errors, but it's a slow go hunting and pecking for things.

Is this something I should even be bothering with without access to the source or up to date documentation/Swagger?

Edited by BillOatman
Link to comment
Share on other sites

We'll look at this when we have a chance. It might be a better option now to use code generation tools based on the swagger api docs that we have.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...