trakt / Plex-Trakt-Scrobbler

Add what you are watching on Plex to trakt.tv
1.44k stars 167 forks source link

Plugin Stopped working: Added Log: Error 196 and Critical 1299 #626

Open BourgeoisDirk opened 2 years ago

BourgeoisDirk commented 2 years ago

After updating the Plex app on my Synology, the Trakt Plugin stopped working. I've tried uninstalling/reinstalling & authenticating it, but for reasons not known to me, it just wont work anymore. How do I go about figuring out whats wrong and how to fix it ?

BourgeoisDirk commented 2 years ago

Tried re-installing, Log shows a bunch of Errors. But I don't quite know what's wrong. com.plexapp.plugins.trakttv.log

ghost commented 2 years ago

Yeah I too am having similar experience since updating to newest Synology firmware. Strange. None of my movies or shows have been syncing back to Trakt and I've tried all the same things as you (that would usually get it syncing again).

BourgeoisDirk commented 2 years ago

Yeah I too am having similar experience since updating to newest Synology firmware. Strange. None of my movies or shows have been syncing back to Trakt and I've tried all the same things as you (that would usually get it syncing again).

Can you add your Log as well ? Shouldn't be hard to find. (/PlexMediaServer/AppData/Plex Media Server/Logs/PMS Plugin Logs/*trakttv.log) Perhaps someone with more knowledge of these things can Analyse the Log and Suggest a solution.

ghost commented 2 years ago

Are you using cornishman's version of this plugin by any chance? And applied any of the fixes?

ghost commented 2 years ago

I'm using Cornishman version and applied all other fixes. Seems all I had to do was apply #622 since updating my NAS and it fixed my issue.

BourgeoisDirk commented 2 years ago

This did not fix the problem for me, I have no DateTimeField Error message within my Log. The problem appears to be a different one. Something in the likes of:

2022-06-28 07:58:45,027 (7f533d877808) : ERROR (networking:196) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes' 2022-06-28 07:58:45,030 (7f533d877808) : CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last):

ghost commented 2 years ago

You appear to have missed the rest of my question. You just might not have that error "yet". There are more fixes than just #622 - Also, are you using Cornishman's version?

BourgeoisDirk commented 2 years ago

Yes, I am using that one, installed through WebTools. So far I am not aware of any other fixes concerning the Error I am experiencing.

ghost commented 2 years ago

I went a bit guns blazing and applied all fixes without checking the logs. Only time I checked the log was when I found I needed to apply #622

The only difference I can think between our versions is that I've applied a few of the pull requests that Cornishman's version hadn't applied - its the only difference between your version and mine that I can think of, but I can't specify what fix might fix yours... no harm in trying to apply them all and see what happens - also don't forget to do a metadata refresh on your libraries

Also, maybe try manual install rather than webtools install? shrug I did a manual install.

BourgeoisDirk commented 2 years ago

Well, apparently I was using the regular Plugin. I downloaded the latest Cornishman Plugin source, stopped the Plex Service, uploaded the Trakttb.bundle and restarted Plex Service, then re-authenticated the Plugin with Trakt.

Unfortunately with the same result: com.plexapp.plugins.trakttv - 20220630.log

BourgeoisDirk commented 2 years ago

Deleted the trakttv.bundle and webtools.bundle, cleaned, reinstalled again using Webtools Plugin (the normal Plugin, not the Cornishman's). Re-authenticated again, the same error keeps popping up in my Logs:

2022-07-01 08:50:03,004 (7f7d20dea808) : ERROR (networking:196) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes' 2022-07-01 08:50:03,007 (7f7d20dea808) : CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last): File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-6b0e31a64/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1293, in get_resource_hashes json = self._core.networking.http_request("http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes", timeout=10).content File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-6b0e31a64/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 242, in content return self.__str__() File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-6b0e31a64/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 220, in __str__ self.load() File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-6b0e31a64/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 158, in load f = self._opener.open(req, timeout=self._timeout) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 435, in open response = meth(req, response) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 473, in error return self._call_chain(*args) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 407, in _call_chain result = func(*args) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found

BourgeoisDirk commented 1 year ago

Well, i tried the Cornishmans plugin with it's latest build, tried to apply 622 but to no change, it didn't work.

Also, i prefer using this standard plugin (on which's support page we are ...).. I noticed that it is Scrobbling Movies, and is hit-or-mis with scrobbling episodes.. Still on each boot of the Server, i find the ERROR (networking:196) and CRITICAL (runtime:1299) in the trakt.log

Finding out why these error's occur and what they mean would be nice.

BourgeoisDirk commented 1 year ago

Anyone got any news this issue on or insight on the Log Results ? It's still a mostly Miss, sometimes Hit with scrobbling.. Mostly nothing on trakt gets marked.. Occasionally, when I now manually open trakt to mark something as seen, theres a 20% chance it's already marked by this plugin.

Can anyone shed light on why the plugin isn't working correctly. I've tried removing it, and all traces of it, reinstalling it.. same problem, same error codes in the log. I can't make sense of it, and would really like to get this working again.

ghost commented 1 year ago

Have tried offering assistance. Have tried advising of steps to take.

Something tells me you havent applied all the fixes I mentioned. Some require you to make some changes yourself to some files. There is MORE than just applying Cornishman files - there are other fixes that have not been pushed to live versions so you must go to the links I've provided and apply them yourself.

Trust me, I have installed this on more than one NAS and applied the fixes I mention and it works. So all I can say is, if it's not working for you - you are missing something.

https://github.com/trakt/Plex-Trakt-Scrobbler/issues/622 https://github.com/trakt/Plex-Trakt-Scrobbler/pull/616

Can try this too

https://github.com/Cornishman/Plex-Trakt-Scrobbler/tree/scrobble_fix_with_PlexOnlineToken_fix

BourgeoisDirk commented 1 year ago

Well, i tried the Cornishmans plugin with it's latest build, tried to apply 622 but to no change, it didn't work.

As i stated last time, I followed your previous Instructions, I removed the standard plugin, installed Cornishmans plugin and applied the Fix 622 you suggested, to no avail. When this failed, i reverted to the standard Plugin. Stating that it's still stuck on the same Error.

This is your first mention of issue #616, so I have once again tried applying your advice. Stopped Plex Service, Removed the standard trakt scrobbler, downloaded Cornishmans plugin, applied changes 622 and 616 to the files, and copied it over to the Plugins folder, restarted the Plex Service. Unfortunately, it doesn't show up in Plex under Plugins.

It did poop out 2 errors into the Log though, so possibly i missed something ?

First `2023-01-25 21:29:56,228 (7ff4c56b7808) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes' 2023-01-25 21:29:56,377 (7ff4c56b7808) : ERROR (networking:196) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes' 2023-01-25 21:29:56,381 (7ff4c56b7808) : CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last): File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1293, in get_resource_hashes json = self._core.networking.http_request("http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes", timeout=10).content File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 242, in content return self.str() File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 220, in str self.load() File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 158, in load f = self._opener.open(req, timeout=self._timeout) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 435, in open response = meth(req, response) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 473, in error return self._call_chain(args) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 407, in _call_chain result = func(args) File "/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found

2023-01-25 21:29:56,397 (7ff4c22e1b38) : DEBUG (services:265) - Plug-in is not daemonized - loading services from system`

Second 2023-01-25 21:11:55,381 - com.plexapp.plugins.trakttv (7fd702256808) : CRITICAL (com.plexapp.plugins.trakttv:615) - Exception starting plug-in (most recent call last): File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", line 608, in start self.sandbox.execute(self.init_code) File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 256, in execute exec(code) in self.environment File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/__init__.py", line 62, in <module> import interface File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 333, in __import__ return mod.load_module(_name) File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 44, in load_module module = RestrictedModule(name, path, sandbox) File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/loader.py", line 30, in __init__ exec(code) in self.__dict__ File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/interface/__init__.py", line 4, in <module> import m_sync File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 333, in __import__ return mod.load_module(_name) File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 44, in load_module module = RestrictedModule(name, path, sandbox) File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/loader.py", line 30, in __init__ exec(code) in self.__dict__ File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Code/interface/m_sync.py", line 11, in <module> from plugin.sync.main import Sync, QueueError File "/volume1/@appstore/PlexMediaServer/Resources/Plug-ins-629d58034/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 345, in __import__ raise e File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plex_database/library.py", line 186 if isinstance(value, int): ^ IndentationError: unindent does not match any outer indentation level

Fixed the second one, was indeed an indentation error. It now is showing up in Plugins, Linked it with Trakt

Does not seem to be scrobbling though, can mark as seen = doesn't update Trakt Can add a movie seen on trakt, doesn't mark it in plex. First Error does seem to keep popping up though, don't know what that's about. Unsure as to why it isn't working..

BourgeoisDirk commented 1 year ago

Errors popping up in the Log when watching a series today, not being pushed through to Trakt

023-01-27 13:22:52,164 - plugin.managers.action (7fd46d13ab38) : ERROR (plugin.managers.action:161) - Unable to send action u'scrobble/start': ConnectionError(MaxRetryError('HTTPSConnectionPool(host=\'api.trakt.tv\', port=443): Max retries exceeded with url: /scrobble/start (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'api.trakt.tv\', port=443): Read timed out. (read timeout=24)"))'),) Traceback (most recent call last): File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/action.py", line 159, in process result = cls.send(action, Trakt[interface][method], request) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/action.py", line 222, in send return func(**request) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 36, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 20, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/scrobble.py", line 233, in start **kwargs File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 36, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 20, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/scrobble.py", line 128, in action 'validate_token' File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 152, in post return self.request('POST', path, params, data, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 107, in request return self.send(prepared) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 125, in send response = self.session.send(request, timeout=timeout) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/requests/adapters.py", line 487, in send raise ConnectionError(e, request=request) ConnectionError: MaxRetryError: HTTPSConnectionPool(host='api.trakt.tv', port=443): Max retries exceeded with url: /scrobble/start (Caused by ReadTimeoutError("HTTPSConnectionPool(host='api.trakt.tv', port=443): Read timed out. (read timeout=24)"))

2023-01-27 13:48:23,451 - plugin.managers.action (7fd46d13ab38) : ERROR (plugin.managers.action:161) - Unable to send action u'scrobble/stop': ConnectionError(MaxRetryError('HTTPSConnectionPool(host=\'api.trakt.tv\', port=443): Max retries exceeded with url: /scrobble/stop (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'api.trakt.tv\', port=443): Read timed out. (read timeout=24)"))'),) Traceback (most recent call last): File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/action.py", line 159, in process result = cls.send(action, Trakt[interface][method], request) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/action.py", line 222, in send return func(**request) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 36, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 20, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/scrobble.py", line 440, in stop **kwargs File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 36, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 20, in wrap return func(*args, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/scrobble.py", line 128, in action 'validate_token' File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 152, in post return self.request('POST', path, params, data, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 107, in request return self.send(prepared) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 125, in send response = self.session.send(request, timeout=timeout) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/requests/adapters.py", line 487, in send raise ConnectionError(e, request=request) ConnectionError: MaxRetryError: HTTPSConnectionPool(host='api.trakt.tv', port=443): Max retries exceeded with url: /scrobble/stop (Caused by ReadTimeoutError("HTTPSConnectionPool(host='api.trakt.tv', port=443): Read timed out. (read timeout=24)"))

ghost commented 1 year ago

Doesn't seem like you've tried to troubleshoot much. I see you've developed and submitted things on github so you aren't that clueless.

As the previous person has mentioned, there are fixes you clearly are not implementing. You're working off base files and you have not tried implementing any fixes that have not yet been committed.

https://github.com/trakt/Plex-Trakt-Scrobbler/compare/master...Cornishman:Plex-Trakt-Scrobbler:master

Go here, follow through the commits. Check through issues on both this git and cornish git and start fixing your files.

https://github.com/trakt/Plex-Trakt-Scrobbler/issues

As you've discovered, this plugin isn't really maintained anymore so fixes are posted but not committed. Read through posts etc, apply fixes whether you think they're for you or not.

Good luck.

BourgeoisDirk commented 1 year ago

I don't know how any of this works m8.. all I can do is google or ask for help. Google didn't get it fixed, so I'm asking for help. I have gone over each and every change that you linked to, each and every one of them is already applied my friend, like @ghost pointed to with issue #616. So, no, I'm not working off base files, I downloaded and applied all of the edited files (uncommitted changes). So i should be up to date, right ? This has been deployed to the Server. Yet it doesn't seem to be working, I keep getting the noted errors in my Logs, and don't know what problem they are indicating. I am comparing the files noted in the Logs to the ones from Cornishman's, but am not finding any discrepancies. Very much appreciate your help ! Unfortunately, I really have no clue to what's wrong ...

Perhaps you can point me to my mistake ? I've zipped and shared the bundle: Google Drive Shared Link

BourgeoisDirk commented 1 year ago

Or, since you seem to have a working Trakt.bundle, would you be willing to share your package ?