The handle is in the wrong state for the requested operation

Having trouble running Advanced Installer? Got a bug to report? Post it all here.
Tvalone
Posts: 42
Joined: Sat Jul 02, 2016 1:40 am

The handle is in the wrong state for the requested operation

Post by Tvalone » Tue Nov 07, 2017 10:44 pm

Have a simple python server running.
Have the Certimporter-update.txt and the Certimporter.exec on the server.

It serves the Update file and recognizes that there is an update, but then fails with the above error.
Attachments
New-update-1.PNG
New-update-1.PNG (14.45 KiB) Viewed 5386 times
Certimporter-Update.txt
(587 Bytes) Downloaded 139 times
Updates.aiu.txt
(587 Bytes) Downloaded 143 times

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

Re: The handle is in the wrong state for the requested operation

Post by Dan » Wed Nov 08, 2017 1:00 pm

Hello Tvalone,

The "The handle is in the wrong state for the requested operation" error suggests that you have some remnants generated by a broken installation which are conflicting with the updater.
Please review the following thread for more details on this: The handle is in the wrong state for the requested operation
It seems that the Fix it Windows Tool resolved the issue.

Let us know if it worked for you.

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

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

Re: The handle is in the wrong state for the requested operation

Post by Tvalone » Thu Nov 09, 2017 12:41 am

Dan, thanks for the response. I ran the windows fix and the problem is still present.

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

Re: The handle is in the wrong state for the requested operation

Post by Tvalone » Tue Nov 14, 2017 12:28 am

Dan, can you tell me what other customers use to serve up the updates and actual exe / msi ? Perhaps what software on a linux server?

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

Re: The handle is in the wrong state for the requested operation

Post by Tvalone » Tue Dec 26, 2017 7:32 pm

Just wondering if Romania fell off the map and I am posting to myself. I have not been able to get Advanced Installer to work. Not sure what to do or what I am missing but the tutorials and forums really don't give you a clear picture of what to do. Perhaps I need a PHD in Comp Sci to create an Installer that checks a server for updates and then installs it.

I was able to package my MSI's up and do all the regular stuff, but the one thing that we really wanted was to be able to deploy updates to our 7,000 customers, but No Luck! I was not able to setup the process on our Secure Transport server (probably due to session state etc) so I setup a simply python server on a RedHat VM to try try try to get this to work. Well its about 1/2 there. Unfortunately the response here has been well lacking. I do work with other companies and buy support. While the purchase might not be huge I do talk to other agencies and if a product works well and the support is there then they normally purchase as well..

Waiting! :evil: :evil:

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

Re: The handle is in the wrong state for the requested operation

Post by Daniel » Thu Dec 28, 2017 3:47 pm

Hello,

First of all we deeply apologize for such a delayed reply. Somehow your last replies were missed by our support team. Thank you for your heads up on this.

Unfortunately we do not have such info about what software uses our customers to create web servers on Linux.

The "The handle is in the wrong state for the requested operation" error is a system error thrown by the WININET api we use to handle the http operations. This error could also appear when the download operation of your updates setup package or of your updates config file from your web server fails on current machine.

For testing purposes can you try to launch the download URL of your updates setup package into the Internet Explorer browser on the related machine and make sure that when the URL is launched the updates setup package is automatically downloaded and with success? If the download URL cannot be manually accessed from Internet Explorer system web browser, then won't be accessible for our Updater tool either.

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: The handle is in the wrong state for the requested operation

Post by Tvalone » Thu Feb 22, 2018 12:58 am

Dear customers of Advanced Installer. I have a question for you. What type of server are you running that allows for the update functionality of Advanced Installer to work?

I have a Secure Transport Server and it does not work there. I put up a simple file server on a RedHat VM written in Python, and it did not work.
I have posted on the WinINet forms.

I assume a server running some form of windows will do. Heck I will even write one in Visual Studio, but I would like to take the simple easy route.

Thanks so much!

Bogdan
Posts: 2780
Joined: Tue Jul 07, 2009 7:34 am
Contact:

Re: The handle is in the wrong state for the requested operation

Post by Bogdan » Mon Feb 26, 2018 2:48 pm

It does not matter on what OS you're running the server. As long as your server knows to handle correctly HTTP/HTTPs request correctly the updater will work with it.

To test it place your updates file URL in a browser, if the browser can load the file from your server, then the updater should be able to load it too.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

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

Re: The handle is in the wrong state for the requested operation

Post by Tvalone » Thu Apr 05, 2018 7:05 pm

Bogdan, I have a Secure Transport server that handles https all night and day.

I can login via my web browser and download the update file. It does not display the file on the server on the screen.
I can only get this to happen when using a simple python server running on a test machine.

The tutorial is so vague on this very important piece. What does Calyphon use? How can I replicate it?

What is the work around?

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

Re: The handle is in the wrong state for the requested operation

Post by Tvalone » Thu Apr 05, 2018 7:07 pm

How about you put or allow customers to put their updates in your cloud ?

At least for testing..

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

Re: The handle is in the wrong state for the requested operation

Post by Tvalone » Mon Apr 09, 2018 5:44 pm

Ok So I made some progress on my issue.

I installed Apache on my Red Hat VM and moved my updates and executable into the var/www/html root. Pointing a browser to the Updates.txt file results in a readable on the browser file.

It then downloads the executable and places it inside the program data folder.

It then executes the executable, and brings up the app, when I close it, it says the update failed.

Pretty sure its a simple config issue.

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

Re: The handle is in the wrong state for the requested operation

Post by Daniel » Wed Apr 11, 2018 3:10 pm

Hello,

This could happen if the updates detection criteria is not fulfilled after the updates installation succeed. Just open your updates configuration project in AI and go to "Updates" page -> "Update Installed Detection" tab and make sure here it is configured a search which:

1. always FAILS when the updates setup is not installed on target machine
2. always SUCCEEDS after the updates setup is installed on target machine

Let us know if this helped, otherwise please send us to support at advancedinstaller dot com an email with your AIPs (project files) of your updates configuration project and of your updates setup package.

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: The handle is in the wrong state for the requested operation

Post by Tvalone » Thu May 10, 2018 11:41 pm

Daniel thanks, I don't have those options on the version of AI that I am using (13.1).

I installed the app , made a code update, went thru the build on VS then AI moved the .exe to the server, then ran the Upates on AI and moved the Updates.txt to the server.

Now it says my app is up to date, even though its not.

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

Re: The handle is in the wrong state for the requested operation

Post by Daniel » Tue May 15, 2018 4:09 pm

Hello,

Can you please send us the AIP (project file) of your updates configuration project to support at advancedinstaller dot com so we can investigate its settings?

Here is a screenshot with the "Update Installed Detection" tab (of AI 13.1) that I was previously referring to:
screen.jpg
screen.jpg (114.83 KiB) Viewed 4938 times
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: The handle is in the wrong state for the requested operation

Post by Tvalone » Tue May 15, 2018 7:17 pm

Here is an update with the current problem.

I installed Apache on a VM that I have root to and placed the Updates.txt and the exe file on the server. I was getting the your software is up to date. I went back thru the updates project and I am now getting this message

"The Download update size does not match the size specified in updates configuration file"

I have that problem in another post.

Post Reply