Pankookis 9 Posted February 12, 2018 Share Posted February 12, 2018 (edited) When running the scheduled task "Sync library to Trakt.tv" it fails. If I look at my notifications it says it failed because it was unauthorized. I can "Import playstates from Trakt.tv" and it scrobbles what I'm watching. Have had this issue for about a week now. Emby Server Version 3.2.70.0 Trakt plugin 3.1.4.0 server-63654040674.txt Edited February 15, 2018 by Pankookis Link to comment Share on other sites More sharing options...
kesm 25 Posted February 12, 2018 Share Posted February 12, 2018 You need to add an Authentification PIN in trakt plugin configuration Link to comment Share on other sites More sharing options...
Pankookis 9 Posted February 12, 2018 Author Share Posted February 12, 2018 You need to add an Authentification PIN in trakt plugin configuration Done this many times. Have uninstalled, restarted, then installed the plugin again and entered a PIN but it's the same. It's just the Sync library part that doesn't work. Link to comment Share on other sites More sharing options...
Trevor68 48 Posted February 13, 2018 Share Posted February 13, 2018 OP is correct, was working, now isn't, doing PIN again does not help. 1 Link to comment Share on other sites More sharing options...
Trevor68 48 Posted February 13, 2018 Share Posted February 13, 2018 (edited) tried updating pin again, still no joy so heres my log. server-63654094810.txt Edited February 13, 2018 by Trevor68 Link to comment Share on other sites More sharing options...
J2ghz 11 Posted February 13, 2018 Share Posted February 13, 2018 @@Pankookis and @@Trevor68 can you try to capture the error in the log again, while having debug logging on? See screenshots:https://i.imgur.com/cY5xdNx.pnghttps://i.imgur.com/2Bne9tW.png Link to comment Share on other sites More sharing options...
Trevor68 48 Posted February 13, 2018 Share Posted February 13, 2018 Ah dammit, I missed the first screenshot, will take the log again tonight. Link to comment Share on other sites More sharing options...
Pankookis 9 Posted February 13, 2018 Author Share Posted February 13, 2018 @@J2ghz Debug logging checked and I hope this is correct. The log didn't seem to include so much more than before but I'm just a layman server-63654156403.txt Link to comment Share on other sites More sharing options...
Trevor68 48 Posted February 13, 2018 Share Posted February 13, 2018 Interestingly my Media Center Master is now failing auth for no particular reason, makes one wonder if trakt are stuffing about with their API again maybe. Link to comment Share on other sites More sharing options...
J2ghz 11 Posted February 14, 2018 Share Posted February 14, 2018 (edited) @@Trevor68 I had a look at the changelog, there seem to be no announced breaking changes and no outages. I also tried to re-authenticate mine just now and it worked. You can also try the steps below. @@Pankookis 401 Unauthorized at /auth/token according to docs means that the code (in this case PIN) provided was invalid, expired, revoked or already used. Try following these steps with logging on like before: Go to Trakt plugin configuration page, switch to your user Click Get PIN, put it in the field, click Save Go to scheduled tasks, run one of the tasks from Trakt, wait for it to finish, if it says failed send the log. Start watching something, after a few tens of seconds go to Trakt.tv to check if it says you are watching what you are watching. If it does not, send the log. Edited February 14, 2018 by J2ghz Link to comment Share on other sites More sharing options...
Pankookis 9 Posted February 14, 2018 Author Share Posted February 14, 2018 @@J2ghz Followed your steps until 3. I can "Import playstates....." but "Sync library....." still fails for me and it says unauthorized server-63654235613.txt Link to comment Share on other sites More sharing options...
Trevor68 48 Posted February 14, 2018 Share Posted February 14, 2018 (edited) and here is my log with both debugs enabled. server-63654267611.txt Edited February 14, 2018 by Trevor68 Link to comment Share on other sites More sharing options...
Pankookis 9 Posted February 15, 2018 Author Share Posted February 15, 2018 (edited) Solved. Go to .../YOUR USER/Appdata/Roaming/Emby-Server/plugins/configurations/ and delete trakt.xml and then re-authenticate. Find appropriate folder for other OS. This clear the plugin from all data. Uninstalling the plugin seem to store this file and since the PIN disappear from the plugin setting page there was no way of knowing that it used old data. Why re-authenticating didn't work, I have no idea, but as someone mentioned in another Trakt thread it might for some reason hold the PIN for only 2 months. Edited February 15, 2018 by Pankookis 1 Link to comment Share on other sites More sharing options...
Trevor68 48 Posted February 15, 2018 Share Posted February 15, 2018 That would totally explain why the PIN wasn't clearing from the field, will give it a go tonight. The 2 months thing seems valid, as my MCM also stopped validating at the same time. Link to comment Share on other sites More sharing options...
Trevor68 48 Posted February 16, 2018 Share Posted February 16, 2018 Mine got a bit more involved but eventually by revoking emby from trakt, deleting the plugin and the file, and starting from scratch, it's all fixed. :-) 1 Link to comment Share on other sites More sharing options...
Pankookis 9 Posted February 16, 2018 Author Share Posted February 16, 2018 Mine got a bit more involved but eventually by revoking emby from trakt, deleting the plugin and the file, and starting from scratch, it's all fixed. :-) Yeah, I had already revoked Emby during my hair pulling phase some time before so maybe that was critical too. Link to comment Share on other sites More sharing options...
jmedemar 8 Posted February 22, 2018 Share Posted February 22, 2018 I was fighting with this same issue. Thanks to the help above, I checked my .xml file and found the expiration date of my token was 2-6-18. Even though I had gotten a new token and it saved to the .xml properly, the expiration time field was not updated properly in the .xml If any of the plugin developers are listening in, please check this out in your implementation, as the .xml file is not updating properly when a new token is saved. Thanks everyone for the help! Link to comment Share on other sites More sharing options...
njoak 23 Posted February 28, 2018 Share Posted February 28, 2018 Solved. Go to .../YOUR USER/Appdata/Roaming/Emby-Server/plugins/configurations/ and delete trakt.xml and then re-authenticate. Find appropriate folder for other OS. This clear the plugin from all data. Uninstalling the plugin seem to store this file and since the PIN disappear from the plugin setting page there was no way of knowing that it used old data. Why re-authenticating didn't work, I have no idea, but as someone mentioned in another Trakt thread it might for some reason hold the PIN for only 2 months. Awesome, this got my Trakt plugin finally working again. Thanks a bunch! Link to comment Share on other sites More sharing options...
Animosity022 6 Posted March 2, 2018 Share Posted March 2, 2018 (edited) I've read through this a few times. I've tried deleting the plugin and the trakt.xml file a few times and I can't seem to get authenticated. I've got a fresh install on Fedora 27 that I've been trying to get setup. Server logs are attached but they didn't tell me much. server-63655538556.txt Edited March 2, 2018 by Animosity022 Link to comment Share on other sites More sharing options...
digger11 1 Posted March 2, 2018 Share Posted March 2, 2018 (edited) I've been fighting the trakt plugin on my new server install for hours. A couple of days ago I added a user and linked it to Trakt without any issues. Today I added a couple of additional users and went through the same process, but their accounts won't sync. I've tried everything I could think of, including deleting the trakt config xml file, and revoking Emby's connection on my account on the trakt website, and nothing has worked. To see whether it was something peculair to the new server, I even went onto a different server where things were working fine and tried to get a new authentication pin for my account. The behavior is the same now on that server. The symptom I see is that if I go into the settings for the trakt plugin, select a user click on "get pin" log onto trackt allow Emby to use my account copy the pin paste it into the trakt plugin hit save go to scheduled tasks run the import play states from trakt The import fails. If I then go back into the trakt plugin settings and look at the user, the pin code I pasted in is still present. The errors I see in the log look like the following. 2018-03-01 21:28:12.563 Info HttpClient: POST: https://api.trakt.tv/oauth/token 2018-03-01 21:28:12.689 Error Trakt: Exception handled *** Error Report *** Version: 3.2.70.0 Command line: C:\Users\home\AppData\Roaming\MediaBrowser-Server\system\EmbyServer.dll -service Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 4 Program data path: C:\Users\home\AppData\Roaming\MediaBrowser-Server Application directory: C:\Users\home\AppData\Roaming\MediaBrowser-Server\system MediaBrowser.Model.Net.HttpException: Unauthorized at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsyncInternal>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsync>d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<PostToTrakt>d__30.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<RefreshUserAuth>d__26.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SetRequestHeaders>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<GetFromTrakt>d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SendGetAllWatchedMoviesRequest>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.ScheduledTasks.SyncFromTraktTask.<SyncTraktDataForUser>d__7.MoveNext() MediaBrowser.Model.Net.HttpException at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsyncInternal>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsync>d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<PostToTrakt>d__30.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<RefreshUserAuth>d__26.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SetRequestHeaders>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<GetFromTrakt>d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SendGetAllWatchedMoviesRequest>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.ScheduledTasks.SyncFromTraktTask.<SyncTraktDataForUser>d__7.MoveNext() 2018-03-01 21:28:12.695 Error Trakt: Error syncing trakt data for user j&j *** Error Report *** Version: 3.2.70.0 Command line: C:\Users\home\AppData\Roaming\MediaBrowser-Server\system\EmbyServer.dll -service Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 4 Program data path: C:\Users\home\AppData\Roaming\MediaBrowser-Server Application directory: C:\Users\home\AppData\Roaming\MediaBrowser-Server\system MediaBrowser.Model.Net.HttpException: Unauthorized at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsyncInternal>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsync>d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<PostToTrakt>d__30.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<RefreshUserAuth>d__26.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SetRequestHeaders>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<GetFromTrakt>d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SendGetAllWatchedMoviesRequest>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.ScheduledTasks.SyncFromTraktTask.<SyncTraktDataForUser>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.ScheduledTasks.SyncFromTraktTask.<Execute>d__6.MoveNext() MediaBrowser.Model.Net.HttpException at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsyncInternal>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.<SendAsync>d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<PostToTrakt>d__30.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<RefreshUserAuth>d__26.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SetRequestHeaders>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<GetFromTrakt>d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.Api.TraktApi.<SendGetAllWatchedMoviesRequest>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.ScheduledTasks.SyncFromTraktTask.<SyncTraktDataForUser>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Trakt.ScheduledTasks.SyncFromTraktTask.<Execute>d__6.MoveNext() 2018-03-01 21:28:12.695 Info TaskManager: Import playstates from Trakt.tv Completed after 0 minute(s) and 2 seconds server-63655536310.txtI Edited March 2, 2018 by digger11 Link to comment Share on other sites More sharing options...
Pankookis 9 Posted March 2, 2018 Author Share Posted March 2, 2018 I've read through this a few times. I've tried deleting the plugin and the trakt.xml file a few times and I can't seem to get authenticated. I've got a fresh install on Fedora 27 that I've been trying to get setup. Server logs are attached but they didn't tell me much. Have you tried to revoke the access over at Trakt? You can do that through your settings somewhere, look for a tab called "connected apps" or something similar, delete the Emby token and try again. Trevor68 had to do this and I did it long before I got it to work so I'm unsure of the impact. But it's worth a try. Link to comment Share on other sites More sharing options...
Animosity022 6 Posted March 2, 2018 Share Posted March 2, 2018 Have you tried to revoke the access over at Trakt? You can do that through your settings somewhere, look for a tab called "connected apps" or something similar, delete the Emby token and try again. Trevor68 had to do this and I did it long before I got it to work so I'm unsure of the impact. But it's worth a try. Since it never makes that first connection to use the PIN, it never shows up in the Connect Apps. Connected Apps is just under Settings->Connected Apps. Link to comment Share on other sites More sharing options...
Pankookis 9 Posted March 2, 2018 Author Share Posted March 2, 2018 Since it never makes that first connection to use the PIN, it never shows up in the Connect Apps. Connected Apps is just under Settings->Connected Apps. Oops. Missed that part. Hope it gets solved soon. Link to comment Share on other sites More sharing options...
Animosity022 6 Posted March 2, 2018 Share Posted March 2, 2018 That's identical to my use case and problem as well. Link to comment Share on other sites More sharing options...
Luke 37133 Posted March 2, 2018 Share Posted March 2, 2018 We're looking into this, thanks guys. 2 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