Adler32 validation for the catch-all file

Hello,I use the commandline version to upload the latest version ( /upload ) to the server and yet I get the adler32 non-validation regularly. The adler32 validation checks if the downloaded file is indeed that specified in wserver.wys so that the system would patch the matching client files correctly. The catch-all file <product>all.to.<latest-version>.wyu is used when there are no patches for the client's version, or when the files to be patched doesn't match the expected files.

Since the catch-all file download is no longer patching but practically reinstalling the software, does it make sense to ignore the (non) validation and go ahead with the reinstallation ?

Since the catch-all file download is no longer patching but practically reinstalling the software, does it make sense to ignore the (non) validation and go ahead with the reinstallation ?

No. The solution to the problem is to make sure you upload all of the update files (*.wys and *.wyu files).

Thanks for the prompt reply !

Would obfuscation for my Dot Net Product somehow upset Adler32 checksums ? It gets so obfuscated that sometimes I get virus alerts !

Would obfuscation for my Dot Net Product somehow upset Adler32 checksums ?

Nope. It's because you're not uploading all the update files. If you rebuild the updates you have to reupload everything.

I think I got the bug pinpointed!

I use VBS/WScript to RUN the wybuild.cmd. If error occured, it's reported in the return code not Err object.So the build got stuck on the way and the wserver.wys and *.wyu files are no longer in sync. and the /upload command sends it all to server (as usual).

It would be nice if the /upload command does a Adler32 validation before uploading and corrupting server files !Seems to make sense !

Just to confirm: " the /upload command sends it all to server" 1) is done in a subsequent step so wybuild.cmd.exe has no way of finding out that there was an error.2) this commandline option uploads all the files in the current update - I don't stop uploading all the relevant files.

It is logical that the server files are no longer in sync, because of undetected error while building.One way of preventing this situation is to check if the update files are in sync before uploading them, and proactively avoid the Adler32 invalidation. Again I assure you the all files are uploaded in a single step with your commandline option /upload.

Found another reason wyUpdate always cry "the downloaded file xxx failed the Adler32 validation".when xxx is an unexpected file (not *.wyu).

WyUpdate requests a certain file say "MyApp1.0.0.1.to.1.0.0.2.wyu". If it doesn't exist (whatever the reason), your site may decide to return some default file such as xxx=sitemap.htm. And wyUpdate proceeds to do adler32 validation, so you get this famous message which doesn't help anybody.

Here's how to solve it: within the class wyUpdate.Downloader.FileDownloader in the method ValidateDownload,just after if (!bw.CancellationPending) and before if (Adler32 != 0 && Adler32 != downloadedAdler32.Value)

string requested_filename = Path.GetFileName(url);string downloaded_filename = Path.GetFileName(DownloadingTo);if (downloaded_filename != requested_filename){ string msg = "The downloaded file \"" + downloaded_filename + "\" doesn't match requested file \"" + requested_filename + "\"."; throw new Exception(msg);}