Page 1 of 1

"The automating process does not have the required security"

Posted: Fri Aug 18, 2017 12:36 am
by merklh
I have an app that tries to automate another app through Ranorex and the WPF adapter. Spy works fine on this machine.

The OS is Windows 8.1 and both the automating and automated app are .NET 4.5.

But when I try it through my app I get output like this. UIA works fine with the same code. Any ideas? I assume something is not set up right on the machine.


2017_08_17.16_25_47 [000018]00051.792:FindTarget ranorex_path: /*[processid='5360']//*[@AutomationID='CONNECT_XWand_Tab_ModelLabel']/
2017_08_17.16_25_47 [000018]00051.866:CONSOLE: [2017/08/17 16:25:47.078][Warn ][WPF]: Failed to instrument WPF process. UI element identification capabilities for this window are limited.
2017_08_17.16_25_47 [000018]00051.866:17 Aug 2017 16:25:47.0780: CONSOLE: [2017/08/17 16:25:47.078][Warn ][WPF]: Failed to instrument WPF process. UI element identification capabilities for this window are limited.
2017_08_17.16_25_47 [000018]00051.866:CONSOLE:
2017_08_17.16_25_47 [000018]00051.866:17 Aug 2017 16:25:47.0780: CONSOLE:
2017_08_17.16_25_47 [000018]00051.866:CONSOLE: Could not set-up managed injection endpoint: Failed to retrieve handle to bootstrapper library.
2017_08_17.16_25_47 [000018]00051.866:17 Aug 2017 16:25:47.0780: CONSOLE: Could not set-up managed injection endpoint: Failed to retrieve handle to bootstrapper library.
2017_08_17.16_25_47 [000018]00051.867:CONSOLE: Process: 'VerciseNavigator' (pid 5360)
2017_08_17.16_25_47 [000018]00051.867:17 Aug 2017 16:25:47.0780: CONSOLE: Process: 'VerciseNavigator' (pid 5360)
2017_08_17.16_25_47 [000018]00051.867:CONSOLE: The following website provides more information on this technology limitation:
2017_08_17.16_25_47 [000018]00051.867:17 Aug 2017 16:25:47.0780: CONSOLE: The following website provides more information on this technology limitation:
2017_08_17.16_25_47 [000018]00051.867:CONSOLE: https://www.ranorex.com/help/v7.1.0/tec ... eason#2:.1
2017_08_17.16_25_47 [000018]00051.867:17 Aug 2017 16:25:47.0780: CONSOLE: https://www.ranorex.com/help/v7.1.0/tec ... eason#2:.1
2017_08_17.16_25_47 [000018]00051.867:CONSOLE: (This message is only shown once per report.)
2017_08_17.16_25_47 [000018]00051.867:17 Aug 2017 16:25:47.0780: CONSOLE: (This message is only shown once per report.)
2017_08_17.16_25_47 [000018]00051.896:CONSOLE: [2017/08/17 16:25:47.109][Warn ][Win32]: The automating process does not have the required security permissions to access the process 'AutomationServer'. UI element identification capabilities for controls in that process are limited.
2017_08_17.16_25_47 [000018]00051.896:17 Aug 2017 16:25:47.1092: CONSOLE: [2017/08/17 16:25:47.109][Warn ][Win32]: The automating process does not have the required security permissions to access the process 'AutomationServer'. UI element identification capabilities for controls in that process are limited.
2017_08_17.16_25_47 [000018]00051.896:CONSOLE: Process: 'AutomationServer' (pid 5232)
2017_08_17.16_25_47 [000018]00051.897:17 Aug 2017 16:25:47.1092: CONSOLE: Process: 'AutomationServer' (pid 5232)
2017_08_17.16_25_47 [000018]00051.897:CONSOLE: The following website provides more information on this technology limitation:
2017_08_17.16_25_47 [000018]00051.897:17 Aug 2017 16:25:47.1092: CONSOLE: The following website provides more information on this technology limitation:
2017_08_17.16_25_47 [000018]00051.897:CONSOLE: https://www.ranorex.com/help/v7.1.0/tec ... plications
2017_08_17.16_25_47 [000018]00051.897:17 Aug 2017 16:25:47.1092: CONSOLE: https://www.ranorex.com/help/v7.1.0/tec ... plications
2017_08_17.16_25_47 [000018]00051.897:CONSOLE: (This message is only shown once per report.)
2017_08_17.16_25_47 [000018]00051.897:17 Aug 2017 16:25:47.1092: CONSOLE: (This message is only shown once per report.)
2017_08_17.16_25_47 [000018]00052.066:FindTarget Exception: Ranorex.CapabilityNotSupportedException: The element does not support the required capability 'wpfelement'.
2017_08_17.16_25_47 at Ranorex.Adapter..ctor(Element element)
2017_08_17.16_25_47 at Ranorex.WpfElement.FromPath(String path)
2017_08_17.16_25_47 at TAUtilities.UITesting.RanorexTesting.RanorexUIAdapter.FindTarget(UIAutomationMode AutomationMode, String RootPath, String AutoID, Boolean MustBeVisible) in C:\TestAutomation\Dev\Main\Apps\Source\TestAutomationUtilities\TAUtilities\UITesting\RanorexTesting\RanorexUIAdapter.cs:line 138
2017_08_17.16_25_47 [000018]00052.069:SetAutomationMode start: Mode: WPF
2017_08_17.16_25_47 [000018]00052.069:SetAutomationMode end WPF
2017_08_17.16_28_38 [000024]00223.061:RanorexUIAdapter.FromProcess start TimeoutMS 1800

Re: "The automating process does not have the required security"

Posted: Fri Aug 18, 2017 6:59 am
by odklizec
Hi,

I'm afraid, it's hard to tell what's wrong without seeing the exact setup and all apps you are using in the process. If Ranorex alone works fine with the AUT, then the problem is most probably in the "other" app, from which you are running the whole process? But as said, It's hard to suggest something reliable without seeing all apps (or at least knowing more about them and the whole process).

Just one thing, make sure all apps are started with enough rights (ideally as Administrator). If the first app, from which you are starting Ranorex and the AUT, is started as a non-admin, then the rest of apps are taking the same privileges! And this is why Ranorex may fail to read the AUT properly. But it's only a wild guess ;)

Re: "The automating process does not have the required security"

Posted: Fri Aug 18, 2017 5:19 pm
by merklh
odklizec wrote:Hi,

I'm afraid, it's hard to tell what's wrong without seeing the exact setup and all apps you are using in the process. If Ranorex alone works fine with the AUT, then the problem is most probably in the "other" app, from which you are running the whole process? But as said, It's hard to suggest something reliable without seeing all apps (or at least knowing more about them and the whole process).

Just one thing, make sure all apps are started with enough rights (ideally as Administrator). If the first app, from which you are starting Ranorex and the AUT, is started as a non-admin, then the rest of apps are taking the same privileges! And this is why Ranorex may fail to read the AUT properly. But it's only a wild guess ;)

The same configuration works fine when using UIAOnly. The problem comes up only with WpfOnly mode. That seems to rule admin/non-admin mismatches.

I got instructions from Ranorex for enabling a log. I am out a for week but will try the logging when I am back

Re: "The automating process does not have the required security"

Posted: Thu Oct 26, 2017 11:38 pm
by jbeeson
Any more information on this issue? I emailed support about the same thing but they haven't been able to figure it out.

Re: "The automating process does not have the required security"

Posted: Fri Oct 27, 2017 3:29 pm
by ahoisl
merklh wrote:The same configuration works fine when using UIAOnly. The problem comes up only with WpfOnly mode. That seems to rule admin/non-admin mismatches.
The UIA plugin uses a completely different approach, namely the UIA interface, which is a public interface that may also work if processes are started with different rights or from different users.
jbeeson wrote:Any more information on this issue?
Make sure both the AUT and the automating process are started using the same user and with the same rights. You can check in the Task Manager "Details" (or "Processes" tab in Windows 7) which user a process is associated with. If in doubt, try starting the automation executable as Administrator.
Additionally, try to disable any anti virus software since such software could also cause inter-process communication to fail.
merklh wrote:CONSOLE: Could not set-up managed injection endpoint: Failed to retrieve handle to bootstrapper library.
This error message means that Ranorex cannot find a required Ranorex framework DLL, in that case the "Ranorex.InjectionBootstrapper32/64.dll". Try to reinstall Ranorex on that machine and make sure that this file is located in the "bin" folder of the Ranorex installation directory.

Regards,
Alex
Ranorex Team

Re: "The automating process does not have the required security"

Posted: Fri Oct 27, 2017 3:39 pm
by jbeeson
Had done all those suggested steps from support. I did end up fixing it by uninstalling ranorex, rebooting, and then reinstalling.

Re: "The automating process does not have the required security"

Posted: Fri Oct 27, 2017 4:03 pm
by ahoisl
Thank you for reporting back!
jbeeson wrote:Had done all those suggested steps from support. I did end up fixing it by uninstalling ranorex, rebooting, and then reinstalling.
So it works for you now after re-installing Ranorex? Seems like those necessary DLLs got deleted by something or were not correctly installed the first time.

Regards,
Alex
Ranorex Team

Re: "The automating process does not have the required security"

Posted: Fri Oct 27, 2017 4:38 pm
by jbeeson
ahoisl wrote:Thank you for reporting back!
jbeeson wrote:Had done all those suggested steps from support. I did end up fixing it by uninstalling ranorex, rebooting, and then reinstalling.
So it works for you now after re-installing Ranorex? Seems like those necessary DLLs got deleted by something or were not correctly installed the first time.

Regards,
Alex
Ranorex Team
It may have been from the 7.2 upgrade.

Re: "The automating process does not have the required security"

Posted: Mon Oct 30, 2017 7:30 pm
by merklh
I have fixed this by removing all Ranorex DLLs from the build directory. It seems some of them got copied in by Visual Studio but then Ranorex can't find other dependencies.


One thing for Ranorex to do would be better error messages that are closer to the real problem. In my case it should have been "Can't find DLL xxx", not "The automating process does not have the required security".

Re: "The automating process does not have the required security"

Posted: Mon Oct 30, 2017 11:46 pm
by ahoisl
merklh wrote:One thing for Ranorex to do would be better error messages that are closer to the real problem.
There were actually two different error messages in the log messages you posted. The "Failed to retrieve handle to bootstrapper library" is the one that really caused the issue. The error message may not be the easiest to understand, but really explains what fails from a technical point of view (Ranorex does not use file searching in that case).
The second message about security is for another process and may also be valid, but probably irrelevant for your automation.

Regards,
Alex
Ranorex Team

Re: "The automating process does not have the required security"

Posted: Tue Oct 31, 2017 12:19 am
by merklh
ahoisl wrote:
merklh wrote:One thing for Ranorex to do would be better error messages that are closer to the real problem.
There were actually two different error messages in the log messages you posted. The "Failed to retrieve handle to bootstrapper library" is the one that really caused the issue. The error message may not be the easiest to understand, but really explains what fails from a technical point of view (Ranorex does not use file searching in that case).
The second message about security is for another process and may also be valid, but probably irrelevant for your automation.

Regards,
Alex
Ranorex Team
My point is that nobody at Ranorex either could read the message well enough to diagnose the situation. If the message had been "Could not find library 'xxx.dll" at location 'yyy'"it would probably have been easier to diagnose. Just trying to give suggestions.

Re: "The automating process does not have the required security"

Posted: Tue Oct 31, 2017 10:05 am
by ahoisl
I'm sorry, I did not mean to sound ignorant to improvements. We already changed the error message to make it more explicit for future versions.
The error message may not be obvious to Ranorex users (and that's why we will improve it), but it should have been good enough for Ranorex support/dev guys. My point was that people were apparently focusing too much on the second "security" error message, maybe also because of the forum thread title :D

Regards,
Alex
Ranorex Team