Jump to content

Trakt Sync


Go to solution Solved by frankko,

Recommended Posts

Posted

I ended up at this thread because I too am having trouble getting Trakt to connect to Emby. I've tried changing my PIN a couple times to no avail. The log shows Trakt is returning a 400 error. Attached is a sample from my log. There are lots of blocks similar to it throughout the logs. Trakt scrobbling via Infuse is still working, as of two minutes ago.

I looked at the three linked threads on the Trakt and Github forums and I'm not sure what the action items would be. The first one seems to be about the API returning a 403 generally, no mention of Emby. The second Trakt forum item, if anyone can looked at the marked "solution" and tell me what I would do with that information, I would be glad to try it. And the 3rd one mentions making sure there's a user agent string in the API requests, which I don't know how to do.

Last thing: I am running Emby server 4.9.0.42 beta on a Synology DS1019+ DSM 7.2+.

Thanks!

Posted

So sorry! I said I was attaching a log and forgot it. 🤦‍♂️ Here it is.

log.txt

Posted

Sorry, I'm not sure what happened. I am just now realizing this is a brand new thread. I didn't mean to start a new thread. My initial post was meant to be a reply to this thread:

So the references I made to Trakt and Github forum topics were from that thread. Sorry for the confusion. 

I am okay with deleting / closing this thread if anyone feels it's necessary. 

To recap: I am unable to get Trakt to work in Emby. There are a couple log entries above if those are helpful. I can also see that after requesting new PINs from Trakt, which I've done several times now, I have yet to see Emby appear in Trakt's connected apps, where I do see InFuse and Jellyfin (and my old Plex Trakt plugin). So unlike the last post in that thread (as of now), getting a new PIN didn't solve the problem for me.

Apologies again.

Posted

Hi @frankkoI moved it here so that we can look at your issue separately.  Please attach the complete emby server log rather than just a snippet of it. Thanks.

Posted

Okay, thanks for clarifying. Here's the full log. There's at least one PIN reauthorization in there and a couple failed scrobbles.

Just before posting this I played something in both Jellyfin and Emby-via-InFuse (which has its own Trakt integration) and they both sent their now playing and scrobble successfully to my Trakt account.

Thanks! Sorry again for all the confusion.

embyserver-63878025600.txt

scottymeuk
Posted

Also seeing 403 suddenly. Is the user agent set correctly like Trakt said to do in the github discussion?

Attached the relevant logs.  

server.txt

Posted

Similar problem here. Track 3.7.8.0

2025-03-21 14:40:15.349 Info TaskManager: Export Library to Trakt Failed after 0 minute(s) and 1 seconds
2025-03-21 14:40:22.636 Info Server: http/1.1 POST https://host2:8920/emby/ScheduledTasks/Running/515a9565f7d0dfe5f375d92153f7c25d?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=38d34b26-351a-4951-a829-7447f45d3254&X-Emby-Client-Version=4.8.11.0&X-Emby-Token=x_secret1_x&X-Emby-Language=fr. Source Ip: host1, UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
2025-03-21 14:40:22.637 Info Server: http/1.1 Response 204 to host1. Time: 1ms. POST https://host2:8920/emby/ScheduledTasks/Running/515a9565f7d0dfe5f375d92153f7c25d?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=38d34b26-351a-4951-a829-7447f45d3254&X-Emby-Client-Version=4.8.11.0&X-Emby-Token=x_secret1_x&X-Emby-Language=fr
2025-03-21 14:40:22.637 Info TaskManager: Executing Export Library to Trakt
2025-03-21 14:40:22.637 Info Trakt: Syncing user data for Maison
2025-03-21 14:40:23.738 Info HttpClient: POST https://api.trakt.tv/oauth/token
2025-03-21 14:40:23.752 Error Trakt: Error in SyncUserData
	*** Error Report ***
	Version: 4.8.11.0
	Command line: /volume1/@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-synology72_{version}_x86_64.spk -noautorunwebapp
	Operating system: Linux version 4.4.302+ (root@build5) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:44:44 CST 2024
	Framework: .NET 6.0.36
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 2
	Data path: /var/packages/EmbyServer/var
	Application path: /volume1/@appstore/EmbyServer/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Forbidden
	   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.GetResponseFromTrakt(HttpRequestOptions options, String method, CancellationToken cancellationToken)
	   at Trakt.Api.TraktApi.PostToTrakt(String url, Object data, TraktUser traktUser, CancellationToken cancellationToken)
	   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[T](String url, TraktUser traktUser, CancellationToken cancellationToken)
	   at Trakt.ScheduledTasks.TraktUserSync.SyncMovies(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken)
	   at Trakt.ScheduledTasks.TraktUserSync.SyncUserData(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken)
	   at Trakt.ScheduledTasks.SyncLibrary.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	
2025-03-21 14:40:23.752 Error TaskManager: Error
	*** Error Report ***
	Version: 4.8.11.0
	Command line: /volume1/@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-synology72_{version}_x86_64.spk -noautorunwebapp
	Operating system: Linux version 4.4.302+ (root@build5) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:44:44 CST 2024
	Framework: .NET 6.0.36
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 2
	Data path: /var/packages/EmbyServer/var
	Application path: /volume1/@appstore/EmbyServer/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Forbidden
	   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()
	
2025-03-21 14:40:23.752 Info TaskManager: Export Library to Trakt Failed after 0 minute(s) and 1 seconds
  • Like 1
Posted

Similar problem here. Track 3.7.8.0

2025-03-21 14:40:15.349 Info TaskManager: Export Library to Trakt Failed after 0 minute(s) and 1 seconds
2025-03-21 14:40:22.636 Info Server: http/1.1 POST https://host2:8920/emby/ScheduledTasks/Running/515a9565f7d0dfe5f375d92153f7c25d?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=38d34b26-351a-4951-a829-7447f45d3254&X-Emby-Client-Version=4.8.11.0&X-Emby-Token=x_secret1_x&X-Emby-Language=fr. Source Ip: host1, UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
2025-03-21 14:40:22.637 Info Server: http/1.1 Response 204 to host1. Time: 1ms. POST https://host2:8920/emby/ScheduledTasks/Running/515a9565f7d0dfe5f375d92153f7c25d?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=38d34b26-351a-4951-a829-7447f45d3254&X-Emby-Client-Version=4.8.11.0&X-Emby-Token=x_secret1_x&X-Emby-Language=fr
2025-03-21 14:40:22.637 Info TaskManager: Executing Export Library to Trakt
2025-03-21 14:40:22.637 Info Trakt: Syncing user data for Maison
2025-03-21 14:40:23.738 Info HttpClient: POST https://api.trakt.tv/oauth/token
2025-03-21 14:40:23.752 Error Trakt: Error in SyncUserData
	*** Error Report ***
	Version: 4.8.11.0
	Command line: /volume1/@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-synology72_{version}_x86_64.spk -noautorunwebapp
	Operating system: Linux version 4.4.302+ (root@build5) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:44:44 CST 2024
	Framework: .NET 6.0.36
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 2
	Data path: /var/packages/EmbyServer/var
	Application path: /volume1/@appstore/EmbyServer/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Forbidden
	   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.GetResponseFromTrakt(HttpRequestOptions options, String method, CancellationToken cancellationToken)
	   at Trakt.Api.TraktApi.PostToTrakt(String url, Object data, TraktUser traktUser, CancellationToken cancellationToken)
	   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[T](String url, TraktUser traktUser, CancellationToken cancellationToken)
	   at Trakt.ScheduledTasks.TraktUserSync.SyncMovies(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken)
	   at Trakt.ScheduledTasks.TraktUserSync.SyncUserData(User user, TraktUser traktUser, TraktApi traktApi, ISplittableProgress`1 progress, CancellationToken cancellationToken)
	   at Trakt.ScheduledTasks.SyncLibrary.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	
2025-03-21 14:40:23.752 Error TaskManager: Error
	*** Error Report ***
	Version: 4.8.11.0
	Command line: /volume1/@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-synology72_{version}_x86_64.spk -noautorunwebapp
	Operating system: Linux version 4.4.302+ (root@build5) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:44:44 CST 2024
	Framework: .NET 6.0.36
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 2
	Data path: /var/packages/EmbyServer/var
	Application path: /volume1/@appstore/EmbyServer/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Forbidden
	   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()
	
2025-03-21 14:40:23.752 Info TaskManager: Export Library to Trakt Failed after 0 minute(s) and 1 seconds
Posted

Is ti because of new version of Trakt 3.7.8 ?

Posted

Is it because of new version of Trakt 3.7.8 ?

Posted

Currently all requests to Trakt are sending back a forbidden response. This is what happened last week to many apps, and several hours later Trakt resolved it on their end.

scottymeuk
Posted

Trakt changed how quickly access tokens expire, and Emby needs to be updated to support this 

 

Posted
6 hours ago, scottymeuk said:

Trakt changed how quickly access tokens expire, and Emby needs to be updated to support this 

 

If has been already.

WilhelmStroker
Posted

Both scrobbling and sync didn't work for me yesterday but started working after I requested a new pin. 

scottymeuk
Posted

Ah yeah, you have to set it up again with a new code. Thank you.

  • Solution
Posted

My Trakt plugin was just updated to version 3.7.9 and now everything appears to be working as expected. Thanks!

Posted

It was working but not anymore...

WilhelmStroker
Posted
28 minutes ago, MAX92 said:

It was working but not anymore...

Yep it stopped scrobbling again, but started working after getting yet another pin. 

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