jellyfin-plugin-trakt icon indicating copy to clipboard operation
jellyfin-plugin-trakt copied to clipboard

Sync library to trakt.tv failed

Open MateEke opened this issue 4 years ago • 8 comments

Server: Version: 10.5.5 Operating System: Linux Architecture: X64

Plugin: 9.0.0.0

Log:

The UTC time represented when the offset is applied must be between year 0 and 10,000. (Parameter 'offset') at System.DateTimeOffset.ValidateDate(DateTime dateTime, TimeSpan offset) at System.DateTimeOffset..ctor(DateTime dateTime) at System.DateTimeOffset.op_Implicit(DateTime dateTime) at Trakt.Api.TraktApi.SetRequestHeaders(HttpRequestOptions options, TraktUser traktUser) at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser) at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser) at Trakt.ScheduledTasks.SyncLibraryTask.SyncMovies(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

MateEke avatar May 28 '20 10:05 MateEke

I have the EXACT issue on windows. Have force re-authorized multiple times so I dont think thats the issue

Zusier avatar Jun 25 '20 03:06 Zusier

Welp, after running into a completely different issue with my library it works now :p

Zusier avatar Jun 26 '20 02:06 Zusier

Is this issue still present in Jellyfin 10.6.3 with plugin version 9?

What is your system timezone?

oddstr13 avatar Aug 19 '20 07:08 oddstr13

I have the same issue:

[2020-11-06 00:10:33.474 +01:00] [INF] [32] Emby.Server.Implementations.ScheduledTasks.TaskManager: "IntervalTrigger" fired for task: "Sync library to trakt.tv"
[2020-11-06 00:10:33.475 +01:00] [INF] [32] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queueing task "SyncLibraryTask"
[2020-11-06 00:10:33.476 +01:00] [INF] [4] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Sync library to trakt.tv"
[2020-11-06 00:10:33.518 +01:00] [ERR] [4] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
System.ArgumentOutOfRangeException: The UTC time represented when the offset is applied must be between year 0 and 10,000. (Parameter 'offset')
   at System.DateTimeOffset.ValidateDate(DateTime dateTime, TimeSpan offset)
   at System.DateTimeOffset..ctor(DateTime dateTime)
   at System.DateTimeOffset.op_Implicit(DateTime dateTime)
   at Trakt.Api.TraktApi.SetRequestHeaders(HttpRequestOptions options, TraktUser traktUser)
   at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser)
   at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser)
   at Trakt.ScheduledTasks.SyncLibraryTask.SyncMovies(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken)
   at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken)
   at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2020-11-06 00:10:33.554 +01:00] [INF] [4] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Sync library to trakt.tv" Failed after 0 minute(s) and 0 seconds

Version: 10.6.4 Operating System: Linux Architecture: X64 Plugin Version: 10.0.0.0

int3ro avatar Nov 06 '20 15:11 int3ro

Version: 10.6.4 Operating System: Windows Architecture: X64 Plugin Version: 10.0.0.0

I don't think my type of logs error are the same, but I do have the same problem: "Sync library to trakt.tv failed" I'll leave a link to my logs from log file and from alert notification I did pick some log lines out that were in the middle of it this error in particular. I hope all information is in there.

jcaldeira avatar Dec 12 '20 12:12 jcaldeira

Anyone still experiencing this with the current plugin?

Shadowghost avatar Apr 21 '22 07:04 Shadowghost

Initial guess is that we need to guard for items with a parameter of DateTime.MinValue

crobibero avatar Aug 30 '22 12:08 crobibero

Indeed. But that should normally never happen...

Shadowghost avatar Aug 30 '22 13:08 Shadowghost

Version 20.0.0.0 solved this for me, thanks!

JRDevo avatar Sep 05 '22 10:09 JRDevo

My guess is that the main problem was caused by old versions of the plugin not setting the expiration date of the access token properly. We now have a fallback which seems to fix this cases (reauthentication should have done the trick too).

Please reopen or create a new issue if this comes up after you removed the config file and reauthed your user.

Shadowghost avatar Oct 13 '22 12:10 Shadowghost