aptalca 70 Posted May 25, 2023 Share Posted May 25, 2023 (edited) I noticed that on both of my servers the trakt.tv plugin started failing on pushes a few days ago. Digging deeper, neither the push or the pull is sucessful, although the scheduled tasks view shows the pull as completed successfully. Both servers are running Emby 4.7.11.0 and plugin version 3.6.9.0 I attempted to revoke the Emby app on my Trakt.tv account and start over with new tokens. Here are the logs: 1. Revoke Emby on Trakt.tv, get a new pin, input into settings and run a pull: 2023-05-25 10:27:58.090 Info HttpClient: POST https://api.trakt.tv/oauth/token 2023-05-25 10:27:58.220 Info Trakt: New trakt token info: {"access_token":"*****************redacted********","token_type":"Bearer","expires_in":7889237,"refresh_token":"****redacted*********","scope":"public","created_at":1685024877} 2023-05-25 10:27:58.620 Info HttpClient: GET https://api.trakt.tv/sync/watched/movies 2023-05-25 10:27:58.677 Error Trakt: Error syncing trakt data for user aptalca *** Error Report *** Version: 4.7.11.0 Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3 Operating system: Linux version 5.19.17-Unraid (root@Develop) (gcc (GCC) 12.2.0, GNU ld version 2.39-slack151) #2 SMP PREEMPT_DYNAMIC Wed Nov 2 11:54:15 PDT 2022 Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: app/emby/System.Private.CoreLib.dll Processor count: 12 Data path: /config Application path: /app/emby 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 Trakt.Api.TraktApi.GetFromTrakt[T](String url, TraktUser traktUser, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncFromTrakt.SyncTraktDataForUser(User user, TraktUser traktUser, Double currentProgress, CancellationToken cancellationToken, IProgress`1 progress, Double percentPerUser) at Trakt.ScheduledTasks.SyncFromTrakt.Execute(CancellationToken cancellationToken, IProgress`1 progress) Source: Emby.Server.Implementations TargetSite: Void MoveNext() The webgui shows it as completed successfully, but the log contains the error message. 2. Run a push 2023-05-25 10:34:59.806 Info HttpClient: GET https://api.trakt.tv/sync/watched/movies 2023-05-25 10:35:00.376 Error TaskManager: Error *** Error Report *** Version: 4.7.11.0 Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3 Operating system: Linux version 5.19.17-Unraid (root@Develop) (gcc (GCC) 12.2.0, GNU ld version 2.39-slack151) #2 SMP PREEMPT_DYNAMIC Wed Nov 2 11:54:15 PDT 2022 Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: app/emby/System.Private.CoreLib.dll Processor count: 12 Data path: /config Application path: /app/emby 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 Trakt.Api.TraktApi.GetFromTrakt[T](String url, TraktUser traktUser, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibrary.SyncMovies(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibrary.SyncUserLibrary(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibrary.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) Source: Emby.Server.Implementations TargetSite: Void MoveNext() The push/export action actually shows up in the webgui as "failed" and listed under alerts on the dashboard. Any ideas? Thanks EDIT: Based on the alert log on the dashboard, the issue started on May 22, around 6pm EDT on both servers (one local, one remote VPS) and has been ongoing since, where every single push attempt has failed. Here's the log from the other server that is a remote VPS 2023-05-25 10:44:00.819 Info HttpClient: GET https://api.trakt.tv/sync/watched/movies 2023-05-25 10:44:00.891 Error TaskManager: Error *** Error Report *** Version: 4.7.11.0 Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3 Operating system: Linux version 5.15.0-72-generic (buildd@lcy02-amd64-035) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #79-Ubun Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: app/emby/System.Private.CoreLib.dll Processor count: 4 Data path: /config Application path: /app/emby 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 Trakt.Api.TraktApi.GetFromTrakt[T](String url, TraktUser traktUser, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibrary.SyncMovies(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibrary.SyncUserLibrary(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibrary.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) Source: Emby.Server.Implementations TargetSite: Void MoveNext() Edited May 25, 2023 by aptalca more info Link to comment Share on other sites More sharing options...
aptalca 70 Posted May 25, 2023 Author Share Posted May 25, 2023 It looks like my trakt user account got locked and I need to contact their support to get it unlocked. Could emby detect that and communicate it to the user in the future? Link to comment Share on other sites More sharing options...
Luke 37272 Posted May 25, 2023 Share Posted May 25, 2023 Hi, how often do you have the trakt scheduled task set to run? Link to comment Share on other sites More sharing options...
Luke 37272 Posted May 25, 2023 Share Posted May 25, 2023 Can you please attach the complete emby server log? I'd like to look at it before you contact Trakt. I have a contact with them and I may want to be involved in the conversation. Thanks. Link to comment Share on other sites More sharing options...
aptalca 70 Posted May 25, 2023 Author Share Posted May 25, 2023 4 minutes ago, Luke said: Hi, how often do you have the trakt scheduled task set to run? I have 2 emby servers, one's syncing every 30 min, the other every 2 hours. I also have a plextraktsync instance syncing every 30 min. Link to comment Share on other sites More sharing options...
aptalca 70 Posted May 25, 2023 Author Share Posted May 25, 2023 7 minutes ago, Luke said: Can you please attach the complete emby server log? I'd like to look at it before you contact Trakt. I have a contact with them and I may want to be involved in the conversation. Thanks. embyserver.txt Link to comment Share on other sites More sharing options...
Luke 37272 Posted May 25, 2023 Share Posted May 25, 2023 9 minutes ago, aptalca said: I have 2 emby servers, one's syncing every 30 min, the other every 2 hours. I also have a plextraktsync instance syncing every 30 min. There's two trakt scheduled tasks. Which one is set to every 30 minutes? Both? Link to comment Share on other sites More sharing options...
aptalca 70 Posted May 25, 2023 Author Share Posted May 25, 2023 Correct. There is an import and an export task and both are set to 30 min on that server. The other emby server has both set 2 hrs. Link to comment Share on other sites More sharing options...
Luke 37272 Posted May 25, 2023 Share Posted May 25, 2023 If you still have the log file from when the lock first occurred then that would actually be better. Truthfully, you've got this overscheduled. The Emby sync from trakt isn't made to be running that frequently. Link to comment Share on other sites More sharing options...
aptalca 70 Posted May 25, 2023 Author Share Posted May 25, 2023 Gotcha. I'm just trying to keep multiple servers in sync as best I can do. I'll try and dig up the necessary log from when it started. I'm also looking into another solution called watchstate to keep them in sync, which doesn't invlolve Trakt.tv as an intermediary. Link to comment Share on other sites More sharing options...
Luke 37272 Posted May 25, 2023 Share Posted May 25, 2023 I'm still a little surprised you hit their limit, given that the latest update to the trakt plugin tries very hard to avoid it. The limits are here: https://github.com/trakt/api-help/issues/220 A single Emby trakt installation would not cause that, so I'm guessing it was possibly a perfect storm where you had multiple instances syncing at the exact same time. And then you must have exceeded the limit enough times to get the account locked. Link to comment Share on other sites More sharing options...
Luke 37272 Posted May 25, 2023 Share Posted May 25, 2023 Also it should go without saying, but in terms of syncing data to Trakt, it's not even necessary to have that run repeatedly on a schedule following the initial import, you really should only have one instance syncing your library content to Trakt. If all of the instances are using the same media library, then just having one report the library content should be enough. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now