Jump to content

Trakt Error - Emby: Sync library to trakt.tv failed


DavidAus

Recommended Posts

DavidAus

Hi,

Iam getting the below error, which in turn is spamming my email everytime it tries to run the scheduled task.

Sync library to trakt.tv failed

Locked
   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.Get(HttpRequestOptions options)
   at Trakt.Api.TraktApi.GetFromTrakt(String url, TraktUser traktUser, CancellationToken cancellationToken)
   at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser, CancellationToken cancellationToken)
   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)

I have tried:

- Entering a new PIN on my account in Emby Trakt plugin

- Uninstalled and reinstalled the Emby Trakt plugin and again reset the PIN

Attached Emby server log

Looking at the log, I assume this is the issue:

022-08-17 18:05:39.773 Error Trakt: Error syncing trakt data for user David
	*** Error Report ***
	Version: 4.7.6.0
	Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.19044
	Framework: .NET 6.0.7
	OS/Process: x64/x64
	Runtime: C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: C:\Users\Media\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\Media\AppData\Roaming\Emby-Server\system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Locked
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.Get(HttpRequestOptions options)
	   at Trakt.Api.TraktApi.GetFromTrakt(String url, TraktUser traktUser, CancellationToken cancellationToken)
	   at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser, CancellationToken cancellationToken)
	   at Trakt.ScheduledTasks.SyncFromTraktTask.SyncTraktDataForUser(User user, Double currentProgress, CancellationToken cancellationToken, IProgress`1 progress, Double percentPerUser)
	   at Trakt.ScheduledTasks.SyncFromTraktTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()

Particularly where it says Locked.

I have previously had my Trakt account locked(January 2021) and this is what they said in response 

Quote

Hey David,

 

It looks like Emby stuffed your account with 200k+ play history items.  I was able to completely restore your play history, and your API access has been unlocked.

 

Before using Trakt's API again, make sure to find a fix from this third party applications developer, or disable it entirely.

 

Let me know if there's anything else I can help you with.

 

- Sean

Can you check to see if there is any issue either with Embys Trackt integration or perhaps how I have it configured before I seek there support again? 

 

Thanks

David

embyserver.txt

Link to comment
Share on other sites

Hi, have you setup the scheduled task to run on a schedule? This might be the reason for getting locked.

Link to comment
Share on other sites

DavidAus

Hi Luke,

Yes the schedule is set for 15 minutes. I am not sure if this was the default or if I changed it when it was setup. But it retained this setting after uninstall and reinstall. What is your recommendation here?

Link to comment
Share on other sites

Happy2Play
40 minutes ago, DavidAus said:

Hi Luke,

Yes the schedule is set for 15 minutes. I am not sure if this was the default or if I changed it when it was setup. But it retained this setting after uninstall and reinstall. What is your recommendation here?

Lookings at my test system there are no schedule task triggers setup by default.

Do you see files in C:\Users\Media\AppData\Roaming\Emby-Server\programdata\config\ScheduledTasks as that is where all custom triggers will be stored?

Don't use this so some else will have to provide a recommended interval.

Edited by Happy2Play
Link to comment
Share on other sites

DavidAus
23 minutes ago, Happy2Play said:

Lookings at my test system there are no schedule task triggers setup by default.

Do you see files in C:\Users\Media\AppData\Roaming\Emby-Server\programdata\config\ScheduledTasks as that is where all custom triggers will be stored?

Don't use this so some else will have to provide a recommended interval.

Thanks, this is what I have in that folder:

image.png.5c93fed42b47eec28d8e36f1b2bffaf5.png

These are the contents of the files, each line relates to each file from above:

[{"Type":"IntervalTrigger","IntervalTicks":9000000000}]

[{"Type":"IntervalTrigger","IntervalTicks":432000000000},{"Type":"IntervalTrigger","IntervalTicks":72000000000}]

[{"Type":"DailyTrigger","TimeOfDayTicks":459000000000,"MaxRuntimeTicks":216000000000}]

[{"Type":"IntervalTrigger","IntervalTicks":9000000000}]

Link to comment
Share on other sites

Happy2Play

@DavidAus

5e47e7d3542ace9c367691a65cb31e86 is for Import playstates from Trakt.tv task

b1a52e63d5fb09335557d4f1e6402299 is for Sync library to trakt.tv

You would delete them and restart Emby to remove those custom triggers.  But assuming you want scheduled task you would just change the trigger via the task in Scheduled Tasks.  Click on the task to see triggers.

Link to comment
Share on other sites

DavidAus

So they are not required? At the very least I would want the sync library to trakt.tv, but is 15 minutes too frequent?

These are the tasks:

image.png.faa2574b00b2dc978eddd41ce4a85d85.png

image.png.f2b94eead6723303f5713eaf0a200f3f.png

image.png.587278fdb957213439bee94cbd0f5d37.png

Link to comment
Share on other sites

Happy2Play
5 minutes ago, DavidAus said:

So they are not required? At the very least I would want the sync library to trakt.tv, but is 15 minutes too frequent?

Without them you would have to manually run the tasks.  But can't comment on how often you should run the task.

Link to comment
Share on other sites

DavidAus
1 hour ago, Happy2Play said:

Without them you would have to manually run the tasks.  But can't comment on how often you should run the task.

Thanks, I have set them to 24 hours and requested my account to be unblocked.

Link to comment
Share on other sites

DavidAus

This is the update from Trakt:

Quote

It looks like Emby stuffed your account with 200k play history items.  Your play history has been de-duplicated to the best of our ability, and your API access has been unlocked.

 Before using Trakt's API again, make sure to find a fix from this third party applications developer, or disable it entirely.

 Let me know if there's anything else I can help you with.

 - Sean

Very similar response to this issue last year. Seems 200k play items is the number they lock you out at. 

Is there anything more that can be looked into from the Emby side so this does not happen again? What are the default/recommended scheduled task settings etc?

Thanks

Link to comment
Share on other sites

3 hours ago, DavidAus said:

This is the update from Trakt:

Very similar response to this issue last year. Seems 200k play items is the number they lock you out at. 

Is there anything more that can be looked into from the Emby side so this does not happen again? What are the default/recommended scheduled task settings etc?

Thanks

I would say not more than once a day. You have it set to 15 minutes so I think that explains why you're having this problem.

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...