PlexKodiConnect icon indicating copy to clipboard operation
PlexKodiConnect copied to clipboard

Up to 30 minutes delay when entering settings after hitting OK or even Cancel

Open JCalvi opened this issue 2 years ago • 8 comments

I am experiencing a very long delay (~27minutes) after entering the PKC Settings and then selecting OK or Cancel. Manual Update of Library also seems to take a similar time. Wiping the database and restarting PKC only takes about 3 minutes to import everything so its not related to large library or anything.

I have added a log here showing loading Kodi v20 Nexus and then opening PKC settings and then hitting OK.

This also happened with v19.5 and I am not sure when it started as I had no need to enter settings until my recent upgrade to Nexus. I suspect some update of PKC started it happening.

I made a complete KODI copy on a different machine (pointing to same Plex library) and the issue is replicated on the new machine. I also have wiped the myvideos.db, mymusic.db and plex.db databases and reloaded Kodi. The data gets reloaded in about 3 minutes and everything works fine. Just the settings and manual library update cause massive delays - spinning Kodi circle. It eventually clears about 30mins later if left unattended.

Let me know if I can do further troubleshooting?

JCalvi avatar Jan 24 '23 00:01 JCalvi

Definitely a Kodi bug 😞.

Try deleting settings.xml in the user data folder, addon-data/plugin.video.plexkodiconnect. This will completely wipe the PKC settings

croneter avatar Jan 24 '23 04:01 croneter

Tried this on the duplicate test system. As you said all settings wiped, had to reconnect to Plex, new token etc. After this and all media had synced across I entered settings and hit OK. Some 30 minutes later it finally stopped the spinning circle.

	Line 19784: 2023-01-24 18:10:31.483 T:20892   error <general>: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.plexkodiconnect/?mode=settings
	Line 19785: 2023-01-24 18:10:31.486 T:11292   error <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.plexkodiconnect/?mode=settings) failed

Is logged at the point that it stops.

Sometimes if the Plex server is offline is stops much quicker < 30s or so but not always. Also sometimes if the server is on leaving settings is instant - but very rarely - 1 in 10 times at best.

JCalvi avatar Jan 24 '23 07:01 JCalvi

Please: Enable Kodi debug logging. Restart Kodi. Try to reproduce the issue - and only the issue. Share you log file here (redact your Plex tokens please).

croneter avatar Jan 24 '23 18:01 croneter

Ok, opened Kodi, Set Debug. Closed Kodi, Reopoened Kodi and opened PKC settings then hit OK. It was instant the first time, then ~ 20-30mins the second time. https://paste.kodi.tv/ramezitexu.kodi Debug log should contain both executions of settings. I have redacted tokens, names and some irrelevant weather lines etc from the log. Let me know if you find anything useful or what else I can try.

Thanks

JCalvi avatar Jan 25 '23 03:01 JCalvi

I tried a fresh install today. Just installed Nexus, PKC and pointed to my PMS and issue happened immediately.

I am on Windows 11 on both machines, latest 22H2. I also tried PKC 3.7.0 beta, no difference.

JCalvi avatar Jan 26 '23 07:01 JCalvi

Tried same copy of install on another machine with Windows 10. Same result here as well, long delay after leaving settings.

JCalvi avatar Jan 27 '23 03:01 JCalvi

OK, so another weird thing to narrow it down some more. This delay only happens when I enter the settings from pinning PlexKodiConnect to Favourites. If I enter the settings via addons then it works instantly, OK, Cancel etc. If I enter the settings via a pinned to favourites then the delay occurs. I tried removing and readding the favourite but the behaviour remains. Because it happens even on new setups you should be able to reproduce I think. JC.

JCalvi avatar Feb 11 '23 02:02 JCalvi

I seem to experience the same issue on a fresh install of Coreelec.

nilsher avatar Jul 31 '23 05:07 nilsher