Updater failing with error

We get the following error when updating a few sites using the AutoUpdater. When we run the wyupdate from the command line, the site updates fine. We have pushed multiple updates to verify and every time we get the same result.

Other sites are not facing this issue and update correctly.

The application is a windows forms application/

Here is the error message:

[wyUpdate exited prematurely] Message: [wyUpdate failed to start.]|UpdateFail: auBackend_CheckingFailed. Title: [wyUpdate exited prematurely] Message: [wyUpdate failed to start.]|auBackend_Cancelled|UpdateFail: auBackend_Cancelled|

Any thoughts on why this is happening and how to address this issue?

Thanks!

My guess is that you're calling ForceCheckForUpdate() at the beginning of your app and you don't check if you already have pending updates ready to be installed.

My advice: don't ever use ForceCheckForUpdate(). Let the automaticUpdater automatically check for updates (that's its job).

That is correct - we are using that API method.

We have a windows form and windows service that we would like to keep updated. These applications are triggered by various events to perform some business logic (e.g., timer, presence of files, etc.,).

Our requirement is that before any processing, the applications need to check for updates as there may be changes to the business logic that need to be applied before processing. This is why we are calling the ForceCheck method.

How can we achieve the above functionality? That method was listed in the documentation and samples. Is there any other way to achieve this? We cannot put the updater on it's schedule as the checks have to be made before processing.

Thanks.

Here's code from the documentation on the site that lists using the ForceCheck method:

static void CheckEvery10Days(){ // Only ForceCheckForUpdate() every N days! // You don't want to recheck for updates on every app start.

if ((DateTime.Now - auBackend.LastCheckDate).TotalDays > 10 && auBackend.UpdateStepOn == UpdateStepOn.Nothing) { auBackend.ForceCheckForUpdate(); }}

We have used the same pattern.

What is the alternate mode to check for updates?

Thanks...

Right, this is only for the AutomaticUpdaterBackend class, not for the AutomaticUpdater class. For the AutomaticUpdater class use the property DaysBetweenChecks.

For the AutomaticUpdaterBackend, notice that the ForceCheckForUpdate() isn't being blindly called. There's an if statement to first see if there's a pending update:

if (auBackend.UpdateStepOn == UpdateStepOn.Nothing){// Now you can actually check for updates, and only if you're using the AutomaticUpdaterBackend. Otherwise, don't using ForceCheckForUpdates().}