How many people have problems getting AI updates to work the first time

Poll ended at Thu May 24, 2018 11:31 pm

No problems at all
No votes
0
Still having problems
100%
1
 
Total votes: 1
Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

download update size does not match

Mon May 14, 2018 11:31 pm

I am getting the download update size does not match error. I have checked all the forum and tried the suggested solutions but to no avail.

I am able to point to the url of the updater project and get the download prompt.

The size on disk is 233472 but the size is 230912. At least that is what windows says.

;aiu;

[Update]
Name = Certimporter
ProductVersion = 1.0.0.1
URL = http://dmvstappt01.dmv.ca.gov/Certimporter.exe
Size = 230912
MD5 = 79adaf4bbcc38b80023fcdd5a1b0f548
ServerFileName = Certimporter.exe
RegistryKey = HKUD\Software\DMV\WindowsFormsApplication2\Version
Version = 1.0.0.1
Description = Certimporter creates Secure Transport, Accounts,Certificates and passphrase files. It then uses the delegated admins manager account to move the files to the customers account

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Tue May 15, 2018 11:29 pm

Test VM machine Windows 7 Download using Internet Explorer 11

I thought I should try the manual way. So I downloaded the exe from the linux server via IE and the download fails on the download and changes the . to a _. So the executable is Certimporter.exe and it downloads as Certimporter_exe. After restarting the download and renaming the file to Certimporter.exe it runs.

Normal machine Windows 10 Downloaded using Firefox 52.7.4


I downloaded the file with Firefox and it came down fine and installed.

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: download update size does not match

Wed May 16, 2018 2:15 am

Hello,

I've tested your scenario but I cannot replicate the download error. Can you please give us a detailed test case scenario so that we can test on our end? Also, are you able to replicate the behavior on multiple machines? I've just tested this on a Win 7 machine, IE being the only browser. Everything worked as expected.

Regarding your poll, to help you adding the updates functionality to your installer, we have created a step-by-step video and sample projects. For details, please check the Configuring auto-updates for a Windows application forum thread.

We can help you with information for hints and guidance when you create your installation package but we cannot create from scratch the installation package for you. We have Tutorials and How-To's which can give you a starting point in order to create your installation package and for problems which you encounter we can advice you how to pass over.

So, if you encounter any difficulties in implementing your installation scenario just send us a description of your installation scenario and we will gladly try to guide you.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Wed May 16, 2018 6:36 pm

Dan I have read thru the tutorials.

I have for years read books tutorials and created things from them. Good tutorials leave nothing out and you should be able to follow them easily and have a working product at the end. Bad tutorials have missing or wrong code (some call it errata) which can be frustrating.

Advanced Installers tutorials assume that the person using their product has access to a server to serve up the update files. Before purchase I had asked, does AI run on a Secure Transport Server, I was told yes. But with all the security and session management surrounding it it never worked, nor did any Calyphon support person know what server would or would not work or what any of their customers used, which I find odd. I know what most of my customers using my app use it on, I also tell them what they cannot use it on.

So I stood up a VM and wrote a simple Python server, that did not work, then I installed Apache and got it to serve up the Updates.txt and the exe file. Again problems.

I don't have a bunch of test machines and was lucky to get one.

Did my poll upset you ? Most vendors I work with (big or small) are more than willing to help and I am more than willing to pay for support. You should look to companies like Chilkat, a small company with excellent products. I pay them support every year. Anytime I ask a question I have a full blown working example within a day emailed directly to me.

I also work with Axway a large company who will quickly do a Go To Meeting and resolve any issue quickly.

No waiting around on some discussion forum, hoping someone will respond.

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Wed May 16, 2018 6:38 pm

Oh and to answer your question, yes I did move a new version of the exe along with the updated Updates.txt to the server.

Same result.

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Wed May 16, 2018 11:53 pm

So the AI update aiu file contains a size of 230912 but sitting on the server the size is actually 6460867. When I code that into the Updates.txt file I get to the Installing Updates and then the wrong md5 error. I took 6460867 and ran it thru an md5 calc and put

44d54cc7a4ffcf2baa5fbff32c3c6d89

into the MD5 = 44d54cc7a4ffcf2baa5fbff32c3c6d89 but it does not like it.

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Thu May 17, 2018 11:20 pm

Ok so I was doing the md5sum on the byte size shown on a ls -l instead of doing the md5sum on the file itself. That worked. Now I just need to work thru the Windows message saying the Another version of the product .... blah

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: download update size does not match

Tue May 22, 2018 9:24 am

Hello,

The related message occurs when you rebuild a new flavor of the setup package without changing the ProductVersion. For instance you build v1.0.0 of your product setup, then change a setting in the setup project and rebuild it without changing the ProductVersion. In this case when you will try to install the second setup build on a machine where you already installed the original project build you will get the related error message.

Windows Installer does not allow two different setup packages of the same family and with the same ProductVersion to be installed on the same machine. Each time you change a setting into yuor setup project, if you want to release and test the setup package against old versions you should first make sure you increased the "Product Version" field from "Product Details" page.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Tue May 22, 2018 7:07 pm

Thanks Daniel,I do have a question though

I had to manual change the file size in the Updates.text file as what is sitting on my linux server is different than what was computed by AI. I also had to run the md5sum on the linux server to get the correct hash. How do I get AI to calculate the size and md5 hash correctly?

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: download update size does not match

Wed May 23, 2018 3:12 pm

Hello,

This is strange, you should have no problem generating the MD5 checksum with Advanced Installer. Can you please make sure that in the updates setup project (opened in Advanced Installer) you are referring the exact same updates setup file which is uploaded on your linux server? Just download your updates setup from your linux server by accessing its download URL from a web browser and, after the setup is downloaded just add it into your updates configuration project opened in Advanced Installer.

Also, maybe you can download the updates setup hosted on your linux server and compare it using a MD5 checker tool and make sure they are identical. If they are, but the Advanced Installer generates a wrong MD5 checksum when building your updates setup project, then please forward us by email to support at advancedinstaller dot com a download link for your linux uploaded setup and the AIP (project file) of your updates configuration project.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Wed May 23, 2018 7:12 pm

So here is my process.

I revise the code to the app, rebuild it using VS 2015. Then I access AI and point file path to the exe in the solution, build it and upload the Updates.txt and the new exec.

Where should I be picking up the exe from?

I downloaded the file and pointed AI to the exe file and built it. The MD5 and file size are correct.

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Thu May 24, 2018 7:05 pm

Ok so here is what I have figured out so far in regards to the update process.

Lets assume you have to update some code on your project here are the steps (and correct me if I am wrong)

Make code changes in Visual Studio
Build AI full project to get new exe with correct size
Build AI update project with path pointed to the AI project NOT the Visual Studio exe (i did this and it just fired off the exe as if it was running)
Upload the exe and Updates.txt to your server.

Now for my latest problem,

The new version gets installed but at the very end the installation says it fails with a generic message and when it checks updates it still thinks it has to update to the new version, which is installed with the correct version



[img]
error_updates_advanced_installer_5242018.PNG
error_updates_advanced_installer_5242018.PNG (15.74KiB)Viewed 11070 times
[/img]

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Thu May 24, 2018 11:29 pm

So I coded the silent part of the update. On my test and production systems nothing happens after 10000 (seconds, or whatever it is).

I ran debug on the code and I am getting

BasePriority = 'process.BasePriority' threw an exception of type 'System.InvalidOperationException'

In this code

Code: Select all

 private static void StartSilent()
        {
            Thread.Sleep(10000);
            try
            {
                Process process = Process.Start(updaterModulePath, "/silent");
                process.Close();

               
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e.ToString());
            }
        }
And yes i have updater.exe and updater.ini inline.

Wondering has anyone coded this in their solution????

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: download update size does not match

Mon May 28, 2018 2:48 pm

Hello,
Ok so here is what I have figured out so far in regards to the update process.

Lets assume you have to update some code on your project here are the steps (and correct me if I am wrong)

Make code changes in Visual Studio
Build AI full project to get new exe with correct size
Build AI update project with path pointed to the AI project NOT the Visual Studio exe (i did this and it just fired off the exe as if it was running)
Upload the exe and Updates.txt to your server.
Yes, I can confirm you this is the correct approach.
The new version gets installed but at the very end the installation says it fails with a generic message and when it checks updates it still thinks it has to update to the new version, which is installed with the correct version
This usually happens if you are not using a correct updates detection criteria into your updates configuration project. Just go to "Updates" page -> "Update Installed Detection" tab and here make sure you configured a search about a resource which will be installed by your updates setup. For instance, if you have a Version registry search, then make sure the registry value will contain the exact version value installed by the updates setup.

If this is still of no help, then please send us by email to support at advancedinstaller dot com the AIPs (project files) of your updates configuration project and of your updates setup project.

In what regards the Updater call within your application code, this could happen if the frequency check time interval has not passed since last Updater call. In this case the Updater will simply exit. You can check the frequency check time interval set for the Updater in your setup project -> "Updater" page -> "Update check frequency" field.

To avoid this behavior you can use the "-nofreqcheck" switch alongside the "/silent" command to ignore the frequency check.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

Re: download update size does not match

Tue May 29, 2018 7:27 pm

Thanks Daniel, I read thru previous posts about the updater code not working due to a bug in AI 13.1, so I have upgraded to the latest version and the timer works and calls the code. However I still cannot figure out why AI still things there is an update to be installed when the most current version is installed.
Here is the aui file

;aiu;

[Update]
Name = Certimporter
ProductVersion = 3.2.0.0
URL = http://dmvstappt01.dmv.ca.gov/Certimporter.exe
Size = 8062660
MD5 = 3b941f2fcaa84122f8b41a7b591bb7a7
ServerFileName = Certimporter.exe
Flags = NoCache
RegistryKey = HKUD\Software\DMV\WindowsFormsApplication2\Version
Version = 3.0.1.1
Description = Certimporter creates Secure Transport, Accounts,Certificates and passphrase files. It then uses the delegated admins manager account to move the files to the customers account
BugFix = Added updater check in code .

Version 3.2.0.0 is installed on the machine, so I assume that AI would say software update to date, but still wants to update the software, which fails.

Return to “Common Problems”