iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Mon Jun 01, 2020 6:25 am

Version Information
  • iMacros 12.6.505.4525 (Enterprise 30 day trial, downloaded in mid May 2020, 2 weeks ago)
  • iMacros for FF: VERSION BUILD=10021450
  • Windows 10 64-bit 10.0.18363.836 (English), all latest OS updates applied
  • IE 11.836.18362.0
  • FF 76.0.1 64-bit
  • Chrome Version 83.0.4103.61 (Official Build) (64-bit)

iMacro demo/sample macros status on my system
All demo macros run on iMacros browser and IE except (including the VBS sample scripts): Notes:
  • the urls work just fine in both FF and Chrome (urls load w/o any issues)
  • IE: urls pasted directly into regular IE w/o imacros: urls fail to load, IE says page has to be reloaded and shows error message that page failed to load
  • iMacros browser: urls pasted directly into browser: iMacro browser crashes with no error messages (just disappears; nothing in the iMacros crash log)
  • also tried off of a fresh reboot and still did not work

Description of Issue
Besides the issue of the 2 demo macros not working as described above (not the main issue I am reporting but the FAQ stated to include a report on the demo macros), the main issue I am reporting is when using a simple Javascript to execute either a DS CLICK or IMAGECLICK on www.google.com (over and over again in a loop), both the iMacros browser and iMacros for IE will hang/become unresponsive within 1-5 minutes. In my JS script, iimPlay fails with "the browser did not respond before timeout" which makes sense since iMacros hung. The exact commands I am using to achieve this are below:

Code: Select all

DS CMD=CLICK X=50 Y=800 CONTENT=

Code: Select all

IMAGECLICK POS=1 IMAGE=.\\google.png CONFIDENCE=70
I have tried using these exact same macros in the iMacros browser/IE GUI (no JS scripting) and it seems to work just fine. The only way I was able to hang iMacros is when using Javascript. I also looped several different TAG commands via JS and that worked just fine (ran for 11 hours w/o any issues; using TAG commands to click on a control, to input and extract data), so it appears to be some sort of issue with clicking using DS.

NOTE: I was unable to test scripting with FF/Chrome since there is no free license for those (although if I understood correctly, DS/IMAGECLICK do not work in FF). If I could get a free license for those, I would be happy to run some tests and report the results (if these commands work in those browsers).


Sample test code used to reproduce the issue
I have supplied the exact same test code that I used to reproduce this issue on my system. I have reproduced this issue over 20 times and it will happen 100% of the time when I run these tests within just a few minutes. There are 3 files in total for the test. Simply copy the code below into files that are contained in the same folder (hang.js and hang.html, also copy the google.png attachment) and double click on hang.html to run the tests. google.png - image that is clicked on using IMAGECLICK (google apps icon).

hang.html: run this file and press a button to test each flavor of iMacros with DS CMD or IMAGECLICK:
<!DOCTYPE html>

<html>
<head>
<title>
imacros js script
</title>
<script type="text/javascript" src="hang.js"></script>
</head>

<body>
<input type="button" onclick="imacros_hang('',true)" value="Press to hang imacros browser with ds click"/>
<input type="button" onclick="imacros_hang('',false)" value="Press to hang imacros browser with imageclick"/>

<input type="button" onclick="imacros_hang('-ie',true)" value="Press to hang imacros IE with ds click"/>
<input type="button" onclick="imacros_hang('-ie',false)" value="Press to hang imacros IE with imageclick"/>
</body>

</html>
hang.js: simple javascript that sends DS CMD or IMAGECLICK to www.google.com in a loop:
function imacros_hang(type,do_ds)
{
var iim1 = new ActiveXObject("imacros");
var iret = 0;

iret = iim1.iimOpen(type, false);
if (iret < 0)
{
s = iim1.iimGetErrorText();
alert("Open failed: " + s);
return;
};

mc = "CODE:";
mc += "URL GOTO=https://google.com" + "\n";
iret = iim1.iimPlay (mc);
if (iret < 0)
{
s = iim1.iimGetErrorText();
alert("initial play failed: " + s);
return;
};

let count=1;
mc = "CODE:";
mc += "SET !PLAYBACKDELAY 0.2" + "\n";
mc += "SET !ERRORIGNORE YES" + "\n";
mc += "SET !TIMEOUT_STEP 0" + "\n";
if (!do_ds) mc += "IMAGECLICK POS=1 IMAGE=.\\google.png CONFIDENCE=70" + "\n";
if (do_ds) mc += "DS CMD=CLICK X=50 Y=800 CONTENT=" + "\n";

do
{

iret = iim1.iimPlay (mc);
if (iret < 0)
{
var today2 = new Date();
var date2 = today2.getFullYear()+'-'+(today2.getMonth()+1)+'-'+today2.getDate();
var time2 = today2.getHours() + "-" + today2.getMinutes() + "-" + today2.getSeconds();
var dateTime2 = date2+'_'+time2;
s = iim1.iimGetErrorText();
alert("Play failed: (count=" + String(count) + "): " + s + " date and time: " + dateTime2);
return;
};

count++;
//if ((count % 50) == 0) alert ("Completed " + String(count) + " loops!");

} while (1);

};
Attachments
google.png
google.png (188 Bytes) Viewed 14684 times
User avatar
The iMacros Guru
Posts: 25
Joined: Tue Mar 07, 2017 11:07 pm
Contact:

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by The iMacros Guru » Fri Jun 05, 2020 8:33 pm

maiden1134 wrote:
Mon Jun 01, 2020 6:25 am
Description of Issue
Besides the issue of the 2 demo macros not working as described above (not the main issue I am reporting but the FAQ stated to include a report on the demo macros), the main issue I am reporting is when using a simple Javascript to execute either a DS CLICK or IMAGECLICK on www.google.com (over and over again in a loop), both the iMacros browser and iMacros for IE will hang/become unresponsive within 1-5 minutes. In my JS script, iimPlay fails with "the browser did not respond before timeout" which makes sense since iMacros hung. The exact commands I am using to achieve this are below:
Code: Select all

DS CMD=CLICK X=50 Y=800 CONTENT=
Code: Select all

IMAGECLICK POS=1 IMAGE=.\\google.png CONFIDENCE=70
I have tried using these exact same macros in the iMacros browser/IE GUI (no JS scripting) and it seems to work just fine. The only way I was able to hang iMacros is when using Javascript. I also looped several different TAG commands via JS and that worked just fine (ran for 11 hours w/o any issues; using TAG commands to click on a control, to input and extract data), so it appears to be some sort of issue with clicking using DS.

NOTE: I was unable to test scripting with FF/Chrome since there is no free license for those (although if I understood correctly, DS/IMAGECLICK do not work in FF). If I could get a free license for those, I would be happy to run some tests and report the results (if these commands work in those browsers).


Sample test code used to reproduce the issue
I have supplied the exact same test code that I used to reproduce this issue on my system. I have reproduced this issue over 20 times and it will happen 100% of the time when I run these tests within just a few minutes. There are 3 files in total for the test. Simply copy the code below into files that are contained in the same folder (hang.js and hang.html, also copy the google.png attachment) and double click on hang.html to run the tests. google.png - image that is clicked on using IMAGECLICK (google apps icon).

Greetings!

So I managed to run your test code, but it should be noted that the google.png file needs to be copied to the iMacros\DataSources folder first. Specifying IMAGE=.\google.png does not look in the same folder where the script/macro is running. Specifying a relative path in the IMAGE parameter is always relative to your iMacros DataSources folder (as defined in the iMacros settings - usually %userprofile%\Documents\iMacros\DataSources by default) So this means that IMAGE=.\google.png actually expands to %userprofile%\Documents\iMacros\DataSources\.\google.png, which just means it is looking in the DataSources folder for the file. I suspect you already had a copy of this file in that folder when you ran the test and so that is why it worked for you. Putting the html, js, and png files together in any other folder and attempting to run the script from there will not work.

There was one other change I made to your macro, and that was to remove the SET !ERRORIGNORE YES line. I wanted to make sure that if the script/macro/browser did hang, I could see if there was any error being reported from iMacros. By having SET !ERRORIGNORE YES in the macro, it will never raise any error.

I only tested the "imacros browser with imageclick" case (edit, later: I did also run the "imacros IE with imageclick" test one time with the same results), and unfortunately, I was not able to reproduce the behavior encountered even after multiple attempts. I let the first run go for about 30 minutes before I manually aborted it, and it completed nearly 3300 iterations during this time.

I then recalled that the trial version (at one time anyway, though I don't know if this still holds true today) would periodically throw up a "trial reminder" pop-up or message when playing a macro from a script and/or using DS/IMAGECLICK|SEARCH commands. So I suspected that this might have been what was causing the issue for you. So I downloaded the latest trial version and installed it on another machine and continued running your test, but alas with no freezes encountered. So then I thought that the reminders might not start until some time after the trial has been installed. To test this, I set the date on the machine to a few weeks ahead. Aside from receiving one extra trial reminder when the browser started up, it continued to run through 3000+ iterations without any freezes.

I did encounter one browser crash during one of the test runs, but this occurred after 30 minutes and I'm actually not surprised by this. It's not uncommon for a browser (any browser) to crap out after 1000's of iterations. Some side effects and/or crashes are inevitable when putting a browser through the paces like this. It all depends on how complex the target website is, the iMacros features being used (DS and IMAGECLICK|SEARCH will be more expensive) as well as the amount of resources (CPU and RAM) being used by other applications and processes on the machine, so your mileage will vary. That's why it's always a good idea to do a periodic browser restart for any long-running or 'intensive' macros/scripts. This is even recommended as a best practice on the iMacros wiki.

I'm sorry to say that I have no good idea about why you are getting the results that you're getting. I really thought I was onto something with it being a trial version, but I was not able to prove that out for myself. If you are so inclined, you could request an evaluation license from Progress so that you can test in a non-trial scenario to further rule out that possibility. Just use the Contact Us form on the iMacros website and tell them you would like an evaluation license. This will also let you test the full functionality of iMacros for Chrome and Firefox, however, as you correctly understood, DS and IMAGECLICK are not supported in those browsers.

I am curious about one thing though. It's not very common these days to see someone scripting iMacros using Javascript running in the browser (IE or iMacros browser). I was wondering if you have a specific use case that requires this, or if you are doing it this way because this is the first example you found? It's much more common to script iMacros from a standalone script, e.g. VBScript or Javascript, that runs via the Windows Scripting Host (wscript.exe/cscript.exe), or use Python or a PowerShell script.

maiden1134 wrote:
Mon Jun 01, 2020 6:25 am
iMacro demo/sample macros status on my system
All demo macros run on iMacros browser and IE except (including the VBS sample scripts):

draw.iim : loading website crashes imacros browser and IE: http://demo.imacros.net/Automate/JavaDraw

DirectScreen Click.iim: loading website crashes imacros browser and IE: http://demo.imacros.net/Automate/JavaCalculator

Notes:

the urls work just fine in both FF and Chrome (urls load w/o any issues)

IE: urls pasted directly into regular IE w/o imacros: urls fail to load, IE says page has to be reloaded and shows error message that page failed to load

iMacros browser: urls pasted directly into browser: iMacro browser crashes with no error messages (just disappears; nothing in the iMacros crash log)

also tried off of a fresh reboot and still did not work

What version of the Java runtime do you have installed on your system? These two demo pages have embedded Java apps so you need to have Java installed for them to load and run (plus you will need to make a security exception for demo.imacros.net). I just ran a quick test of the Draw and DirecScreen Click demo macros in both the iMacros browser and iMacros for IE and did not have any problems:

https://www.screencast.com/t/r4QosGWy6Nq
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Sat Jun 06, 2020 7:31 am

Greeting to you as well!

Thank you very much for your reply and for trying to reproduce this issue. I was afraid this would be one of the responses I would receive -- this may be a rare intermittent bug that only appears in certain environments. However I consider this a serious issue as it *may* be something that can hang up/freeze imacros on anyone's system (if this is indeed an imacros issue and not some strange IE problem). I will answer your quick questions below first and then dive into some follow up testing that I did based on what you suggested in your previous response.
What version of the Java runtime do you have installed on your system? These two demo pages have embedded Java apps so you need to have Java installed for them to load and run (plus you will need to make a security exception for demo.imacros.net).
I have the latest Java version 8 update 251, build 1.8.0_251-b08. I re-ran the samples again and they fail the same way with a browser crash (note that since my original post I have upgraded Windows 10 using their latest update, more on this below).


plus you will need to make a security exception for demo.imacros.net)
What exactly does this mean??? Maybe this is my issue?


but it should be noted that the google.png file needs to be copied to the iMacros\DataSources folder first.
Yep I knew about this, must of had a brain fart when documenting how to run the test. Yes exactly right I had a copy of the image file in my DataSources folder :D


There was one other change I made to your macro, and that was to remove the SET !ERRORIGNORE YES line
I did the same thing and saw there was no error, but I guess at the end of the day I really did not need to set that flag.


That's why it's always a good idea to do a periodic browser restart for any long-running or 'intensive' macros/scripts.
Good point. I always start from a fresh browser instance for all of my tests, sometimes I even reboot my pc just to be safe.


If you are so inclined, you could request an evaluation license from Progress so that you can test in a non-trial scenario to further rule out that possibility.
Yep already requested one of those maybe 10 days ago. Unfortunately I have not received a response on that as of yet. Maybe one of the support engineers who may read this can help me get an answer on that.


I am curious about one thing though. It's not very common these days to see someone scripting iMacros using Javascript running in the browser (IE or iMacros browser). I was wondering if you have a specific use case that requires this, or if you are doing it this way because this is the first example you found? It's much more common to script iMacros from a standalone script, e.g. VBScript or Javascript, that runs via the Windows Scripting Host (wscript.exe/cscript.exe), or use Python or a PowerShell script.
No specific use case. This was honestly my first dive into web programming/development. My professional experience (about 18 years) has been that of a low level programmer, mostly used C under Windows and Linux (Windows/cloud apps, device drivers, OS extensions, etc). Never bothered to learn web programming until recently :) I was looking for an easy way to get started and I saw it was possible to run JavaScript directly in the browser so I decided to start there. I will mention that iMacros documentation itself does present this method as one valid way for scripting with its interface.


Further tests I have tried
Since my original post, Windows had a major update so I went ahead and downloaded/installed it. Here is the updated version info:
- latest Windows 10 version: Version 10.0.19041.264
- latest IE 11: Version 11.264.190141.0, update versions: 11.0.190

I re-ran all 4 of my JavaScript tests (imageclick/ds click on IE and iMacros) and was still able to reproduce the issue in all cases with the latest Windows updates. The only difference I saw was that in some cases it took 10-20 minutes to reproduce the issue but in other cases it occurred within 10-120 seconds of starting the test (iMacros browser imageclick test seems to consistently hang the browser after 1-2 minutes, same for the IE ds click test). So even with the latest Windows/IE software I am still seeing the issue.

BTW, curious question: which version of Windows/IE are you running when you tried to reproduce the failures?

Based on what you suggested, I went ahead and converted my script into VBS (I provided the code below). I repeated all 4 tests using this script (running outside of the browser, I just double clicked on the VBS file in the Windows file explorer) and 3 of the 4 tests hung iMacros/browser within a few minutes (one test took about 8 minutes). The 4th test, imageclick under IE, ran for 53 minutes and then it failed with a very strange error where iMacros stated it failed to take a screenshot of the current browser page -- a very odd error it seems since obviously I am only running a single imageclick command (could this be an indication of a memory overwrite?). I took a screenshot of it -- attached as "screenshot.jpg" at end of response. Also I captured the error from the iMacros.log file (below). So now I can say the hang issue is reproducible on my system using either JavaScript or VBS.

Here is what happened when I ran the VBS script in each test case (BTW there is nothing in the iMacros crash logs):
1. imageclick with iMacros browser: several times it hung within 30 seconds, one case it took about 4 minutes
2. ds click with iMacros browser: hung in about 8 minutes
3. imageclick with IE: ran for 53 minutes and failed with that strange screenshot error (attached below)
4. ds click with IE: hung within 1-2 minutes
PS: jic this may be important, I executed each test with a maximized browser window (I have tried using a minimized window as well but was able to reproduce the same result using my JavaScript tests).

If anyone here can think of any other tests I can run to narrow down the issue, I am willing to give whatever a try. I would like to help out in any way possible to try to uncover the source of this bug/issue (the developer side of me makes me really curious what could be causing this issue). If an iMacro engineer/support needs access to my machine remotely to run a few tests to see what the issue may be, I am open to that as well.

Also, is there any application I can run along side iMacros/browser that can help in determining what exactly may be hanging??? Trying to think of any debugging tools that may help.


iMacros.log for screenshot error message on imageclick command
6/5/2020 7:04:10 PM PID:16844 [iimPlay] playing macro using code: SET !PLAYBACKDELAY 0.2
SET !TIMEOUT_STEP 0
IMAGECLICK POS=1 IMAGE=google.png CONFIDENCE=70

6/5/2020 7:04:10 PM PID:16844 START untitled
6/5/2020 7:04:11 PM PID:16844 STOP, OK
6/5/2020 7:04:11 PM PID:16844 [iimPlay] playing macro using code: SET !PLAYBACKDELAY 0.2
SET !TIMEOUT_STEP 0
IMAGECLICK POS=1 IMAGE=google.png CONFIDENCE=70

6/5/2020 7:04:11 PM PID:16844 START untitled
6/5/2020 7:04:11 PM PID:16844 Error -1230: Macro: untitled, line 3. (-1230) Unable to save screenshot of the current browser page.
Notice that only HTML documents are currently supported
(no PDF or office documents loaded via plugins)
6/5/2020 7:04:11 PM PID:16844 STOP after error


Last section of the iMacros.log for when iMacros/browser hangs (I believe this indicates the macro is hanging during playback....)

6/5/2020 6:03:04 PM PID:18608 [iimPlay] playing macro using code: SET !PLAYBACKDELAY 0.2
SET !TIMEOUT_STEP 0
IMAGECLICK POS=1 IMAGE=google.png CONFIDENCE=70

6/5/2020 6:03:04 PM PID:18608 START untitled
6/5/2020 6:03:05 PM PID:18608 STOP, OK
6/5/2020 6:03:05 PM PID:18608 [iimPlay] playing macro using code: SET !PLAYBACKDELAY 0.2
SET !TIMEOUT_STEP 0
IMAGECLICK POS=1 IMAGE=google.png CONFIDENCE=70

6/5/2020 6:03:05 PM PID:18608 START untitled


Below is my VBS script (started from an iMacros VBS sample file, modify directly to run each test case):

Code: Select all

Option Explicit
Dim iim1, iret

set iim1= CreateObject ("imacros")
iret = iim1.iimOpen("")

Dim MyMacroCode


MyMacroCode = "URL GOTO=https://google.com" + vbNewLine    
iret = iim1.iimPlayCode(MyMacroCode)
if iret < 0 Then
   MsgBox "Load google url failed: Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetErrorText()
   iim1.iimClose
   WScript.Quit(iret)
End If

MyMacroCode = "SET !PLAYBACKDELAY 0.2" + vbNewLine  
'MyMacroCode = MyMacroCode+"SET !ERRORIGNORE YES" + vbNewLine  
MyMacroCode = MyMacroCode+"SET !TIMEOUT_STEP 0" + vbNewLine  
MyMacroCode = MyMacroCode+"IMAGECLICK POS=1 IMAGE=google.png CONFIDENCE=70" + vbNewLine  
'MyMacroCode = MyMacroCode+"DS CMD=CLICK X=50 Y=800 CONTENT=" + vbNewLine  


Do While true

iret = iim1.iimPlayCode(MyMacroCode)
if iret < 0 Then
   MsgBox "Macro failed: Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetErrorText()
   Exit Do
End If

Loop

iret = iim1.iimClose
WScript.Quit(iret)
Attachments
screenshot.jpg
User avatar
The iMacros Guru
Posts: 25
Joined: Tue Mar 07, 2017 11:07 pm
Contact:

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by The iMacros Guru » Tue Jun 09, 2020 7:13 am

maiden1134 wrote:
Sat Jun 06, 2020 7:31 am
What version of the Java runtime do you have installed on your system? These two demo pages have embedded Java apps so you need to have Java installed for them to load and run (plus you will need to make a security exception for demo.imacros.net).
I have the latest Java version 8 update 251, build 1.8.0_251-b08. I re-ran the samples again and they fail the same way with a browser crash (note that since my original post I have upgraded Windows 10 using their latest update, more on this below).
plus you will need to make a security exception for demo.imacros.net)
What exactly does this mean??? Maybe this is my issue?

The fact that the page fails to load in both IE and the iMacros browser tells me that it's not related to having to make a security exception in the Java control panel for http://demo.imacros.net. Something else is definitely at play here. If the page were to load successfully, you would see this text on the page instructing you about how to configure the exception:

Note for Java V7 and V8: The Draw application might be blocked by Java security checks. By adding application/website URL http://demo.imacros.net/ to the Java Exception list allows you to run the applet: How can I configure the Java Exception Site List?.

At the end of video that I linked to in my last reply, I also showed where this exception is entered in the Java control panel applet.

maiden1134 wrote:
Sat Jun 06, 2020 7:31 am
iMacros browser: urls pasted directly into browser: iMacro browser crashes with no error messages (just disappears; nothing in the iMacros crash log)

Check also the Windows Event Log, perhaps there is something logged there when this occurs.

maiden1134 wrote:
Sat Jun 06, 2020 7:31 am
That's why it's always a good idea to do a periodic browser restart for any long-running or 'intensive' macros/scripts.
Good point. I always start from a fresh browser instance for all of my tests, sometimes I even reboot my pc just to be safe.

Yes, I wasn't just referring to starting with a fresh instance before running a test or long-running process, but about modifying the test/process to perform automatic restarts. For example:

Code: Select all

' Restart the browser after every 100 iterations of the main loop
Const BROWSER_RESTART_INTERVAL = 100
Dim loop : loop = 1

Do While true

	If loop Mod BROWSER_RESTART_INTERVAL = 0 Then
		iim1.iimClose()
		iim1.iimOpen()
		LoadWebPage() ' routine to perform initial browser navigation
	End If
	
	iret = iim1.iimPlayCode(MyMacroCode)
	if iret < 0 Then
	   MsgBox "Macro failed: Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetErrorText()
	   Exit Do
	End If
	
	loop = loop + 1

Loop

maiden1134 wrote:
Sat Jun 06, 2020 7:31 am
If you are so inclined, you could request an evaluation license from Progress so that you can test in a non-trial scenario to further rule out that possibility.
Yep already requested one of those maybe 10 days ago. Unfortunately I have not received a response on that as of yet. Maybe one of the support engineers who may read this can help me get an answer on that.

I'm beginning to suspect more and more that it is a system-specific configuration issue and not a trial version licensing issue, but I will report this post in order to soft-alert tech support and make sure they see it.

It would also be helpful if you can post the troubleshooting information that iMacros provides (from the main menu in the iMacros browser, select Help - Display Troubleshooting Info). Tech support will most likely ask for this anyway.

maiden1134 wrote:
Sat Jun 06, 2020 7:31 am
I re-ran all 4 of my JavaScript tests (imageclick/ds click on IE and iMacros) and was still able to reproduce the issue in all cases with the latest Windows updates. The only difference I saw was that in some cases it took 10-20 minutes to reproduce the issue but in other cases it occurred within 10-120 seconds of starting the test (iMacros browser imageclick test seems to consistently hang the browser after 1-2 minutes, same for the IE ds click test). So even with the latest Windows/IE software I am still seeing the issue.

BTW, curious question: which version of Windows/IE are you running when you tried to reproduce the failures?

I originally tested with the following:
- Windows 10.0.18363.778 / IE 11.778.18362.0, update versions: 11.0.185

But I also updated to the latest Win10 and IE (same exact version you now have) and retested and I'm still getting the same consistent results as before.

Further, I decided to reset my IE settings back to the defaults, just on a hunch that perhaps some configuration change(s) I made previously was/were affecting the outcome. However, I continue to get the same results even with a stock vanilla IE (plus iMacros).

maiden1134 wrote:
Sat Jun 06, 2020 7:31 am
3. imageclick with IE: ran for 53 minutes and failed with that strange screenshot error (attached below)

Code: Select all

6/5/2020 7:04:11 PM PID:16844 Error -1230: Macro: untitled, line 3. (-1230) Unable to save screenshot of the current browser page.
Notice that only HTML documents are currently supported
(no PDF or office documents loaded via plugins)

I encountered this error at least one time during my testing as well. Not sure what the cause is exactly, but it could be a timing issue. Each time an IMAGECLICK|SEARCH command executes, iMacros has to take a screenshot of the web page. Since these tests are rapidly performing the same operation over and over, it likely got tripped up for some reason. In a real-world production scenario I would likely:
  1. add a small delay (WAIT SECONDS=1) in the macro after doing the IMAGECLICK
  2. check the return code from iimPlay for this specific error (or any other errors) and handle accordingly, e.g. log and notify and/or retry
  3. implement automatic browser restarts (as shown above) to mitigate resource issues
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by Tom, Tech Support » Tue Jun 09, 2020 7:40 am

maiden1134 wrote:
Sat Jun 06, 2020 7:31 am
Yep already requested one of those maybe 10 days ago. Unfortunately I have not received a response on that as of yet. Maybe one of the support engineers who may read this can help me get an answer on that.
Hi maiden1134,

I did not find a corresponding request or contact record in our system. When you submitted the request, did you use the same email address that you used to register on the forums, or a different one?
Regards,

Tom, iMacros Support
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Tue Jun 09, 2020 8:07 pm

I did not find a corresponding request or contact record in our system. When you submitted the request, did you use the same email address that you used to register on the forums, or a different one?
Yep, used the same email address as registered here in the forums (it was a form I filled out on the iMacros website). Would you like me to send it again?
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Tue Jun 09, 2020 8:18 pm

BTW, here is the information from the iMacros troubleshooting log:

Microsoft Windows 10 Pro
Microsoft Windows NT 10.0.19041.0
64-bit Operating System
Installed UI Culture: English (United States)
CLR version 4.0.30319.42000
Internet Explorer version 11.264.19041.0
Enhanced Protected Mode = False, 64-bit processes for EPM = False
BrowserEmulation Mode = IE11
iMacros Browser (x86) version 12.6.505.4525
Licensed Product: Trial Version
License Type: 30-day trial (12 days left)
------------------------------------------------------------------------------------------
Google Chrome version 83.0.4103.97
------------------------------------------------------------------------------------------
Mozilla Firefox (x64) version 77.0.1 (x64 en-US)
Firefox profile "default-1453666691900" iMacros extension 10.0.2.1450
------------------------------------------------------------------------------------------
iMacros File Access is not installed
------------------------------------------------------------------------------------------
Auxiliary Libraries:
iMacros Direct Screen [iimds.dll] version 12.0.0.19
iMacros Fx&Cr Image Recognition (x64) [iimIRm.dll] version 12.0.503.8173
iMacros Image Recognition (x64) [ImageRecognitionLibrary.dll] version 12.0.503.8173
iMacros Dialog Manager (x86) [imsys.dll] version 12.6.505.4525
iMacros Fx&Cr Image Recognition (x64) [iimIRm.dll] version 12.0.503.8173
iMacros Direct Screen [iimds.dll] version 12.0.0.19
iMacros Fx&Cr Image Recognition (x86) [iimIRm.dll] version 12.0.503.8173
iMacros Image Recognition (x86) [ImageRecognitionLibrary.dll] version 12.0.503.8173
iMacros Dialog Manager (x86) [imsys.dll] version 12.6.505.4525
iMacros Fx&Cr Image Recognition (x86) [iimIRm.dll] version 12.0.503.8173
iMacros Direct Screen [iimds.dll] version 12.0.0.19
iMacros Fx&Cr Image Recognition (x64) [iimIRm.dll] version 12.0.503.8173
iMacros Image Recognition (x64) [ImageRecognitionLibrary.dll] version 12.0.503.8173
iMacros Dialog Manager (x86) [imsys.dll] version 12.6.505.4525
iMacros Fx&Cr Image Recognition (x64) [iimIRm.dll] version 12.0.503.8173
iMacros Direct Screen [iimds.dll] version 12.0.0.19
iMacros Fx&Cr Image Recognition (x86) [iimIRm.dll] version 12.0.503.8173
iMacros Image Recognition (x86) [ImageRecognitionLibrary.dll] version 12.0.503.8173
iMacros Dialog Manager (x86) [imsys.dll] version 12.6.505.4525
iMacros Fx&Cr Image Recognition (x86) [iimIRm.dll] version 12.0.503.8173
------------------------------------------------------------------------------------------
Scripting Interface Libraries:
iMacros Scripting Connector (x64) [iimConnector64.dll] version 12.6.0.177
iMacros Scripting Interface (x64) [iimInterface64.dll] version 12.6.0.177
iMacros Fx&Cr Scripting (x64) [imtcp64.dll] version 3.0.5.54
iMacros Scripting Connector (x86) [iimConnector.dll] version 12.6.0.177
iMacros Scripting Interface (x86) [iimInterface.dll] version 12.6.0.177
iMacros Fx&Cr Scripting (x86) [imtcp.dll] version 3.0.5.55
iMacros Scripting Connector (x64) [iimConnector64.dll] version 12.6.0.177
iMacros Scripting Interface (x64) [iimInterface64.dll] version 12.6.0.177
iMacros Fx&Cr Scripting (x64) [imtcp64.dll] version 3.0.5.54
iMacros Scripting Connector (x86) [iimConnector.dll] version 12.6.0.177
iMacros Scripting Interface (x86) [iimInterface.dll] version 12.6.0.177
iMacros Fx&Cr Scripting (x86) [imtcp.dll] version 3.0.5.55
------------------------------------------------------------------------------------------
User Settings:
FolderLogs = C:\Users\Eric\Documents\iMacros\Logs
FolderDownloads = C:\Users\Eric\Documents\iMacros\Downloads
EncryptionPasswordMode = No
NewWindowBehavior = Tabs
PlaybackDelay = 1014
FolderDataSources = C:\Users\Eric\Documents\iMacros\DataSources
TimeoutPage = 60
FolderMacros = C:\Users\Eric\Documents\iMacros\Macros
InterfaceType =
InstalledSamples = True
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Wed Jun 10, 2020 1:33 am

BTW one other test I just ran with the iMacros browser out of curiosity. I used a macro program called Pulover's macro creator to macro clicking on the google app button over and over again to see if the browser would hang w/o an iMacro macro being involved in the process....the test ran for 4 hours w/o any issues.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by Tom, Tech Support » Wed Jun 10, 2020 7:48 am

maiden1134 wrote:
Tue Jun 09, 2020 8:07 pm
I did not find a corresponding request or contact record in our system. When you submitted the request, did you use the same email address that you used to register on the forums, or a different one?
Yep, used the same email address as registered here in the forums (it was a form I filled out on the iMacros website). Would you like me to send it again?
Yes, please use the Contact Us form to request an eval license. I'll give a heads-up to the customer service team to make sure they take care of this right away.
Regards,

Tom, iMacros Support
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by Tom, Tech Support » Wed Jun 10, 2020 8:01 am

maiden1134 wrote:
Wed Jun 10, 2020 1:33 am
BTW one other test I just ran with the iMacros browser out of curiosity. I used a macro program called Pulover's macro creator to macro clicking on the google app button over and over again to see if the browser would hang w/o an iMacro macro being involved in the process....the test ran for 4 hours w/o any issues.

Very interesting! So let me make sure I understand you correctly... you used Pulover to automate the steps in the iMacros browser? In other words, the same steps repeated in the iMacros browser (without the iMacros macro engine running) did not cause the issue?

Before I jump to any conclusions about this, I would like you to try it again with iMacros once you have an evaluation license just so that we can rule out any trial-specific issue.

But also: are you running any antivirus/anti-malware software? Sometimes DirectScreen will get detected and blocked by some of these.

Actually, you can easily test if the issue is the result of using DS/IMAGECLICK by changing the click in your macro to use TAG or EVENT instead:

Code: Select all

MyMacroCode = "SET !PLAYBACKDELAY 0.2" + vbNewLine  
MyMacroCode = MyMacroCode+"SET !TIMEOUT_STEP 0" + vbNewLine  
MyMacroCode = MyMacroCode+"TAG POS=1 TYPE=A ATTR=CLASS:""gb_D gb_xc"""
'MyMacroCode = MyMacroCode+"EVENT TYPE=CLICK SELECTOR=""#gbwa>DIV>A"" BUTTON=0"
Try one or both of those and see if the browser is still freezing/hanging.
Regards,

Tom, iMacros Support
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Thu Jun 11, 2020 12:19 am

Yes, please use the Contact Us form to request an eval license. I'll give a heads-up to the customer service team to make sure they take care of this right away.
Yep this is underway, I was contacted by iMacros and they are arranging for me to get the eval version. As soon as I get it I will re-run all of my tests and let you know the results.


So let me make sure I understand you correctly... you used Pulover to automate the steps in the iMacros browser? In other words, the same steps repeated in the iMacros browser (without the iMacros macro engine running) did not cause the issue?
Correct. I just recorded a simple Pulover macro to click on the google app icon over and over again while google.com was loaded into the iMacros browser (exactly the same as what my JS/VB test scripts do in iMacros). No iMacros scripts were running, the iMacro browser was idle. This test ran for 4 hours w/o any issues -- so it seems at least for me, I can only reproduce the problem when using the iMacros engine to run my test macros.


But also: are you running any antivirus/anti-malware software? Sometimes DirectScreen will get detected and blocked by some of these.
I disabled my virus software (Avast) and re-ran the imageclick test with the iMacros browser and it became unresponsive within about 10 minutes.

PS: Another Windows update became available so I installed it and the tests still fail.

BTW WRT the TAG/EVENT commands above, I ran both of those tests, they both ran for over an hour w/o any issues. In that past I tested the TAG and TAG+EXTRACT commands and did not have issues with those either. So it looks like an issue with the imageclick/DS commands.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by Tom, Tech Support » Mon Jun 15, 2020 12:19 pm

Thanks for the additional information and testing! We're starting to run out of ideas unfortunately. A few other questions:
  • Are you logged into Windows as an admin user or regular user?
  • Is UAC (User Account Control) enabled and what level is it set to?
  • Is there any other software or background processes running during the testing that you think could potentially interfere?
  • Do you have access to another machine (real or virtual) on which to test (preferably a "clean" vm with no other software installed aside from default OS apps)?
Regards,

Tom, iMacros Support
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Tue Jun 16, 2020 11:01 pm

Tom -- see my answers below:
Are you logged into Windows as an admin user or regular user?
My account that I use all the time is part of the administrators group (ps: this is my personal computer).
Is UAC (User Account Control) enabled and what level is it set to?
Yes it is enabled and set to prompt when apps attempt to make changes (default setting).
Is there any other software or background processes running during the testing that you think could potentially interfere?
Nope, I just have basic stuff as you would expect (regular junk like nvidia/sound/intel background software, etc).
Do you have access to another machine (real or virtual) on which to test (preferably a "clean" vm with no other software installed aside from default OS apps)?
I can ask to use a friends computer later today. I will reply later with the results.

Another option to help catch the culprit here is if you can give me a debug version of iMacros that I can run over here that may help you determine where and why it is hanging.

PS: Still waiting on the evaluation version, I should get it later this week.
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Thu Jun 18, 2020 7:57 am

Okay I received the evaluation iMacros version and ran tests on my computer and my friends computer. Still able to reproduce the hang issue on my computer within 10 minutes or so (I only ran the imageclick test on the imacros browser). Ran the same test on my friends PC and received different results (using the trial version of iMacros, evaluation version is limited to one installation I believe). After about 30 minutes, the test failed with an image not found error which makes no sense (obviously the image is there and was found in the previous 1000+ attempts). I repeated the test 2 more times and got the same error after about 30-35 minutes with each run. It was error -1800 - "no match for image xyz found with specified accuracy of 70". I ran this with virus protection on and off and received the same result. My friends PC is Windows 10 64-bit and has nothing running in the background except the virus protection (he has barely anything installed on the computer). While the test was running, the computer was not being used by anyone.

If it is possible to get a debug version of iMacros that I could run over here that could help you guys narrow down the cause of the issue I think that would be a good next step. Let me know what you think.
maiden1134
Posts: 10
Joined: Mon Jun 01, 2020 4:38 am

Re: iMacros browser and IE: DS CMD=CLICK/IMAGECLICK issued from JS can cause both browsers to hang/become unresponsive

Post by maiden1134 » Thu Jun 18, 2020 9:12 pm

IMPORTANT UPDATE: I went ahead and ran the simple mouse click test on my friend's PC using 'DS CLICK' (again using the latest trial version). After 23 minutes, imacros popped up a message box that said it had crashed and to check the crash log. Here is the crash from the log:

Code: Select all

========================================
2020-06-18 20:53:18Z
iMacros version 12.6.505.4525, IE version 11.329.19041.0, OS version Microsoft Windows NT 10.0.19041.0

Exception at Void CheckErrorStatus(Int32)
A generic error occurred in GDI+.
   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   at System.Drawing.Graphics.FillPolygon(Brush brush, Point[] points, FillMode fillMode)
   at System.Drawing.Graphics.FillPolygon(Brush brush, Point[] points)
   at System.Windows.Forms.ToolStripRenderer.OnRenderArrow(ToolStripArrowRenderEventArgs e)
   at System.Windows.Forms.ToolStripProfessionalRenderer.OnRenderArrow(ToolStripArrowRenderEventArgs e)
   at System.Windows.Forms.ToolStripRenderer.DrawArrow(ToolStripArrowRenderEventArgs e)
   at System.Windows.Forms.ToolStripDropDownButton.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.ToolStripItem.HandlePaint(PaintEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.StatusStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Also in the crash log there was a crash related to when I tried to run imacros for IE last night on my friends machine, here it is:

Code: Select all

========================================
2020-06-17 23:41:15Z
iMacros Sidebar version 12.6.505.4525, IE version 11.329.19041.0, OS version Microsoft Windows NT 10.0.19041.0

Exception at Boolean EnableBHO()
Object reference not set to an instance of an object.
   at iMacros.Core.Helpers.IEUtils.EnableBHO()
   at #=zphBaP43m9S5wB1v95RoKWOZGIXewZLLaaL1LTjY=.#=zrXDoS4ZhI4juDKCkSkipn0Q=(Object #=zQ8BY764=, EventArgs #=zqW8MFuA=)
   at System.Windows.Forms.Form.OnShown(EventArgs e)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

Post Reply