Windows Server 2012R2
iMacros Browser (x86) Version 11.5.498.2403
When I run my macros iim files via PHP in the iMacros browser, everything works with screenshots. When I try running the macros via Chrome, Firefox or IE, the screenshots fail. I am using the iMacros runas agent (-runner).
I get an error:
Cannot copy the item being saved to destination file: C:\xxx\xxx\xxx.png (removed for security) The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)). Line 6: TAG POS=1 TYPE=TD FORM=NAME:frmGIMD ATTR=TXT:TrackRecordName:* CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT (-1000)
Here is the code being run
php:
$s = $iim1->iimSet("FilePath", $screenshot_test_folder);
$s = $iim1->iimSet("FileName", $FileName);
mkdir($screenshot_test_folder, 0777, true);
$s = $iim1->iimPlay("Take_Screenshot");
iim:
SET !ERRORIGNORE YES
ONDOWNLOAD FOLDER={{FilePath}} FILE={{FileName}}
WAIT SECONDS=2
FRAME NAME=content
TAG POS=1 TYPE=TD FORM=NAME:frmXXXX ATTR=TXT:Key<SP>Team* CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
I am certain the folder exists and that permission are set to "everyone modify". I am sure it's some little thing I'm not setting but I have googled for hours and spent way too much time on this. There is a quirk with the iMacros browser in a particular site that causes me to need to use a different browser but then other stuff is broken when in the other browsers.
Screenshot file permissions
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
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
Re: Screenshot file permissions
Ouf-ouf...!, I'm a bit "puzzled" like you, to be honest...kreiter wrote:When I run my macros iim files via PHP in the iMacros browser, everything works with screenshots. When I try running the macros via Chrome, Firefox or IE, the screenshots fail. I am using the iMacros runas agent (-runner).Code: Select all
Windows Server 2012R2 iMacros Browser (x86) Version 11.5.498.2403
I get an error:Here is the code being runCode: Select all
Cannot copy the item being saved to destination file: C:\xxx\xxx\xxx.png (removed for security) The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)). Line 6: TAG POS=1 TYPE=TD FORM=NAME:frmGIMD ATTR=TXT:TrackRecordName:* CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT (-1000)
php:iim:Code: Select all
$s = $iim1->iimSet("FilePath", $screenshot_test_folder); $s = $iim1->iimSet("FileName", $FileName); mkdir($screenshot_test_folder, 0777, true); $s = $iim1->iimPlay("Take_Screenshot");
I am certain the folder exists and that permission are set to "everyone modify". I am sure it's some little thing I'm not setting but I have googled for hours and spent way too much time on this. There is a quirk with the iMacros browser in a particular site that causes me to need to use a different browser but then other stuff is broken when in the other browsers.Code: Select all
SET !ERRORIGNORE YES ONDOWNLOAD FOLDER={{FilePath}} FILE={{FileName}} WAIT SECONDS=2 FRAME NAME=content TAG POS=1 TYPE=TD FORM=NAME:frmXXXX ATTR=TXT:Key<SP>Team* CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
And I don't use iMB nor the Scripting Interface so I never had a "Chance" to play around with all that Functionality you are using...
But OK, my 2cts for "Things" you can try, (or that I would try), to troubleshoot/isolate/identify the Pb...
The 'RPC' RuntimeError you posted belongs to IE, I would think, and ErrorCode "-1000" is indeed iMB/IE, I "normally" don't use (iMacros for) IE (only FF), but I finally installed iMacros for IE (v12.0, on IE11, Win10_x64) recently for some other Thread on the Forum, and I encountered quite a lot of those 'RPC' RuntimeErrors while doing nothing "special", just running a very simplistic ('.iim') Macro, you don't mention your FCI related to the 3 IE+FF+CR Browsers, but doing your "Tests" on FF (=> FF55/56 + iMacros for FF v8.9.7 (and not v9.0.3)) might be more "reliable"...
And CR would be my last Choice anyway..., but hum..., unless you have the 'PE' Version ('Personal Edition') if using v10.0.1 for CR, (which I guess is very probably not the case as if your iMB v11.5 License was still valid, you would have probably already updated to v12.0), your Script won't work on CR anyway as you need the FIO Functionality for the 'SAVE_xxx' to work.
[FIO = File I/O = File Access]
You would first need to check with "pure" '.iim' Macros that your Script works correctly in all 3 Browsers... (=> Need to hard-code the Path and Filename...)
+ Check with the Default iMacros 'Downloads' Folder.
+ Check with 'SAVEITEM' (both as Standalone Command + as 'TAG EVENT'), and with 'SAVETARGETAS' (as 'TAG EVENT').
Not visible from your Script what for Values you have for 'FilePath' and 'FileName', but Spaces and Backslashes could play a role, so try to avoid them first, and try to specify a FileName with a '.png' Extension...
Oh ja, stg else..., your 'mkdir' from '.php' is maybe not needed I would think, and/or is a bit "Double" maybe, and could create a Lock on that from '.php' created Folder, not sure btw what happens if you try to create a Folder that already exists..., but the 'FOLDER' Parameter from the 'ONDOWNLOAD' Command is able as well to create the Folder if it doesn't exist...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Screenshot file permissions
@OP, I see you are checking my Post, I made a few Edits..., refresh the Page, ah-ah...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Screenshot file permissions
Lots of information there and I will take some time to digest it. The mkdir in php was me testing to see if iM was failing to create the folder. We use enterprise so shouldn't be a limitation there. I have upgraded to v12 to see if that helps and it didn't. The error from iM states where it is trying to save the file so I know it's trying to put it in the right place. There won't be a collision of an existing folder because each process creates a new parent folder.
I am trying to get ie, ff or cr to work because I have a site I am trying to post data to that throws errors when using the iMB. Basically if the php fails it leaves the site in a "logged in' state and wont let me log into a different account because it knows I'm still logged in to another account. It's tracked at the server side via IP so I can't control it. IE, FF and CR all show an error page allowing me to log out correctly which I can script if it happens but once I get the error in iMB there is nothing I can do for some reason. I assume some little bug in iMB that I have no way to chase down.
The site has a popup that eliminates me using CR because it doesn't support ONDIALOG. I had a different issue with support on FF so I am left hoping IE will work but the final (and very important step) is to take a screenshot and save it.
I am trying to get ie, ff or cr to work because I have a site I am trying to post data to that throws errors when using the iMB. Basically if the php fails it leaves the site in a "logged in' state and wont let me log into a different account because it knows I'm still logged in to another account. It's tracked at the server side via IP so I can't control it. IE, FF and CR all show an error page allowing me to log out correctly which I can script if it happens but once I get the error in iMB there is nothing I can do for some reason. I assume some little bug in iMB that I have no way to chase down.
The site has a popup that eliminates me using CR because it doesn't support ONDIALOG. I had a different issue with support on FF so I am left hoping IE will work but the final (and very important step) is to take a screenshot and save it.
Re: Screenshot file permissions
FYI: Chrome always says "File Access Not Installed" no matter what I do.