HTTPRequest not working in Compiled version

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

HTTPRequest not working in Compiled version

Post by AndrewT » Thu Jun 25, 2020 12:58 pm

I have a short script that does a HTTPRequest Post. It works great when I run it from MS, but when I compile the code, everything but the HTTPRequest works. I am using the same computer for both runs.

Any ideas on what stupid thing I am overlooking this time?

Andrew T

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: HTTPRequest not working in Compiled version

Post by JRL » Thu Jun 25, 2020 1:24 pm


AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

Re: HTTPRequest not working in Compiled version

Post by AndrewT » Thu Jun 25, 2020 1:46 pm

Unfortunately not. I tried it and no joy.
The response I get from the the HTTPRequest is:
Error connecting with SSL.
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

Any other ideas?

Andrew T

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: HTTPRequest not working in Compiled version

Post by JRL » Thu Jun 25, 2020 1:58 pm

Privileges?
Especially if it's a local server.

AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

Re: HTTPRequest not working in Compiled version

Post by AndrewT » Thu Jun 25, 2020 2:40 pm

It is a NotifyMyDevice.com API service.
It's a cool little website/app that I found out about digging around in the MS forum. Unfortunately there doesn't seem to be any Support tab for help.
Still weird that I am running both instances on the same computer with different results. I have other compiled apps that do HTTPRequest API calls to other websites and they work great.

Anybody else out there use NotifyMyDevice.com for anything?

Andrew T.
Last edited by AndrewT on Thu Jun 25, 2020 3:29 pm, edited 1 time in total.

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: HTTPRequest not working in Compiled version

Post by JRL » Thu Jun 25, 2020 2:52 pm

But are the others pushing data?
Makes me wonder if its your anti-malware stopping executables from phoning home.

AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

Re: HTTPRequest not working in Compiled version

Post by AndrewT » Thu Jun 25, 2020 3:05 pm

Upon your suggestion, I turned off my anti-malware and tried again. No joy. :cry:

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: HTTPRequest not working in Compiled version

Post by JRL » Thu Jun 25, 2020 3:29 pm

Hmmmm.
Another thing to try. Close Macro Scheduler by going to "File" then "Exit" in the main menu. MSched.exe should not be seen running in task manager. Open the folder containing the uncompiled script using Windows File Explorer. Double click the script and see if it runs.

If it fails then I still think you have some permissions issue.

Another thought, have you tried right clicking on the executable and selecting "Run As Administrator"?

Are you on a work network or is this a personal computer?

AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

Re: HTTPRequest not working in Compiled version

Post by AndrewT » Thu Jun 25, 2020 3:36 pm

Found the problem, but don't really understand it.

Changed the url from https to http and it works in both versions now.

So maybe it has something to do with the first suggestion you gave me with the dlls and when I tried it, I didn't do something right. Not sure. But it seems to work now.

Thanks for the help.

Andrew T.

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: HTTPRequest not working in Compiled version

Post by JRL » Thu Jun 25, 2020 3:51 pm

Good job! :)
I had confidence you'd figure it out.

AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

Re: HTTPRequest not working in Compiled version

Post by AndrewT » Thu Jun 25, 2020 3:58 pm

You know what they say about a blind squirrel. :lol:

Andrew T.

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: HTTPRequest not working in Compiled version

Post by Marcus Tettmar » Tue Jun 30, 2020 3:55 pm

Since it works with http but not https that sounds like you didn't include the SSL dlls with the exe. You need libeay32.dll and ssleay32.dll which you'll find in the Macro Scheduler program folder. Make sure they are at the same level as the .exe file.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

Re: HTTPRequest not working in Compiled version

Post by AndrewT » Tue Jun 30, 2020 4:20 pm

Marcus, If the "Copy Runtime DLLs" box is checked during compiling of the exe, is that enough?
Do the files also need to be in the same folder as the exe at runtime?

I thought I had done both earlier, but I didn't get the DLLs from the MS Folder, I had gotten them through the instructions in the link that JRL had posted.

Andrew T.

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: HTTPRequest not working in Compiled version

Post by Marcus Tettmar » Tue Jun 30, 2020 4:27 pm

Checking that box should do it yes, but if for some reason it hasn't, copy them over from the Macro Scheduler program folder.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

nodochau
Pro Scripter
Posts: 131
Joined: Wed Jan 16, 2019 12:59 pm

Re: HTTPRequest not working in Compiled version

Post by nodochau » Thu Jul 02, 2020 10:25 am

AndrewT wrote:
Tue Jun 30, 2020 4:20 pm
Marcus, If the "Copy Runtime DLLs" box is checked during compiling of the exe, is that enough?
Do the files also need to be in the same folder as the exe at runtime?

I thought I had done both earlier, but I didn't get the DLLs from the MS Folder, I had gotten them through the instructions in the link that JRL had posted.

Andrew T.
Yes, the files need to be in the same folder. I solved the issue by doing that.
:)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts