TechieGuy12 / PlexServerAutoUpdater

Automatically update Plex when running the Plex service.
MIT License
118 stars 10 forks source link

Updater shows old version instead of new version #19

Closed Rouzax closed 5 years ago

Rouzax commented 6 years ago

When I launch the latest version of the app I get an older available version than that there really is. image

TechieGuy12 commented 6 years ago

Can you send me the %temp%\plex-updater.txt file?

Rouzax commented 6 years ago
2018-05-10 18:21:55 Getting windows user.
2018-05-10 18:21:56 Checking if user is an administrator.
2018-05-10 18:21:56 Initializing the update window.
2018-05-10 18:21:56 Initializing the Plex media server object.
2018-05-10 18:21:59 Getting the service user.
2018-05-10 18:22:06 The Plex service is installed. Let's get the user associated with the service.
2018-05-10 18:22:08 The Plex service user: HOME.LAN\SA-Download.
2018-05-10 18:22:08 Get the local data folder for Plex.
2018-05-10 18:22:08 Plex local data folder: C:\Plex
2018-05-10 18:22:09 Verify the updates folder is specified.
2018-05-10 18:22:09 Getting ready to download the latest package.
2018-05-10 18:22:09 Checking for the latest version from Plex.
2018-05-10 18:22:09 Could not get the latest version information from Plex.
2018-05-10 18:22:09 The latest Windows version has not been specified.
2018-05-10 18:22:09 The latest available installation could not be downloaded.
2018-05-10 18:22:09 Verify the updates folder, C:\Plex\Plex Media Server\Updates exists.
2018-05-10 18:22:09 Checking to see if updates folder exists.
2018-05-10 18:22:09 Getting the latest update folder.
2018-05-10 18:22:09 Checking for the latest Plex packages folder.
2018-05-10 18:22:09 Get the latest packages file.
2018-05-10 18:22:09 Latest packages file: C:\Plex\Plex Media Server\Updates\1.7.5.4035-313f93718\packages\Plex-Media-Server-1.7.5.4035-313f93718.exe
2018-05-10 18:22:09 Displaying the update window.

After removing all the update packages it shows 1.13 as the latest. If a new update is released will it download it by it self and install? image

TechieGuy12 commented 6 years ago

That is interesting. I have a lot of older updates still in the updates folder, and never experienced the issue. Oh well, it seems your issue has been corrected.

Each time the updater is run it will check for the latest version of Plex, download the latest version (if it hasn't already been downloaded), and install the update.

Rouzax commented 6 years ago

I'll check when a new version is released and let you know

Rouzax commented 6 years ago

There is a new version of Plex but when I start the update tool it does nothing image image

2018-06-08 13:24:11 Checking if user is an administrator.
2018-06-08 13:24:11 Initializing the update window.
2018-06-08 13:24:11 Initializing the Plex media server object.
2018-06-08 13:24:12 Getting the service user.
2018-06-08 13:24:12 The Plex service is installed. Let's get the user associated with the service.
2018-06-08 13:24:12 The Plex service user: HOME.LAN\SA-Download.
2018-06-08 13:24:12 Get the local data folder for Plex.
2018-06-08 13:24:12 Plex local data folder: C:\Plex
2018-06-08 13:24:12 Verify the updates folder is specified.
2018-06-08 13:24:12 Getting ready to download the latest package.
2018-06-08 13:24:12 Checking for the latest version from Plex.
2018-06-08 13:24:12 Could not get the latest version information from Plex.
2018-06-08 13:24:12 The latest Windows version has not been specified.
2018-06-08 13:24:12 The latest available installation could not be downloaded.
2018-06-08 13:24:12 Verify the updates folder, C:\Plex\Plex Media Server\Updates exists.
2018-06-08 13:24:12 Checking to see if updates folder exists.
2018-06-08 13:24:12 Updates folder does not exist. Looks like a new install.
2018-06-08 13:24:12 Displaying the update window.
TechieGuy12 commented 6 years ago

It appears the update can't get the value of a Plex registry value from the registry. The updater is looking for the 'ButlerUpdateChannel' value in the registry under 'HKEY_CURRENT_USER\Software\Plex, Inc.\Plex Media Server' for the user that is running Plex. Does this value exist in the registry?

This issue also shows that I will need to add more debugging lines in the log, which I will be doing.

Rouzax commented 6 years ago

The whole key HKEY_CURRENT_USER\SOFTWARE\Plex, Inc.\Plex Media Server exists but the value ButlerUpdateChannel does not exist under that key.

After switching the setting around again image

The value now does exist. image

But when kicking of the tool it still does nothing.

2018-06-11 10:06:31 Getting windows user.
2018-06-11 10:06:31 Checking if user is an administrator.
2018-06-11 10:06:31 Initializing the update window.
2018-06-11 10:06:32 Initializing the Plex media server object.
2018-06-11 10:06:34 Getting the service user.
2018-06-11 10:06:41 The Plex service is installed. Let's get the user associated with the service.
2018-06-11 10:06:43 The Plex service user: HOME.LAN\SA-Download.
2018-06-11 10:06:43 Get the local data folder for Plex.
2018-06-11 10:06:43 Plex local data folder: C:\Plex
2018-06-11 10:06:43 Verify the updates folder is specified.
2018-06-11 10:06:43 Getting ready to download the latest package.
2018-06-11 10:06:43 Checking for the latest version from Plex.
2018-06-11 10:06:43 Could not get the latest version information from Plex.
2018-06-11 10:06:43 The latest Windows version has not been specified.
2018-06-11 10:06:43 The latest available installation could not be downloaded.
2018-06-11 10:06:43 Verify the updates folder, C:\Plex\Plex Media Server\Updates exists.
2018-06-11 10:06:43 Checking to see if updates folder exists.
2018-06-11 10:06:43 Updates folder does not exist. Looks like a new install.
2018-06-11 10:06:43 Displaying the update window.

image image

TechieGuy12 commented 6 years ago

There should be two values that look similar. The Update Channel registry value is called 'ButlerUpdateChannel' and should be either 0 (for Public) or 8 (for Plex Pass). If 'ButlerUpdateChannel', try creating it (a String) and set it to 0. In the meantime, I will make it default to 0 if the value doesn't exist.

TechieGuy12 commented 6 years ago

I have release version 0.1.7.0 that should default to the latest public release if the registry keys are missing.

TechieGuy12 commented 6 years ago

Did you manage to run the updater with the latest version of Plex?

Rouzax commented 6 years ago

I don't know, I updated manually this time. Will give it another go with the next update, sorry.

kp74508 commented 6 years ago

I had the same symptoms. My issue was caused by not having the registry key LocalAppDataPath (also missing ButlerUpdateChannel) even though the GUI displayed a value. I edited the value on the Plex GUI and this created the registry key. Now this most excellent update tool is working for me.

Thanks for your work in providing this tool for us.