croneter / PlexKodiConnect

Plex integration in Kodi done right
GNU General Public License v2.0
1.15k stars 77 forks source link

Vero V: PKC Syncing stops after some time. #2069

Open Dok-Ondar opened 4 months ago

Dok-Ondar commented 4 months ago

kodi1.log

I have a Vero V which runs on OSMC and uses Kodi, and I have a Plex server running in my network. So I wanted to use this server on my Vero V and it did work, until an update of either PKC, Kodi or OSMC. Hard for me to pinpoint the issue, though it doesn't seem to be Plex itself, as my LG TV has the add-on running fine, same goes for using the Web app and Android app. I also have a Vero 4K+, this one always ran fine as well, but is also affected by this.

Normally the auto sync seems to run fine for a while, but after a day (maybe in a shorter time frame), the syncing stops, after a restart of the Vero V, it syncs and works for the same time frame. I suspect this being an issue with PKC, but cannot be sure. At OSMC forums, they do not officially support PKC, so they always refer to PKC support if anyone has issues with PKC.

I have uploaded a log from the Vero V, where the issue did occur. Removed privacy information, like passwords, tokens and Plex username. Plex Server is running on the same Vero V, but as mentioned before, it worked fine until a few weeks ago and runs fine on other apps/devices, but not my other Vero 4K+ (this one isn't always on, so not the best test case).

In line 36319 I see an error in the log in reference to PKC syncing, looks like it has something to do with the Python script or the installation of it perhaps:

2024-04-22 22:42:37.291 T:3387 error : PLEX.utils: Error encountered: sync.py crashed - 'refreshed' 2024-04-22 22:42:37.299 T:3387 error : PLEX.utils: _____ 2024-04-22 22:42:37.299 T:3387 error : PLEX.utils: Traceback (most recent call last): 2024-04-22 22:42:37.299 T:3387 error : PLEX.utils: File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/sync.py", line 125, in run 2024-04-22 22:42:37.299 T:3387 error : PLEX.utils: self._run_internal() 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/sync.py", line 242, in _run_internal 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: library_sync.store_websocket_message(message) 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/websocket.py", line 45, in store_websocket_message 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: store_activity_message(message['ActivityNotification']) 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/websocket.py", line 208, in store_activitymessage 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: elif message['Activity']['Context']['refreshed'] != True: 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: KeyError: 'refreshed' 2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: ____ 2024-04-22 22:42:37.301 T:3387 info : PLEX.sync: ###===--- Sync Thread Stopped ---===### 2024-04-22 22:42:37.301 T:3387 error : Exception in thread

Hope there is a way to solve this, thanks for looking at my issue.

bruin14 commented 4 months ago

Sort of same here. I have 2 kodi devices, one OMSC (Vero) and a RPI with openelec. Both stopped to sync and the only way to recover is to reboot kodi. Did a complete reset of the addon and it still doesn't work. Because both devices have the same problem and i did not update kodi in a while, its likely caused by something in the plexserver. The only thing i can remember i changed at the plex side is that i am using a pincode now and family members added as home users.

Dok-Ondar commented 4 months ago

I didn't change anything, the Plex Server wasn't updated, only PKC and maybe OSMC/Kodi.

After I had this issue, I even completely restored my Vero V to factory defaults, fully, so not lingering configs and started from scratch. Wasn't the solution. Mentioned just for extra info.

croneter commented 4 months ago

You found the culprit, @Dok-Ondar:

2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/websocket.py", line 208, in store_activity_message
2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: elif message['Activity']['Context']['refreshed'] != True:
2024-04-22 22:42:37.300 T:3387 error : PLEX.utils: KeyError: 'refreshed'

Update to the latest PKC beta 3.9.3 and that issue should be fixed! HOWEVER, be aware that e.g. this issue is not fixed yet: https://github.com/croneter/PlexKodiConnect/issues/2068 so you might wanna wait.

Dok-Ondar commented 4 months ago

Very nice, thanks for a quick fix on this! Will test and report back.

croneter commented 4 months ago

@Dok-Ondar you need to install the BETA repository, then from that repository, choose to install PKC again

Dok-Ondar commented 4 months ago

Yeah, found it after I posted the question and deleted the post, will report back, should be able to tomorrow.

Dok-Ondar commented 4 months ago

Tested and working great! Any idea when this will be released in a final build? @croneter

Thanks again!