trakt/Plex-Trakt-Scrobbler

Unable to sync [Unable to retrieve account details from plex.tv]

Opened this issue · 105 comments

Hello,

Syncing from plex stopped few days ago, while still working in jellyfin. i searched the logs and it seems for reason the plugin is unable to get the plex account.

2021-10-06 14:45:34,284 - plugin.models.m_plex.account     (7fcf495dab38) :  INFO (plugin.models.m_plex.account:118) - Refreshing plex account: <PlexAccount username: u'my-username'>
2021-10-06 14:45:34,798 - plugin.models.m_plex.account     (7fcf495dab38) :  WARNING (plugin.models.m_plex.account:126) - Unable to retrieve account details from plex.tv (status_code: 422)

and this message kept on being repeated every time the server tries to sync.

[17 minutes ago] AccountAuthenticationError: Plex account is missing the server token

things 1 did.

  1. remove every trace of the plugin and reinstall. - failed same issue
  2. disclaim the server and reclaim. - nope same issue
  3. re-authorize the plugin via trakt.tv.

The easy way

download the fork from https://github.com/Cornishman/Plex-Trakt-Scrobbler/tree/scrobble_fix_with_PlexOnlineToken_fix to fix the issue.

The hard way

Ok for some reason this issue has blown up and there is lots of requests on how to do this thing. I'll try to gather the information in easy to consume way. The temp fix involve editing file in traktv.bundle directory.

X-Plex-Token

First step is to get your X-Plex-Token. For how to find it please visit this link.
https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

File Location

The file location depends on how you installed plex.

On regular installation please refers to this page to find Plex data directory.
https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/

Synology

on "Synology package"
The files located in the Plex shared folder. Open File station and go to "Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/modules/migrations/account.py" via @coreyp93

Others

In General you need to edit this file "Trakttv.bundle/Contents/Libraries/Shared/plugin/modules/migrations/account.py"

Editing the File

around line 241 look for

env_token = os.environ.get('PLEXTOKEN')

There is two ways you can fix this issue if you know what environment variable is choose option 2, if you dont understand what is environment variable is choose option 1.

Change the line to

Option 1

        #env_token = os.environ.get('PLEXTOKEN')
        env_token = 'Your X-Plex-Token here'

Option 2

        #env_token = os.environ.get('PLEXTOKEN')
        env_token = os.environ.get('PLEX_SERVER_TOKEN')

be mindful that python uses whitespace as indentation level, so make sure replaced code matches the indentation level. via @regystro

add PLEX_SERVER_TOKEN with your X-Plex-Token as value. in whatever system or container you use. i.e. unraid custom ENV Vars or windows or docker-compose, or whatever system you use.

finally

After editing the file and making sure the changes saved. restart plex.

i have the same issue, but this did't helped me. maybe because i don't use docker

i have the same issue, but this did't helped me. maybe because i don't use docker

I use docker mostly, but i think you can do same steps and instead of editing docker-compose.yaml do export PLEX_SERVER_TOKEN=YOUR_PLEX_TOKEN in shell that runs plex and then restart the plex process. if you can describe how you are running PMS i may be able to help. if it's windows you have to add ENV globally and restart the PMS process.

or you can just hardcode the token

so instead of

#env_token = os.environ.get('PLEXTOKEN')
env_token = os.environ.get('PLEX_SERVER_TOKEN')

you do

#env_token = os.environ.get('PLEXTOKEN')
env_token = 'YOUR-PLEX-TOKEN'

PS, i dont recommend hardcoding the token into the code, but it's a quick work around until the plugin is updated.

So i tried to hardcode the token, no result at all - it just deletes the Trakt plugin from unofficial appstore

Tried to leave it as is after reinstall - now only movies sync with Trakt - both play status and watched. As for shows - nothing: no playing status, no scrobbling.

The workaround for shows is simple - use original titles. I used translated ones, but it didn't worked for me. And with original titles everything works

The workaround for shows is simple - use original titles. I used translated ones, but it didn't worked for me. And with original titles everything works

I am having this problem also, just suddenly stopped working, getting error message "Plex account is missing the server token". @Gandrushka by original titles, do you mean the English titles? There is an option in the TV Series Agent to choose Original Titles, but this returns movies and shows in their native language (same as your translated above?)?

The workaround for shows is simple - use original titles. I used translated ones, but it didn't worked for me. And with original titles everything works

I am having this problem also, just suddenly stopped working, getting error message "Plex account is missing the server token". @Gandrushka by original titles, do you mean the English titles? There is an option in the TV Series Agent to choose Original Titles, but this returns movies and shows in their native language (same as your translated above?)?

I Don't think @Gandrushka problem is the same as me or you. so you can try the fix i posted it may help.

but this returns movies and shows in their native language

yep, that what i thought for the first time. but then i tried it with "Squid game", episodes and series names changed to Korean and Trakt seems to not see it again.

So my theory about original titles was wrong, now I'm using English for the library language and Trakt works

I was able to do temp fix until there there is an official way.

Open  File "Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/modules/migrations/account.py"

around line 241 look for

env_token = os.environ.get('PLEXTOKEN')

Change the line to

#env_token = os.environ.get('PLEXTOKEN')
env_token = os.environ.get('PLEX_SERVER_TOKEN')

Add

PLEX_SERVER_TOKEN=YOUR_PLEX_TOKEN 

in your docker-compose.yaml

save than restart plex container. 

For some reason Plex is not giving the correct token in "PLEXTOKEN" ENV it was giving something like local-GUID token which is failing to authenticate against the API.

after doing this fix, i was able to to both push and pull updates.

I suspect that this was introduced in Plex version: 1.24.4.5081 - as following me updating to this version this morning on my Windows machine I ran into the same issue as described.
I've done a search through all the Plex files and there doesn't seem to be anywhere in plain text they set that variable (they read from it a few times), they must be assigning it at runtime from a compiled file.

Can confirm that changing the environment variable check in the plugin resolved this for me too

I'm running 5081 beta also on my test/backup server where this is happening (i pull watched statuses from my prod server which is pushing statuses fine on 5033).
I put the plex token in /etc/systemd/system/plexmediaserver.service.d/override.conf as
Environment="PLEXTOKEN=<token>"
and that allowed me to do a pull ok for now. I just run the .deb version

I was able to do temp fix until there there is an official way.

Open  File "Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/modules/migrations/account.py"

around line 241 look for

env_token = os.environ.get('PLEXTOKEN')

Change the line to

#env_token = os.environ.get('PLEXTOKEN')
env_token = os.environ.get('PLEX_SERVER_TOKEN')

Add

PLEX_SERVER_TOKEN=YOUR_PLEX_TOKEN 

in your docker-compose.yaml

save than restart plex container. 

For some reason Plex is not giving the correct token in "PLEXTOKEN" ENV it was giving something like local-GUID token which is failing to authenticate against the API.

after doing this fix, i was able to to both push and pull updates.

Great fix, thx !

The workaround for shows is simple - use original titles. I used translated ones, but it didn't worked for me. And with original titles everything works

I am having this problem also, just suddenly stopped working, getting error message "Plex account is missing the server token". @Gandrushka by original titles, do you mean the English titles? There is an option in the TV Series Agent to choose Original Titles, but this returns movies and shows in their native language (same as your translated above?)?

I Don't think @Gandrushka problem is the same as me or you. so you can try the fix i posted it may help.

Thanks, this fix works! Hope the plugin will be updated soon.

Cheers, changing the environment variable and line in the code worked on Windows PMS setup.

Can someone confirm exactly which features are broken with this change? The devs have indicated that this was intentional and the token now being exposed is valid, it just can't be used via the API that is being leveraged by the plugin (have to use PMS API directly instead).

I seem to still be able to scrobble and push playback progress fine. So is the issue pulling data? Doing full syncs? Lists or collections?

@rg9400 for me it was completly broken. Nothing worked. No scrobble, collection (push), ratings (pull, push), watch status (pull, push).

Setting the ENV solve all this.

@rg9400 for me it was completly broken. Nothing worked. No scrobble, collection (push), ratings (pull, push), watch status (pull, push).

Setting the ENV solve all this.

likewise the plugin was completely broken with the messages i attached. for some weird reason sometimes it works for few days then it would stop working and give this random local-guid token with ofc cant cant be used with plex api for some reason.

I'm seeing the same error in the logs ("Plex account is missing the server token"), but automatic syncing and scrobbling still seem to be working fine. The only reason I realised there was a problem was because I tried to access the plugin via Kitana to do a manual sync.

Can someone confirm exactly which features are broken with this change? The devs have indicated that this was intentional and the token now being exposed is valid, it just can't be used via the API that is being leveraged by the plugin (have to use PMS API directly instead).

I seem to still be able to scrobble and push playback progress fine. So is the issue pulling data? Doing full syncs? Lists or collections?

It seems like even though there is an error its works until you prob install new version or something. Mine was working with error until an update. Hard coding the plex token worked.

yeah mine broke today as well. But now here's the issue. Using the PMS API is not a small change AFAIK, and grabbing the token in some other automated fashion also looks like it will be complicated. Anyone have any ideas for a proper fix? Because it's beyond me. This method works but is not ideal.

yeah mine broke today as well. But now here's the issue. Using the PMS API is not a small change AFAIK, and grabbing the token in some other automated fashion also looks like it will be complicated. Anyone have any ideas for a proper fix? Because it's beyond me. This method works but is not ideal.

Honestly, if possible just add a new field in settings for plex token and continue as usual. until you feel like rewriting the plugin to use the PMS API.

Perhaps someone could explain how to get the plex token? I found two methods on the Plex website: one (https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/) is by reading the xml of a library item, but this page says the token is "valid temporarily," and presumably we need one that is valid permanently. The other (https://forums.plex.tv/t/authenticating-with-plex/609370) is a complicated explanation of how a 3rd party app (or presumably a plugin such as this one) could get the token, but this doesn't seem to be a method that an end user can easily use.

For me personally, removing all authetification from the first account/home user in the plugin configuration, and then adding the previously used plex and trakt auth to a new user is currently a good workaround. It's not pretty, but it works so far.

So far I have only had issues on the first (undeletable) user, all my home users have had absolutley no syncing issues over the past few months, as it turns out. So just do not use the default plugin user at all to avoid errors I would say.

For me personally, removing all authetification from the first account/home user in the plugin configuration, and then adding the previously used plex and trakt auth to a new user is currently a good workaround. It's not pretty, but it works so far.

How do I do that? I only have one user; I tried adding another, but I couldn't see any options in the plugin configuration to set different details for a different user, and when I switched to the new user I couldn't access the plugin configuration settings at all.

For me personally, removing all authetification from the first account/home user in the plugin configuration, and then adding the previously used plex and trakt auth to a new user is currently a good workaround. It's not pretty, but it works so far.

How do I do that? I only have one user; I tried adding another, but I couldn't see any options in the plugin configuration to set different details for a different user, and when I switched to the new user I couldn't access the plugin configuration settings at all.

You need to set the mapping first, so that each user will be mapped to their corresponding Trakt account:
https://github.com/trakt/Plex-Trakt-Scrobbler/wiki/FAQ---Scrobbling

Configuration does not happen inside of Plex Plugins for other users (only the main, undeletable one, which has always been buggy) you have to do it in the Configuration of the Plugin under "Accounts".

In the absence of a step-by-step guide, I think I'd better leave well alone for now and hope the plugin gets updated with a fix for this issue before it stops working entirely for me. Absolutely no idea what I'm supposed to be doing on that configuration page.

Perhaps someone could explain how to get the plex token? I found two methods on the Plex website: one (https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/) is by reading the xml of a library item, but this page says the token is "valid temporarily," and presumably we need one that is valid permanently. The other (https://forums.plex.tv/t/authenticating-with-plex/609370) is a complicated explanation of how a 3rd party app (or presumably a plugin such as this one) could get the token, but this doesn't seem to be a method that an end user can easily use.

I didn't notice the plex token changing, unless i disclaim the server and re-claim it. so you can follow the steps i posted to fix it even if plex token is temporary.

For me personally, removing all authetification from the first account/home user in the plugin configuration, and then adding the previously used plex and trakt auth to a new user is currently a good workaround. It's not pretty, but it works so far.

So far I have only had issues on the first (undeletable) user, all my home users have had absolutley no syncing issues over the past few months, as it turns out. So just do not use the default plugin user at all to avoid errors I would say.

Think I understood about creating a second user and using that over the default..

Just clarify, after doing this, does the settings in the plex app still need to have a pin set?

I tried the hardcoding the key but that just caused the plugin to not show in settings or Kitana so I undid that.
Going here and disconnecting and reconnecting Plex has everything working again for me.

Going here and disconnecting and reconnecting Plex has everything working again for me.

This is what worked for me as well.

Edit: Though it doesn't seem to be a long term fix, just temporary as it seems to eventually throw the Error Plex account is missing the server token error again.

Change the line to

#env_token = os.environ.get('PLEXTOKEN')
env_token = os.environ.get('PLEX_SERVER_TOKEN')

Add

PLEX_SERVER_TOKEN=YOUR_PLEX_TOKEN

in your docker-compose.yaml

save than restart plex container.

hi I have been looking for a fix for a few days now and came across this, PLEX will send what I have watched to Trakt.tv, I had manually marked a show as watched but it never pulled the status from trakt, I also noticed it was not adding new shows to collected.

I then found about kitana.bas.sh logged in and found the error message, which leads me here, my plex server runs on unraid I have found the account.py file and where to edit it, but where abouts do I find the second part to edit/add? do i add a new path/variable to the container, any help would be appreciated, and I'm guessing 'your_plex_token' is actually meant to be replaced with my token

Change the line to

#env_token = os.environ.get('PLEXTOKEN')

env_token = os.environ.get('PLEX_SERVER_TOKEN')

Add

PLEX_SERVER_TOKEN=YOUR_PLEX_TOKEN

in your docker-compose.yaml

save than restart plex container.

hi I have been looking for a fix for a few days now and came across this, PLEX will send what I have watched to Trakt.tv, I had manually marked a show as watched but it never pulled the status from trakt, I also noticed it was not adding new shows to collected.

I then found about kitana.bas.sh logged in and found the error message, which leads me here, my plex server runs on unraid I have found the account.py file and where to edit it, but where abouts do I find the second part to edit/add? do i add a new path/variable to the container, any help would be appreciated, and I'm guessing 'your_plex_token' is actually meant to be replaced with my token

Sorry I'm not familiar with unraid, i assume it has a page where you can add environment variables to a container. if not you can hardcode the token directly into the file.

all good i have it up and running again, thanks for the info

for anyone else that comes looking, in unraid web gui >docker tab > click your plex container name> at the bottom of the plex config page click +add another path, variable, port...., in the pop up change drop down to variable, paste PLEX_SERVER_TOKEN in to key field and your token into the value field , then click ADD when the pop up closes click APPLY let it rebuild and all good. just don't forget to modify the account.py file :)

I just motive that i'm getting the issue but in my case Plex is running as a Synology package so I can't just add the variable like on docker.

Any idea on how to add the token into the plugin? even if it's harcoded?

Thanks

I just motive that i'm getting the issue but in my case Plex is running as a Synology package so I can't just add the variable like on docker.

Any idea on how to add the token into the plugin? even if it's harcoded?

Thanks

It's exactly the same, the files located in the Plex shared folder. Open File station and go to "Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/modules/migrations/account.py"

around line 241 look for

env_token = os.environ.get('PLEXTOKEN')

Change the line to

#env_token = os.environ.get('PLEXTOKEN')
env_token = 'PLEX_SERVER_TOKEN'

And restart plex.

Alternatively you could use this and log in to plex which refreshes the token; https://trakt-for-plex.github.io/configuration/#/login

where can i find my, 'PLEX_SERVER_TOKEN'? is it the same as the, 'X-Plex-Token' in the media XML files?

where can i find my, 'PLEX_SERVER_TOKEN'? is it the same as the, 'X-Plex-Token' in the media XML files?

Yes it is.

https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

I Update 2nd post to include most asked information, please refers to it until the maintainer fixes this issue.

#611 (comment)

For some reason this doesn't work for me. I tried the system variable route and now the hardcoded route, but trakt keeps complaining in logs about missing the server token when I initiate a sync from Kitana after restarting Plex:
200 GET /video/trakt/sync?account_id=1&title=Error&message_only=True&message=Plex+account+is+missing+the+server+token (127.0.0.1) 7.35ms

I changed the specified account.py as follows:
image

What am I missing?

What am I missing?

Wrong indentation. The commented out line below # Environment token should start at the same level. Also beware of your editor, it might be using spaces or tabs for indentation. You must use the same that account.py uses.

What am I missing?

Wrong indentation. The commented out line below # Environment token should start at the same level. Also beware of your editor, it might be using spaces or tabs for indentation. You must use the same that account.py uses.

I wasn't aware python was so particular about indentation. Replacing the tabs I used, for spaces which are used in account.py and adding a space before the commented out line seems to have fixed it.

Thanks.

Ive replaced the token, and also tried by adding a second account under http://trakt-for-plex.github.io/configuration/#/configuration/accounts, this makes the scrobbler function work, but I'm unable to sync watched status.
Does anyway expire the same issue? In the logs I can see it downloads my trakt history etc, but it doesn't work.
Is it related to the new plex scanner/agents?

Ive replaced the token, and also tried by adding a second account under http://trakt-for-plex.github.io/configuration/#/configuration/accounts, this makes the scrobbler function work, but I'm unable to sync watched status. Does anyway expire the same issue? In the logs I can see it downloads my trakt history etc, but it doesn't work. Is it related to the new plex scanner/agents?

not sure this is related to the issue we are facing, you may want to use kitana to force overall push
https://github.com/pannal/Kitana

Waiting for an update on the plugin to fix the issue? Or waiting for the plex new update to resolve that?
what can i do now?

Waiting for an update on the plugin to fix the issue? Or waiting for the plex new update to resolve that? what can i do now?

from what @rg9400 said i don't think plex intend to fix this problem, and the maintainer has to update the plugin to work with the new API. and it's difficult to do so, so my suggestion still stands adding a new config field for X-Plex-Token in the plugin config until such time the maintainer has time to upgrade to the new API.

As for what you can do right now, you can temporality get the plugin to work using the methods i posted in comment-#2

an3k commented

#611 (comment) Didn't solved the issue for me. Tried it with both options.

Whenever I authenticate my Plex account at https://trakt-for-plex.github.io/configuration/#/configuration/accounts the little gray icon turned green. This doesn't happen anymore. I tried a lot here and there and in the end I thought about removing the authentication for my trakt account. I did so and after trying to re-authenticate the trakt account the icon for this doesn't turn green either.

I removed the whole thing, installed it again and without any modification it works again.

an3k commented

Celebrated too early. I get no error message but success messages, however there is no syncing done, neither my collection gets updates nor ratings and scrobbling doesn't work too.

fent commented

for me, since I'm using unraid, I needed to add the plex token to the container env as well

I was able to get new items I watch on plex to be marked at trakt.tv but I can't pull down all my watched status from trakt.tv, any thoughts on how to force the pull or to sync from them?

I was able to get new items I watch on plex to be marked at trakt.tv but I can't pull down all my watched status from trakt.tv, any thoughts on how to force the pull or to sync from them?

it wont pull old items you have to use kitana to force pull and push.

I was able to get new items I watch on plex to be marked at trakt.tv but I can't pull down all my watched status from trakt.tv, any thoughts on how to force the pull or to sync from them?

it wont pull old items you have to use kitana to force pull and push.

thanks for the note!
I took a look at this https://github.com/pannal/Kitana - is that the kitana you are talking about?

I was able to get new items I watch on plex to be marked at trakt.tv but I can't pull down all my watched status from trakt.tv, any thoughts on how to force the pull or to sync from them?

it wont pull old items you have to use kitana to force pull and push.

thanks for the note!

I took a look at this https://github.com/pannal/Kitana - is that the kitana you are talking about?

Yes it would expose your plugin hidden interface where you can do lots of things.

I was able to get new items I watch on plex to be marked at trakt.tv but I can't pull down all my watched status from trakt.tv, any thoughts on how to force the pull or to sync from them?

it wont pull old items you have to use kitana to force pull and push.

thanks for the note!
I took a look at this https://github.com/pannal/Kitana - is that the kitana you are talking about?

Yes it would expose your plugin hidden interface where you can do lots of things.

Worked perfectly!!! thanks so much!

Trakt syncing broke for my first/primary Plex user as well. Checked and noticed that it had lost authentication to Plex (no green check mark). I authenticated again but it would eventually lose it again specially after a Plex restart. Did Method #2 and so far still working even after multiple Plex restarts.

Just wondering if the Plex token expires (how long if ever) and if I have to constantly check if authentication is lost and update the env variable in plex docker container. Either way, great job and thank you very much!

I was able to get new items I watch on plex to be marked at trakt.tv but I can't pull down all my watched status from trakt.tv, any thoughts on how to force the pull or to sync from them?

it wont pull old items you have to use kitana to force pull and push.

thanks for the note!
I took a look at this https://github.com/pannal/Kitana - is that the kitana you are talking about?

Yes it would expose your plugin hidden interface where you can do lots of things.

Worked perfectly!!! thanks so much!

@blindguy Glad to hear it works for you mate.

Trakt syncing broke for my first/primary Plex user as well. Checked and noticed that it had lost authentication to Plex (no green check mark). I authenticated again but it would eventually lose it again specially after a Plex restart. Did Method #2 and so far still working even after multiple Plex restarts.

Just wondering if the Plex token expires (how long if ever) and if I have to constantly check if authentication is lost and update the env variable in plex docker container. Either way, great job and thank you very much!

@paul-michael As far as i know, the token only expires if you re-add the server or add new one, i only had to change it once when i re-claimed the server in top post.

@arabcoders The token is temporary: https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

In the end you have to be aware of whether the token changes or not to edit the py file or the environment variable.
A bit cumbersome, some tokens have lasted me only 3 days.

BTW: Thanks you!

I've just been using https://trakt-for-plex.github.io/configuration/#/configuration/accounts to re-authenticate Plex when necessary. I don't know whether hardcoding the token lasts any longer than that, but it's a lot easier to re-authenticate on a web page than to find the token in an xml file and copy it into account.py (or into an environment variable) every time it changes.

@jasimancas

@arabcoders The token is temporary: https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

In the end you have to be aware of whether the token changes or not to edit the py file or the environment variable. A bit cumbersome, some tokens have lasted me only 3 days.

BTW: Thanks you!

@olliebean

I've just been using https://trakt-for-plex.github.io/configuration/#/configuration/accounts to re-authenticate Plex when necessary. I don't know whether hardcoding the token lasts any longer than that, but it's a lot easier to re-authenticate on a web page than to find the token in an xml file and copy it into account.py (or into an environment variable) every time it changes.

I'm not sure what are you guys doing to force X-Plex-Token regeneration, since i posted this issue, i haven't had token change ever. and before this issue for almost an entire year or maybe more it didn't change. the one time i had it changed is when i disclaimed the server and re-added it again. Something is up with your setups.

I have added my token to the file again, let's see if I solve the problem.

News, the token has changed again, but it is not only that, but from the PC gives me a token, from the mobile another different token in the same XML in the same pelicular, at the same time, and in the Tablet another different one, so I have 3 tokens at the same time, which makes that the one I add in the .py is not worth anything, in fact, I add it and just a couple of hours later I get the error in Kitana.

Any idea @arabcoders?

News, the token has changed again, but it is not only that, but from the PC gives me a token, from the mobile another different token in the same XML in the same pelicular, at the same time, and in the Tablet another different one, so I have 3 tokens at the same time, which makes that the one I add in the .py is not worth anything, in fact, I add it and just a couple of hours later I get the error in Kitana.

Any idea @arabcoders?

@jasimancas Hmmm, i honestly don't know why the token keep changing for you, my setup is quite simple for plex being reverse proxied via Nginx. all my clients be it phone, tablets, tabletop devices and PC all share the same token. do you use the same account for all those devices or do you have mutli-account? this maybe why the token keep changing.

Same account for all devices, I always log in with the same one, I have changed password, logged out of all and logged back in and again same problem.

PD: Sorry

Misma cuenta para todos los dispositivos, siempre inicio sesión con la misma, de hecho he cambiado contraseña, cerrado sesión en todos y vuelta a iniciar y de nuevo mismo problema.

@jasimancas i am sorry i don't understand Spanish, going by google translation, it seems you use the same account on all devices thats nice. i think you might have plex misconfigured somewhere. Do you use plex in docker or direct install? make sure the data path is valid and has correct uid:guid

refers to this may help
https://www.reddit.com/r/PleX/comments/4qdjt7/help_plex_media_server_xplex_token_resets_each/

Maybe this?
image

Maybe this? image

thats what the maintainer need to do to permanently fix this problem on new releases. for now your problem feels different.

correct, but it says that each client has its own token, it is just what happens to me, depending on where I log in I get a token, token that I put in the .py, I restart and after a few minutes I get the error again.

I'm not sure what are you guys doing to force X-Plex-Token regeneration, since i posted this issue, i haven't had token change ever. and before this issue for almost an entire year or maybe more it didn't change. the one time i had it changed is when i disclaimed the server and re-added it again. Something is up with your setups.

My token doesn't seem to be changing, but instead of using the token I was using https://trakt-for-plex.github.io/configuration/#/configuration/accounts to re-authenticate, and I found I was having to do it again every time Plex had been restarted. So now I've edited the account.py file - I couldn't get the environment variable to work, so I've hardcoded the token into the file, which seems to be working (https://trakt-for-plex.github.io/configuration/#/configuration/accounts is showing a green tick next to Plex, and syncs in Kitana are working fine with no missing server token error).

fent commented

i haven't refreshed my token since i posted here ~20 days ago, and i'm not using trakt-for-plex

It might have something to do with trakt-for-plex app or something. i think

HI all,

quick question guys, should we wait for the plugin update or is it worth it to do manual changes in order this to work again?

Thank you

HI all,

quick question guys, should we wait for the plugin update or is it worth it to do manual changes in order this to work again?

Thank you

I would do the manual edit and update once the maintainer fixes the issue.

Hi again,

thanks for the reply and I just want to be sure that what I am doing its correct,

I'll have to open the "account.py" file and replace this line,
"env_token = os.environ.get('PLEXTOKEN')"

with those,
#env_token = os.environ.get('PLEXTOKEN')
env_token = 'hX***y_*1'

where 'hX***y_*1' its my PLEX Token and I mean exactly as they look above by your post and changing only the Token, correct?

After that and when I'll watch a TV Show episode it should be sync and cashed when I open the Trekt.Tv at my browser, also correct?

Thank you

Hi again,

thanks for the reply and I just want to be sure that what I am doing its correct,

I'll have to open the "account.py" file and replace this line, "env_token = os.environ.get('PLEXTOKEN')"

with those, #env_token = os.environ.get('PLEXTOKEN') env_token = 'hX***y*1_'

where 'hX***y*1_' its my PLEX Token and I mean exactly as they look above by your post and changing only the Token, correct?

After that and when I'll watch a TV Show episode it should be sync and cashed when I open the Trekt.Tv at my browser, also correct?

Thank you

Correct, you have to follow the steps and be mindful of the whitespace as it's important please refers to this post

#611 (comment)

Hm,

I am not familiar with "whitespace", I hope I've done it well but I will report back anywise to report my outcome!

Thanks

So coming back to report that

I have watched a documentary and it is synchronized and marked as "viewed" at trakt.tv.
At the other hand I watched 3 tv shows/series episodes and none has synch!
I have to tell you that I am using also the new "PLEX Naming and Organizing Your TV Show Files", details here but I assume you already know about it!

Halfway there, can I do something about it?

Thanks

So coming back to report that

I have watched a documentary and it is synchronized and marked as "viewed" at trakt.tv.

At the other hand I watched 3 tv shows/series episodes and none has synch!

I have to tell you that I am using also the new "PLEX Naming and Organizing Your TV Show Files", details here but I assume you already know about it!

Halfway there, can I do something about it?

Thanks

you may have to use kitana to force push the watch state if you watched them and they didn't sync.

and about trakt.tv premium it does not solve the problem as its one-way sync not two-way.

OK,

I understand, I will do the series synch manually from now on till an updated plugin version comes out.
I also have the problem with the smart tv PLEX app which is no longer log in due the server security changes PLEX has applied for the older SAMSUNG smart tv's but that's not worry me at all, synch is my top listed problem.

Thanks for the help, appreciated.

OK,

I understand, I will do the series synch manually from now on till an updated plugin version comes out.

I also have the problem with the smart tv PLEX app which is no longer log in due the server security changes PLEX has applied for the older SMSUNG smart tv's but that's not worry me at all, synch is my top listed problem.

Thanks for the help, appreciated.

No problem. you don't have to manually sync after applying the fix its only for items that was queued to be synced before applying the fix.

And for samsung plex app i think you have to disable ssl in server settings.

Do

you mean that new series episodes at my library will synch, I have just added 2 or 3, I'll report back about that.
About the ssl setting, its not only that as I have read which by the way wasn't active by me, still isn't or other which have the problem since last PLEX version.

Do

you mean that new series episodes at my library will synch, I have just added 2 or 3, I'll report back about that.

About the ssl setting, its not only that as I have read which by the way wasn't active by me, still isn't or other which have the problem since last PLEX version.

the default SSL setting is preferred for Plex server you have to explicitly disable ssl to make old client works.

Where should I change it, at PLEX via the web browser, settings/network, right?
Will that be enough?

Where should I change it, at PLEX via the web browser, settings/network, right?

Will that be enough?

i think so yeah check

https://forums.plex.tv/t/important-information-about-plex-for-smart-tvs-after-september-30-2021/746506

To fix this issue, you just need to use the version in this PR. It's unclear when it will be merged since the maintainers aren't around. It grabs the token automatically from the settings without any further user intervention needed.

#615

Where should I change it, at PLEX via the web browser, settings/network, right?
Will that be enough?

i think so yeah check

https://forums.plex.tv/t/important-information-about-plex-for-smart-tvs-after-september-30-2021/746506

My settings are like those at the post but what is happening, not only be me, is that the app doesnt provide a PIN to link the account.

Check the links,
https://forums.plex.tv/t/plex-tv-link-not-generating-code-on-samsung-smart-tv/763431
https://forums.plex.tv/t/samsung-tv-cannot-connect-to-plex/650100/8

Hello - I was in the process of replacing my trakttv.bundle to fix the TV scrobbling issue referenced here: #596 ; but now i have lost the ability to communicate with the trakt plugin using either Kitana and the web interface (http://trakt-for-plex.github.io/configuration/#/connect). Does anyone know how to fix this using Unraid with Docker (Plex and Kitana are separately installed containers in Docker)?

image

image

Hello - I was in the process of replacing my trakttv.bundle to fix the TV scrobbling issue referenced here: #596 ; but now i have lost the ability to communicate with the trakt plugin using either Kitana and the web interface (http://trakt-for-plex.github.io/configuration/#/connect). Does anyone know how to fix this using Unraid with Docker (Plex and Kitana are separately installed containers in Docker)?

image

image

Hmm I was able to suddenly get access to both kitana and the web interface, without doing any changes (both error messages suddenly went away). But now real-time scrobbling isn't working (no playback progress is showing in the trakt iOS app, which previously used to show when i started watching a movie). Any idea what to do to fix this? I'm using Corningman's fork of Trakt Plugin which allows for scrobbling TV shows correctly.

OK,
I understand, I will do the series synch manually from now on till an updated plugin version comes out.
I also have the problem with the smart tv PLEX app which is no longer log in due the server security changes PLEX has applied for the older SMSUNG smart tv's but that's not worry me at all, synch is my top listed problem.
Thanks for the help, appreciated.

No problem. you don't have to manually sync after applying the fix its only for items that was queued to be synced before applying the fix.

And for samsung plex app i think you have to disable ssl in server settings.

Hi,

You were right, new series episodes addition to the library has ynch, also movies the same, I am happy with that at the time, log in at the PLEX doesnt bothers me at all.

Out of curiosity, why old series episodes at the library will not synch?

Your fix has worked for me 100%, thank you very much.

To fix this issue, you just need to use the version in this PR. It's unclear when it will be merged since the maintainers aren't around. It grabs the token automatically from the settings without any further user intervention needed.

#615

indeed that sounds better fix overall, hope it get merged at some point.

@jeff15110168 sorry i have no idea.

Hi,

You were right, new series episodes addition to the library has ynch, also movies the same, I am happy with that at the time, log in at the PLEX doesnt bothers me at all.

Out of curiosity, why old series episodes at the library will not synch?

Your fix has worked for me 100%, thank you very much.

I think it has something to do with the retry logic in traktv plugin not sure why though, Anyway doing one time manual push from kitana fixes the issue so far. I just hope there will be an alternative selfhosted sync system.

This "kitana" plugin works also for users without subscription?
And if the answer is yes, can we use it together with the plugin from here or it will mesh things up?

Thanks

This "kitana" plugin works also for users without subscription? And if the answer is yes, can we use it together with the plugin from here or it will mesh things up?

Thanks

i am talking about this app https://github.com/pannal/Kitana you can download it and it will expose hidden plugin settings.

Hello - I was in the process of replacing my trakttv.bundle to fix the TV scrobbling issue referenced here: #596 ; but now i have lost the ability to communicate with the trakt plugin using either Kitana and the web interface (http://trakt-for-plex.github.io/configuration/#/connect). Does anyone know how to fix this using Unraid with Docker (Plex and Kitana are separately installed containers in Docker)?
image
image

Hmm I was able to suddenly get access to both kitana and the web interface, without doing any changes (both error messages suddenly went away). But now real-time scrobbling isn't working (no playback progress is showing in the trakt iOS app, which previously used to show when i started watching a movie). Any idea what to do to fix this? I'm using Corningman's fork of Trakt Plugin which allows for scrobbling TV shows correctly.

Just as an update, i installed @Cornishman's latest release mentioned in the other thread #596 (see below) and it fixed all my issues.

@jeff15110168 Try this branch instead, direct zip link. It's a separate branch that includes both my fix from here as well as the PlexOnlineToken fix pending in #615.

Let me know how you get on 👍

i've tried changing account.py file, disconnecting/reconnecting, updating the module, restarting Plex and the config Plex flag wasn't green and the login disappeared after just a page refresh, while plugin log showed error:
Exception raised in sync task: Plex account is missing the server token
......until i pressed SAVE button in the top right of the UI:
https://trakt-for-plex.github.io/configuration
Now i see Trakttv showing me i'm watching something and the flag in the configuration is green. Interestingly, Interval value is consistently not the same as in the plugin setting. Thanks for the advice, I didn't notice as I have this script running each day.

Hi and Happy New Year everyone.

Today I couldn't access my PMS PC Server from my SAMSUNG TV and I was getting very mad!
I have try to remember what I have done the last time that this was occurred, searched around the internet a little, done it also by PLEX Forums to see if anything is going on.

I couldn't find something and I actually didn't changed anything at all form yesterday that it has worked fine, the only difference from the past, far past, is that I wasn't able to login due to the PLEX server security changes that has effect all SAMSUNG and more, SMART TV users with older than 2014, if I am not mistaken, tv models.

Trying to find out what's gong on all guides and posts suggested of course that you have to be logged in in order access and check if everything is OK by the server.

The problem is that I cannot do that as I have described above but still the server was accessible since yesterday for me and others I suppose with older SMART TVs.

Then I have just say why am I not trying to log in by the TV App and BAM access was enabled again, 4 PIN etc worked as it should be and I have access again.

Did they changed anything, I am curious because this problem has effected many users which have older SMART Tvs.
It seems that something like that is going on!

Happy to say https://github.com/Cornishman/Plex-Trakt-Scrobbler fork works like a charm

Thanks All. i added link to the fork in my 2nd Q&A post to hopefully direct people there if they are not too comfortable to manually do the fix. Hopefully the core maintainers will incorporate the changes.

I've reinstalled via the https://github.com/Cornishman/Plex-Trakt-Scrobbler fork. But I'm still getting the server token error. Any ideas @arabcoders?

@adambirds : I've reinstalled via the https://github.com/Cornishman/Plex-Trakt-Scrobbler fork. But I'm still getting the server token error. Any ideas @arabcoders?

Sorry i have no idea why it's not working for you. try doing the manual steps on the original plugin and see if it's works for you. otherwise @Cornishman might have an idea on why it's not working.

@arabcoders it turns out it was due to the fact that the fix isn't merged into master on @Cornishman's fork and instead in a seperate branch which isn't made clear above, but don't see a reason as to why it isn't in master.

@adambirds : @arabcoders it turns out it was due to the fact that the fix isn't merged into master on @Cornishman's fork and instead in a seperate branch which isn't made clear above, but don't see a reason as to why it isn't in master.

Good catch, I'll go ahead and update the link in Q&A post.

Syncing worked great with hardcoding my plex token in account.py until a recent plex server update to 1.26. I tried Cornishman's fork (the separate branch per @adambirds ) and still nothing. Does it matter that plexonlinetoken from windows registry doesn't match my plex token from the XML files? Scrobbling works, just not syncing collections.