Jump to content

Trakt: value cannot be null; Parameter name: instance


alb0806

Recommended Posts

alb0806
I have been periodically receiving the following error message when attempting to sync my library to trakt.tv:

 

Value cannot be null

Parameter name: instance

 

I am running MediaBrowser-Server 3.0.5233.40306 on Windows Server 2008R2.  This has occurred in the past 2-3 server releases and the task will succeed for a while, but once it starts failing the only thing that fixes it is restarting the server service.

 

The following is the relevant snippet out of the log file when the task fails.

 

BEGIN LOG ----------------------------------------------------------------------------------------------------------------------------------------

 

2014-05-02 07:40:01.6764 Info - App: IntervalTrigger fired for task: Sync library to trakt.tv

2014-05-02 07:40:01.6764 Info - App: Executing Sync library to trakt.tv

2014-05-02 07:40:01.6764 Info - App: IntervalTrigger fired for task: Log file cleanup

2014-05-02 07:40:01.6764 Info - App: Executing Log file cleanup

2014-05-02 07:40:01.6764 Info - App: Log file cleanup Completed after 0 minute(s) and 0 seconds


2014-05-02 07:40:02.3414 Info - Dlna: 127.0.0.1:51010 - Responded to a upnp:rootdevice request to 192.168.25.42

2014-05-02 07:40:02.3514 Info - Dlna: 127.0.0.1:51010 - Responded to a urn:schemas-upnp-org:device:MediaServer:1 request to 192.168.25.42

2014-05-02 07:40:02.3514 Info - Dlna: 127.0.0.1:51010 - Responded to a urn:schemas-upnp-org:service:ContentDirectory:1 request to 192.168.25.42

2014-05-02 07:40:02.3514 Info - Dlna: 127.0.0.1:51010 - Responded to a uuid:a276aff9bbbfdb2a470d9be3f27d2f80 request to 192.168.25.42

2014-05-02 07:40:02.3514 Info - Dlna: 127.0.0.1:51010 - Responded to a upnp:rootdevice request to 192.168.25.42

2014-05-02 07:40:02.3514 Info - Dlna: 127.0.0.1:51010 - Responded to a urn:schemas-upnp-org:device:MediaServer:1 request to 192.168.25.42

2014-05-02 07:40:02.3514 Info - Dlna: 127.0.0.1:51010 - Responded to a urn:schemas-upnp-org:service:ContentDirectory:1 request to 192.168.25.42

2014-05-02 07:40:02.3514 Info - Dlna: 127.0.0.1:51010 - Responded to a uuid:a276aff9bbbfdb2a470d9be3f27d2f80 request to 192.168.25.42

2014-05-02 07:40:02.3664 Info - Dlna: 127.0.0.1:51010 - Responded to a upnp:rootdevice request to 192.168.25.42

2014-05-02 07:40:02.3664 Info - Dlna: 127.0.0.1:51010 - Responded to a urn:schemas-upnp-org:device:MediaServer:1 request to 192.168.25.42

2014-05-02 07:40:02.3664 Info - Dlna: 127.0.0.1:51010 - Responded to a urn:schemas-upnp-org:service:ContentDirectory:1 request to 192.168.25.42

2014-05-02 07:40:02.3664 Info - Dlna: 127.0.0.1:51010 - Responded to a uuid:a276aff9bbbfdb2a470d9be3f27d2f80 request to 192.168.25.42

2014-05-02 07:40:02.6614 Info - App: HttpClientManager GET: http://www.mb3admin.com/admin/service/MB3ServerNotifications.json

2014-05-02 07:40:02.7114 Info - App: IntervalTrigger fired for task: Refresh trailers

2014-05-02 07:40:02.7114 Info - App: Executing Refresh trailers

2014-05-02 07:40:02.7114 Info - App: HttpClientManager GET: http://trailers.apple.com/trailers/home/xml/current_720p.xml

2014-05-02 07:40:02.8314 Info - App: IntervalTrigger fired for task: Import playstates from Trakt.tv

2014-05-02 07:40:02.8314 Info - App: Executing Import playstates from Trakt.tv


2014-05-02 07:40:03.1964 Info - App: Refresh trailers Completed after 0 minute(s) and 0 seconds


2014-05-02 07:40:04.3014 Info - App: IntervalTrigger fired for task: Refresh Guide

2014-05-02 07:40:04.3014 Info - App: Executing Refresh Guide


2014-05-02 07:40:04.4664 Error - App: Error

Value cannot be null.

Parameter name: instance

System.ArgumentNullException

  at MediaBrowser.Model.Entities.ProviderIdsExtensions.GetProviderId(IHasProviderIds instance, String name)

  at MediaBrowser.Model.Entities.ProviderIdsExtensions.GetProviderId(IHasProviderIds instance, MetadataProviders provider)

  at Trakt.ScheduledTasks.SyncLibraryTask.<Execute>b__2(BaseItem i)

  at System.Linq.Enumerable.WhereListIterator`1.MoveNext()

  at System.Linq.Buffer`1..ctor(IEnumerable`1 source)

  at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()

  at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

  at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

  at Trakt.ScheduledTasks.SyncLibraryTask.<Execute>d__1d.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

  at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<>c__DisplayClassf.<<ExecuteTask>b__e>d__11.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

  at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<Execute>d__6.MoveNext()

 

2014-05-02 07:40:04.4664 Info - App: Sync library to trakt.tv Failed after 0 minute(s) and 2 seconds


2014-05-02 07:40:06.1164 Info - Trakt: tMovies count = 882

2014-05-02 07:40:06.1164 Info - Trakt: tShowsCollection count = 153

2014-05-02 07:40:06.1364 Info - Trakt: tShowsWatched count = 21

 

END LOG ----------------------------------------------------------------------------------------------------------------------------------------

 

 

Any suggestions?

Edited by alb0806
Link to comment
Share on other sites

kfonda

I don't know the answer, but I have the same problem from time to time. When it happens, if I happen to look at the upcomming episodes tab in the web client it also give an error about something to do will null (I don't remember it exactly). If I restart the server everything goes back to nornal.

Link to comment
Share on other sites

Redshirt

I'll look in to it. It's being caused by movies in trakt locations that are missing either an imdb or tmdb or tvdb id.

Link to comment
Share on other sites

alb0806

Thanks Redshirt, just let me know when you have a fix available and I'll be happy to evaluate it.

Link to comment
Share on other sites

kfonda

If it helps any, I just had this happen again and this is the part of the log when I go to the Upcoming Episodes tab in the web client:

2014-05-05 05:09:08.4856 Warn - StringMapTypeDeserializer: Property 'excludelocationtypes' does not exist on type 'MediaBrowser.Api.GetNextUpEpisodes'
2014-05-05 05:09:13.1035 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
	Value cannot be null.
	Parameter name: item
	System.ArgumentNullException
	   at MediaBrowser.Server.Implementations.Dto.DtoService.GetDtoId(BaseItem item)
	   at MediaBrowser.Server.Implementations.Dto.DtoService.AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, List`1 fields)
	   at MediaBrowser.Server.Implementations.Dto.DtoService.GetBaseItemDto(BaseItem item, List`1 fields, User user, BaseItem owner)
	   at MediaBrowser.Api.TvShowsService.<>c__DisplayClass7.<Get>b__5(BaseItem i)
	   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
	   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
	   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
	   at MediaBrowser.Api.TvShowsService.Get(GetUpcomingEpisodes request)
	   at lambda_method(Closure , Object , Object )
	   at ServiceStack.Host.ServiceRunner`1.Execute(IRequest request, Object instance, TRequest requestDto)
	
2014-05-05 05:09:17.4351 Error - HttpServer: Error processing request for /mediabrowser/Shows/Upcoming?Limit=32&Fields=SeriesInfo%2CUserData&UserId=03630d7ac22eae500fee3f9e33f02846
	Value cannot be null.
	Parameter name: item
	ServiceStack.HttpError
	No Stack Trace Available
	

the Trak.tv errors were the same as posted above.

 

Link to comment
Share on other sites

Redshirt

That one isn't related to trakt. It's something with server and your library.

Link to comment
Share on other sites

Redshirt

New trakt version posted. Requires MB Server version 3.0.5225.22385 or newer

Link to comment
Share on other sites

kfonda

@@Redshirt, I'll keep an eye on it. I've only ever seen it do that when I have the Trakt error in Notifications. Is it possible the error I'm seeing is causing the Trakt problem? Either way, I updated the Trakt plugin and will see if I still get the other problem. Thanks for the speedy fix and keep up the good work, you guys are moving at an incredible pace with the advancement of MB3.

Link to comment
Share on other sites

Redshirt

Can't say for certain. I'd just watch it and see what happens for now.

Link to comment
Share on other sites

kfonda

I got another error tonight, this time with the new plugin (5-5-14 version). Here is the log:

2014-05-07 01:00:25.4283 Info - Dlna: 192.168.1.2:59184 - Responded to a uuid:b67df29b5c379445fde78c3774ab518d request to 192.168.1.2
2014-05-07 01:00:30.3211 Info - App: IntervalTrigger fired for task: Import playstates from Trakt.tv
2014-05-07 01:00:30.3211 Info - App: Executing Import playstates from Trakt.tv
2014-05-07 01:00:30.3211 Info - App: IntervalTrigger fired for task: Sync library to trakt.tv
2014-05-07 01:00:30.3330 Info - App: Executing Sync library to trakt.tv
2014-05-07 01:00:30.3491 Info - App: IntervalTrigger fired for task: Scan media library
2014-05-07 01:00:30.3491 Info - App: Executing Scan media library
2014-05-07 01:00:30.3491 Info - App: Validating media library
2014-05-07 01:00:30.4800 Info - App: HttpClientManager POST: http://api.trakt.tv/user/library/movies/all.json/77449c38c9f4f9b3cdb8d3f9ef0566b167a935eb/kfonda
2014-05-07 01:00:30.4800 Info - App: HttpClientManager POST: http://api.trakt.tv/user/library/movies/all.json/77449c38c9f4f9b3cdb8d3f9ef0566b167a935eb/kfonda
2014-05-07 01:00:30.7181 Info - App: HttpClientManager POST: http://api.trakt.tv/user/library/shows/watched.json/77449c38c9f4f9b3cdb8d3f9ef0566b167a935eb/kfonda
2014-05-07 01:00:30.7181 Info - App: HttpClientManager POST: http://api.trakt.tv/user/library/shows/collection.json/77449c38c9f4f9b3cdb8d3f9ef0566b167a935eb/kfonda
2014-05-07 01:00:30.9191 Info - App: HttpClientManager POST: http://api.trakt.tv/user/library/shows/watched.json/77449c38c9f4f9b3cdb8d3f9ef0566b167a935eb/kfonda
2014-05-07 01:00:31.0104 Error - App: Error
	Object reference not set to an instance of an object.
	System.NullReferenceException
	   at Trakt.ScheduledTasks.SyncLibraryTask.<Execute>b__2(BaseItem i)
	   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
	   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
	   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
	   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
	   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
	   at Trakt.ScheduledTasks.SyncLibraryTask.<Execute>d__1d.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<>c__DisplayClassf.<<ExecuteTask>b__e>d__11.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<Execute>d__6.MoveNext()
	
2014-05-07 01:00:31.0104 Info - App: Sync library to trakt.tv Failed after 0 minute(s) and 0 seconds
Link to comment
Share on other sites

Redshirt

I'll add a check for the next update, but looking at the error, I suspect you have media that has been identified as an Episode, but doesn't have a series attached to it. I'd have a look through the dashboard editor and see if there's anything weird.

Link to comment
Share on other sites

  • 1 month later...
smokey7722

I'll add a check for the next update, but looking at the error, I suspect you have media that has been identified as an Episode, but doesn't have a series attached to it. I'd have a look through the dashboard editor and see if there's anything weird.

 

Not to hijack this thread but I figured since this issue already exists here it would be best not to create a new thread on it.

 

@@Redshirt, I am noticing the same error on my install.  The other day I saw it and uninstalled/reinstalled the trakt plugin which got it working for a couple days but today its doing it again.  The log message looks the same as @@kfonda posted (mine is included below).  Is there an additional debug logging capability or a way to find out if it is a specific piece of media causing this?

 

 

2014-07-01 18:13:06.0994 Info - App: HttpClientManager POST: http://api.trakt.tv/user/library/movies/all.json/77449c38c9f4f9b3cdb8d3f9ef0566b167a935eb/smokey7722

2014-07-01 18:13:09.9754 Error - App: Error
Object reference not set to an instance of an object.
System.NullReferenceException
  at Trakt.ScheduledTasks.SyncLibraryTask.<Execute>b__2(BaseItem i)
  at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
  at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
  at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
  at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
  at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
  at Trakt.ScheduledTasks.SyncLibraryTask.<Execute>d__1d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<>c__DisplayClassf.<<ExecuteTask>b__e>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<Execute>d__6.MoveNext()
 
2014-07-01 18:13:09.9754 Info - App: Sync library to trakt.tv Failed after 0 minute(s) and 4 seconds
2014-07-01 18:13:10.0037 Debug - NotificationManager: Sending notification via Dashboard Notifications to user adamz
2014-07-01 18:13:10.0037 Info - ServerManager: Sending web socket message NotificationAdded
2014-07-01 18:13:10.0037 Info - ServerManager: Sending web socket message ScheduledTaskEnded
2014-07-01 18:13:10.8846 Debug - HttpServer: HTTP Response 200 to 10.0.0.118:58457. Response time: 869.174 ms
 
Edited by smokey7722
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...