Bazzu85 21 Posted December 31, 2022 Share Posted December 31, 2022 (edited) Hi, after the trakt api downtime I'm trying to run a "sync to" task to update the watched contents during the period. after almost 2 minutes the scheduled task fails. here's the log: log suggestions? Edited December 31, 2022 by Bazzu85 Link to comment Share on other sites More sharing options...
MBSki 1020 Posted December 31, 2022 Share Posted December 31, 2022 Try getting another pin for the user you want to sync. I also revoked access to Emby on the trakt.tv site, although i'm not sure that step is necessary. Just getting a new pin should do the trick. Link to comment Share on other sites More sharing options...
Eigeplackter 75 Posted December 31, 2022 Share Posted December 31, 2022 Quote *** Error Report *** Version: 4.8.0.21 Command line: /volume4/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp Operating system: Linux version 4.4.180+ (root@build13) (gcc version 8.5.0 (GCC) ) #42962 SMP Tue Sep 20 22:35:56 CST 2022 Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: volume4/@appstore/EmbyServer/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/packages/EmbyServer/var Application path: /volume4/@appstore/EmbyServer/system MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: BadRequest 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.PostToTrakt(String url, Object data, CancellationToken cancellationToken, TraktUser traktUser) at Trakt.Api.TraktApi.RefreshUserAuth(TraktUser traktUser, CancellationToken cancellationToken) at Trakt.Api.TraktApi.SetRequestHeaders(HttpRequestOptions options, TraktUser traktUser, CancellationToken cancellationToken) 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, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) Source: Emby.Server.Implementations TargetSite: Void MoveNext() Not working for me either, this part is after revoked and added emby/trakt access. Link to comment Share on other sites More sharing options...
MBSki 1020 Posted December 31, 2022 Share Posted December 31, 2022 9 minutes ago, Eigeplackter said: Not working for me either, this part is after revoked and added emby/trakt access. Did you get a new pin too? Link to comment Share on other sites More sharing options...
Eigeplackter 75 Posted December 31, 2022 Share Posted December 31, 2022 Yup. Link to comment Share on other sites More sharing options...
Nemesis63 0 Posted January 2, 2023 Share Posted January 2, 2023 I had a similar problem. I fixed it by adding a pin to all my Emby users (even the admin one which I don't use to watch anything). Hope it helps. Link to comment Share on other sites More sharing options...
Eigeplackter 75 Posted January 2, 2023 Share Posted January 2, 2023 Ok so now I have added pins to all users, deinstalled plugin and revoked acces on trakt website. Reboot server, install plugin, reboot server. Still no positive reply: Quote 2023-01-02 16:34:41.450 Error Trakt: Tried to reauthenticate with Trakt, but neither PIN nor refreshToken was available 2023-01-02 16:34:41.459 Info HttpClient: POST https://api.trakt.tv/oauth/token 2023-01-02 16:34:42.236 Error TaskManager: Error *** Error Report *** Version: 4.8.0.21 Command line: /volume4/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp Operating system: Linux version 4.4.180+ (root@build13) (gcc version 8.5.0 (GCC) ) #42962 SMP Tue Sep 20 22:35:56 CST 2022 Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: volume4/@appstore/EmbyServer/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/packages/EmbyServer/var Application path: /volume4/@appstore/EmbyServer/system MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: BadRequest @Luke Log attached embyserver (1).txt Link to comment Share on other sites More sharing options...
Bazzu85 21 Posted January 11, 2023 Author Share Posted January 11, 2023 On 02/01/2023 at 10:12, Nemesis63 said: I had a similar problem. I fixed it by adding a pin to all my Emby users (even the admin one which I don't use to watch anything). Hope it helps. The problem seems to be resolved on my side refreshing the pin for all my users.. 1 Link to comment Share on other sites More sharing options...
Eigeplackter 75 Posted January 19, 2023 Share Posted January 19, 2023 Just throwing out some ideas, as I was still battling with the trakt plugin. Mine wasn't working since the trakt API was shutdown and didnt resume working, when it finally was put back online. What made me wonder was the relative small number of people being affected, I mean there were some threads in forum where people participated, but it was small amount, considering trakt share for playback logging. So after trying several proposed solutions in the last month, like reinstall plugin, revoke access in trakt, get new pin, and change user passwords for all my emby users I still couldn't get it to work, sync always failed in 1 second and reported: Quote 2023-01-19 21:41:11.442 Error TaskManager: Error *** Error Report *** Version: 4.8.0.21 Command line: /volume4/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp Operating system: Linux version 4.4.180+ (root@build13) (gcc version 8.5.0 (GCC) ) #42962 SMP Tue Sep 20 22:35:56 CST 2022 Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: volume4/@appstore/EmbyServer/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/packages/EmbyServer/var Application path: /volume4/@appstore/EmbyServer/system MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: BadRequest 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.PostToTrakt(String url, Object data, CancellationToken cancellationToken, TraktUser traktUser) at Trakt.Api.TraktApi.RefreshUserAuth(TraktUser traktUser, CancellationToken cancellationToken) at Trakt.Api.TraktApi.SetRequestHeaders(HttpRequestOptions options, TraktUser traktUser, CancellationToken cancellationToken) 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, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) Source: Emby.Server.Implementations TargetSite: Void MoveNext() So today I started another try to get it working,, as my OCD was driving me kinda mad, an it was sort of a coincidence. I discovered a device I haven't used for nearly 2 months and I was, in the browser (not app) still logged into my emby server with the default user "emby". Strange, as I changed that user password as I was trying to get the Trakt plugin working. So I logged out and used my regular "emby user" to sign in again. Than I did something that might seem "dumb", not sure that's why I share my experience, I deleted the default user emby from the server. Revoked access on trakt, and got a new access + pin via plugin (no restart or reinstall) and oh wonder trakt starting syncing again. Supposition, as I mentioned just throwing out ideas: Default user "emby" wasn't logged out from the other device even though access should have been revoked by change of password. Emby server keeps a "persistent log" of authenticated users, and grants access after authorisation, ignores password changes ! Seems like a bug to me ! I just tried it with my regular user, change pw via control panel - users, close the only open emby tab (webapp) and opened a new tab. Returned to emby by favorites (link: mysynology:8096 no user or pw in url) and could continue watching as if nothing had changed. I have secured lan access by password: Imho that shouldn't be possible at all. Propositions: However I'd like @Luke or maybe @softworkz readover my thoughts and maybe verify my assumptions Feature implementation into control panel of emby server, that tells the emby server to require new login at next connection attempt, something like a "Logout all connected users" button. Review handling of logged in users in case of password change by admin (clarification, the user changing the password was my regular emby user, who has allowance to manage server, not the "default user "emby") And I think, with my little knowledge of programming, that this "bug" might be the elemental cause for the sync problems I encountered. Thanks for your time and a reply. 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