I've been successfully using Kaju v2.1 for macOS updates for all but one user, who never got the prompt an updates was available, whether or not a silent check was being made. The app menu option to check for an update never displayed any result, even if simply "No updates available".
It was only a single user with this issue, and was friendly and didn't really mind having to install himself when I sent links, but it always struck me as odd. He did not have the firewall turned on, or anything other malware or virus detection software active, but I still attributed it to something unique about his machine.
This weekend we were in the same city, so he gave me a chance to sit together and debug the issue. And to my initial surprise, when I stepped through the code in debug it worked and told me there were no updates available. So then I removed all my breakpoints but still ran in debug mode and it still worked. Compiled the same source, and it failed to report anything! So I figured it had to be timing dependent, and looked closer at how Kaju.UpdateCheckerFetchAsync performed this section of code:
dim url as string = UpdateURL dim http as Kaju.HTTPSocketAsync = GetAsyncHTTPSocket http.Get url
with the GetAsyncHTTPSocket method doing this:
if AsyncHTTP is nil then AsyncHTTP = new HTTPSocketAsync AddHandler AsyncHTTP.PageReceived, WeakAddressOf AsyncHTTP_PageReceived AddHandler AsyncHTTP.Error, WeakAddressOf AsyncHTTP_Error end if return AsyncHTTP
So on a whim, since it seemed to be timing dependent and since I already had the MBS plugins available, changed to this:
if AsyncHTTP is nil then AsyncHTTP = new HTTPSocketAsync AddHandler AsyncHTTP.PageReceived, WeakAddressOf AsyncHTTP_PageReceived AddHandler AsyncHTTP.Error, WeakAddressOf AsyncHTTP_Error end if // Add slight delay to allow time for AddHandlers to complete SleepMBS(0.05) return AsyncHTTP
to add a 1/20 second delay before the socket was returned.
It then worked even in compiled mode. This user's machine was the fastest of any of my users -- including me -- and it at least seems the socket was getting returned and the .Get url completing faster than the AddHandler's had taken effect. Or so it seems.
And perhaps 0.05 seconds is overkill and another shorter delay tactic would suffice. But I'm ok with adding 1/20 second delay into an operation so am just leaving it as it for now.
So this is more for the sake of reporting the issue I saw and the eventual circumvention in the hopes of helping others.
This was using Kaju v2.1, and Xojo 2019R1.1, with client machine running 10.14.16 (Mojave) with firewall etc off.