aptalca 70 Posted February 10, 2021 Share Posted February 10, 2021 Trakt keeps giving errors when pushing watched history. Scrobbling seems to work sometimes, but not all the time. I tried getting a new pin and retrying, but having the same issues. Here's a log snippet: 2021-02-10 16:30:49.058 Info Trakt: Episodes to set watched: 3 2021-02-10 16:30:49.059 Info HttpClient: POST https://api.trakt.tv/sync/history 2021-02-10 16:30:49.159 Error Trakt: TraktResponse not Found:{} 2021-02-10 16:30:49.159 Error Trakt: TraktResponse not Found:{} 2021-02-10 16:30:49.159 Error Trakt: TraktResponse not Found:{} 2021-02-10 16:30:49.159 Info Trakt: Episodes to set unwatched: 0 Link to comment Share on other sites More sharing options...
aptalca 70 Posted February 11, 2021 Author Share Posted February 11, 2021 Just tested on my backup server and get the same results. Getting watch history from Trakt works just fine, so my api key is clearly working: 2021-02-11 11:15:31.156 Info HttpClient: GET https://api.trakt.tv/sync/watched/shows 2021-02-11 11:15:31.675 Info HttpClient: GET https://api.trakt.tv/sync/playback/movies 2021-02-11 11:15:31.896 Info HttpClient: GET https://api.trakt.tv/sync/playback/episodes 2021-02-11 11:15:32.452 Info Trakt: Trakt.tv watched Movies count = 1157 2021-02-11 11:15:32.452 Info Trakt: Trakt.tv watched Shows count = 155 2021-02-11 11:15:32.452 Info Trakt: Trakt.tv playback Movies count = 195 2021-02-11 11:15:32.452 Info Trakt: Trakt.tv playback Episodes count = 190 However, if I manually mark an episode as watched, the next push to trakt fails: 2021-02-11 11:15:41.054 Info HttpClient: GET https://api.trakt.tv/sync/collection/movies?extended=metadata 2021-02-11 11:15:53.445 Info Trakt: Movies to set watched: 0 2021-02-11 11:15:53.445 Info Trakt: Movies to set unwatched: 0 2021-02-11 11:15:53.445 Info HttpClient: GET https://api.trakt.tv/sync/watched/shows 2021-02-11 11:15:53.779 Info HttpClient: GET https://api.trakt.tv/sync/collection/shows?extended=metadata 2021-02-11 11:16:02.021 Info Trakt: Episodes to set watched: 1 2021-02-11 11:16:02.023 Info HttpClient: POST https://api.trakt.tv/sync/history 2021-02-11 11:16:02.209 Error Trakt: TraktResponse not Found:{} 2021-02-11 11:16:02.209 Info Trakt: Episodes to set unwatched: 0 I turned debug logging on in the plugin settings, but it didn't seem to make much of a difference in the log message. These results are with Emby Server 4.5.4.0 and Trakt plugin 3.4.5.0 Thanks Link to comment Share on other sites More sharing options...
aptalca 70 Posted February 11, 2021 Author Share Posted February 11, 2021 I see some other threads about locked Trakt accounts, but they mention dashboard errors that say "locked". I'm not getting any such errors. Plus, the pulls from trakt are working. Is there a definitive way to confirm that it's locked? Thanks Link to comment Share on other sites More sharing options...
WilhelmStroker 96 Posted February 12, 2021 Share Posted February 12, 2021 14 hours ago, aptalca said: I see some other threads about locked Trakt accounts, but they mention dashboard errors that say "locked". I'm not getting any such errors. Plus, the pulls from trakt are working. Is there a definitive way to confirm that it's locked? Thanks I dont think there is, the only way I found out that my account was locked was when i tried a different trakt app on my phone which threw the 423 error code which is related to the locked account. And when my account was locked, pulls were also still working. https://github.com/trakt/api-help/issues/228 1 Link to comment Share on other sites More sharing options...
aptalca 70 Posted February 12, 2021 Author Share Posted February 12, 2021 Thanks for the info. I contacted trakt support about my account. @Lukecan we get trakt plugin to recognize code 423 returned by the trakt api and notify the user about their locked trakt account? Thanks 1 Link to comment Share on other sites More sharing options...
Luke 36879 Posted February 12, 2021 Share Posted February 12, 2021 27 minutes ago, aptalca said: Thanks for the info. I contacted trakt support about my account. @Lukecan we get trakt plugin to recognize code 423 returned by the trakt api and notify the user about their locked trakt account? Thanks Notify how? Most trakt operations occur in the background. Link to comment Share on other sites More sharing options...
aptalca 70 Posted February 12, 2021 Author Share Posted February 12, 2021 Right, at least a message in the log would be helpful as currently there is no way the end user can even find out that their trakt account is locked. The only way to know is via the code 423 trakt returns via its api, which emby ignores. Perhaps a log message about a returned code 423, alerting the user that their account is locked and that they should contact trakt? Link to comment Share on other sites More sharing options...
Luke 36879 Posted February 12, 2021 Share Posted February 12, 2021 yes that's a good idea, thanks. 1 Link to comment Share on other sites More sharing options...
aptalca 70 Posted February 16, 2021 Author Share Posted February 16, 2021 I just heard back from Trakt and apparently my account was not locked. They said there are no issues on their end and that I should let emby know of the issue. This is still ongoing on two separate servers (same trakt account). One server is local, the other is on a vps, so it's unlikely that it's a connection issue. I unmarked this as solved. @Luke I turned on collection syncing, and got a new pin from trakt and ran a push. This is the log output I get: 2021-02-16 10:13:03.059 Info HttpClient: GET https://api.trakt.tv/sync/watched/movies 2021-02-16 10:13:03.465 Info HttpClient: GET https://api.trakt.tv/sync/collection/movies?extended=metadata 2021-02-16 10:13:12.167 Info Trakt: Movies to add to collection: 80 2021-02-16 10:13:12.204 Info HttpClient: POST https://api.trakt.tv/sync/collection 2021-02-16 10:13:13.039 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:13.039 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:13.043 Info Trakt: Movies to remove from collection: 42 2021-02-16 10:13:13.052 Info HttpClient: POST https://api.trakt.tv/sync/collection/remove 2021-02-16 10:13:13.587 Info HttpClient: POST https://api.trakt.tv/sync/collection/remove 2021-02-16 10:13:13.821 Info Trakt: Movies to set watched: 0 2021-02-16 10:13:13.821 Info Trakt: Movies to set unwatched: 0 2021-02-16 10:13:13.821 Info HttpClient: GET https://api.trakt.tv/sync/watched/shows 2021-02-16 10:13:14.491 Info HttpClient: GET https://api.trakt.tv/sync/collection/shows?extended=metadata 2021-02-16 10:13:21.830 Info Trakt: Episodes to add to Collection: 46 2021-02-16 10:13:21.856 Info HttpClient: POST https://api.trakt.tv/sync/collection 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.993 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:21.996 Info Trakt: Episodes to remove from Collection: 2 2021-02-16 10:13:22.000 Info HttpClient: POST https://api.trakt.tv/sync/collection/remove 2021-02-16 10:13:22.534 Info HttpClient: POST https://api.trakt.tv/sync/collection/remove 2021-02-16 10:13:23.073 Info HttpClient: POST https://api.trakt.tv/sync/collection/remove 2021-02-16 10:13:23.110 Error Trakt: Exception handled sending episodes to trakt.tv *** Error Report *** Version: 4.5.4.0 Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 Operating system: Linux version 4.19.107-Unraid (root@38721b48cdfb) (gcc version 9.2.0 (GCC)) #1 SMP Sun Mar 8 14:34:03 CDT 2020 Framework: .NET Core 3.1.8 OS/Process: x64/x64 Runtime: system/System.Private.CoreLib.dll Processor count: 16 Data path: /config Application path: /system MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: TooManyRequests 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.<>c__DisplayClass34_0.<<PostToTrakt>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Trakt.Api.TraktApi.Retry[T](Func`1 function) at Trakt.Api.TraktApi.PostToTrakt(String url, Object data, CancellationToken cancellationToken, TraktUser traktUser) at Trakt.Api.TraktApi.SendLibraryRemovalsAsync(List`1 uncollectedEpisodes, TraktUser traktUser, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.SendEpisodeCollectionRemovals(TraktUser traktUser, List`1 uncollectedEpisodes, ISplittableProgress`1 progress, CancellationToken cancellationToken) Source: Emby.Server.Implementations TargetSite: Void MoveNext() 2021-02-16 10:13:23.110 Info Trakt: Episodes to set watched: 3 2021-02-16 10:13:23.110 Info HttpClient: POST https://api.trakt.tv/sync/history 2021-02-16 10:13:23.643 Info HttpClient: POST https://api.trakt.tv/sync/history 2021-02-16 10:13:23.759 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:23.759 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:23.759 Error Trakt: TraktResponse not Found:{} 2021-02-16 10:13:23.759 Info Trakt: Episodes to set unwatched: 0 Fwiw, the pulls from trakt are working, as is scrobbling. While watching media, trakt correctly shows the active playback, and when the episode ends, the item is marked as watched on trakt (most of the time). However, the pushes have been failing for over a week now. Emby is running in docker (official) stable tag, on unraid. Thanks Link to comment Share on other sites More sharing options...
Luke 36879 Posted February 16, 2021 Share Posted February 16, 2021 Hi, what do you mean by pushes? Link to comment Share on other sites More sharing options...
aptalca 70 Posted February 17, 2021 Author Share Posted February 17, 2021 Sorry I'm not using the correct terminology By pull, I mean "import playstates from trakt.tv" and by push, I mean "sync library to trakt.tv". The first action (import) works successfully without errors. Scrobble also works majority of the time. But the second action (sync to trakt.tv) results in the errors posted above. Link to comment Share on other sites More sharing options...
Luke 36879 Posted February 17, 2021 Share Posted February 17, 2021 Ok looks like they're sending back an error about too many requests. We'll try to adjust the plugin to reduce requests. Thanks. 1 Link to comment Share on other sites More sharing options...
aptalca 70 Posted March 19, 2021 Author Share Posted March 19, 2021 @Luke Any updates to this issue? It is still happening on the latest stable emby with the latest plugin. I manually marked a few movies as watched last week, and it seems they were already updated on Trakt. (account not blocked, confirmed by Trakt staff). However the 3 episodes that were marked as watched on emby are just not getting synced to trakt. Here's a log with debug enabled on both the plugin settings and emby log settings: https://privatebin.net/?d1b1a8783498848d#9QQT1NNG1eqeZVZ35gnYxN3XBjYYLjqcDzReBvQiHm8c Thanks Link to comment Share on other sites More sharing options...
Luke 36879 Posted March 21, 2021 Share Posted March 21, 2021 On 3/19/2021 at 5:06 PM, aptalca said: @Luke Any updates to this issue? It is still happening on the latest stable emby with the latest plugin. I manually marked a few movies as watched last week, and it seems they were already updated on Trakt. (account not blocked, confirmed by Trakt staff). However the 3 episodes that were marked as watched on emby are just not getting synced to trakt. Here's a log with debug enabled on both the plugin settings and emby log settings: https://privatebin.net/?d1b1a8783498848d#9QQT1NNG1eqeZVZ35gnYxN3XBjYYLjqcDzReBvQiHm8c Thanks Hi @aptalca can you please go over an example? Thanks. Link to comment Share on other sites More sharing options...
aptalca 70 Posted March 22, 2021 Author Share Posted March 22, 2021 @Luke I think I'm getting somewhere. Looking through the debug logs, this is the crucial part: https://pastebin.com/HR05GMTW Looking at the 3 episodes that are supposed to be marked as watched on trakt, the tvdb ids that I have in my library don't match the ids on tvdb. These are the ids I have in the log: 8074584, 8088265 and 8088267, which are supposed to be the show The Vikings, Season 6 episodes 11, 15 and 17. However, when I check on tvdb, those are not the ids. My guess is, that's the reason the plugin is giving the error: "Error Trakt: TraktResponse not Found:{}" I tried refreshing the metadata for those episodes as well as the whole season but it didn't seem to fix anything. There are also 51 episodes that are supposed to be added to the trakt collection but are failing (I am assuming for the same reason) but I'm not sure what those episodes are (didn't have time to search through Emby's sqlite database yet). Any ideas how I can get emby to force refresh the tvdb ids? Thanks Link to comment Share on other sites More sharing options...
Luke 36879 Posted March 22, 2021 Share Posted March 22, 2021 You'd have to edit them manually. It might be faster to just blank them out with the metadata editor and then refresh the metadata on the series. Link to comment Share on other sites More sharing options...
Solution aptalca 70 Posted March 22, 2021 Author Solution Share Posted March 22, 2021 Thanks so much, manually blanking out in editor, then refreshing metadata worked. Now the ids in library are correct and trakt sync is successful for the watched episodes. This was quite a rollercoaster ride. POSTMORTEM: Trakt account was not locked (confirmed with Trakt staff) There were no issues with trakt sync via the trakt plugin. The issue was mismatching tvdb ids in emby library and thetvdb.com. Trakt plugin was sending incorrect tvdb ids to be marked as watched, trakt.tv was unable to complete the request due to not recognizing the tvdb id. To fully diagnose, I had to turn on debug logging in both the trakt plugin settings and the emby log settings. Only after then, emby logged the tvdb ids that were being used. Checking them against the online service revealed the underlying issue. Going forward, it would be nice if the following could be implemented: 1. More verbose logging with the trakt plugin, perhaps including the tvdb, tmdb ids in the regular non-debug log. (Debug logging generates a huge 3.5MB log due to the extended metadata received from trakt.tv, which is not easy to sift through or handle). It would also be nice if the trakt plugin logged the actual response codes from trakt about the errors, rather than print a generic error. 2. Perhaps implement a way for Emby to detect changing tvdb ids (Trakt.tv service apparently does this already). Thanks 1 Link to comment Share on other sites More sharing options...
Luke 36879 Posted March 22, 2021 Share Posted March 22, 2021 Quote More verbose logging with the trakt plugin, perhaps including the tvdb, tmdb ids in the regular non-debug log Hi, yes I would agree with this. Thanks for the feedback. 1 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