News:

A forum for users of LackeyCCG

Main Menu

Version.txt Check Not Functioning

Started by CrazyChucky, January 05, 2020, 02:45:35 PM

Previous topic - Next topic

CrazyChucky

Okay, this really has me stumped. When Lackey is launched, it's supposed to check the version.txt of the currently loaded plugin against its remote version, and prompt for an update if the date tag on the remote file is newer. In the past, this has occasionally failed for me, but usually worked without a hitch. The last few days, it fails almost every time. I don't think it's just my server or my plugin, because I've tried testing it with the Pok?mon plugin and get the same results.

Not only can I access the remote version.txt just fine using the URL specified in the local one, Lackey also downloads the version file just fine if I go and hit "Install or Update from URL".

Steps I'm using to test:

  • First, I make sure I have a plugin up-to-date and currently loaded in Lackey.
  • Close Lackey.
  • Manually edit my local copy of version.txt to have an earlier date.
  • Relaunch Lackey.
It should prompt me to download the new version, but most of the time it does not. (If I then go hit "Install or Update from URL", it successfully downloads the (unedited) version.txt from the server.)

It's not like Lackey itself has changed, so I'm confused what could be doing this. If it were something to do with my firewall or internet connection, I don't understand how Lackey would be able to successfully download the same file when performing the update, but not when checking for the new version. Is anyone else having this issue?

CrazyChucky

I made a dummy plugin to test this with, changing the remote and local dates to various things, and watching Lackey's network traffic. I even tried setting my system clock back, in case the year changeover affected it somehow.

As far as I can tell, none of the variables I change have any effect. Sometimes, when Lackey launches, it will query the server and either prompt for an update or tell me I'm up to date. (I see data sent and received in this case.) But the majority of the time, it sends and receives no traffic upon launch, and doesn't display a message about whether or not I'm up to date.

Either it's "random", or I can't see the relevant factor.

CrazyChucky

ARGH. I figured it out.

Near as I can tell, this is what's happening:

When Lackey starts up and performs the version check, it saves the fact that it did so, and today's date. It won't check the same plugin again until today's date changes.

Say a plugin was last updated last month, and you're already up to date. This morning you launch Lackey with that plugin loaded and play some. This afternoon, the plugin maintainer puts up an updated version. This evening, you launch Lackey again?and it doesn't check for the update. You won't know about it until tomorrow.

That seems suboptimal, but at least now I think I understand what's happening.