Page 1 of 1

Failed to instrument WPF process

Posted: Thu Jun 28, 2018 7:30 am
by s.knapek
Hi guys,

I am having trobles with the new installtion of the ranorex software. The error message states:
Failed to instrument WPF process. UI element identification capabilities for this window are limited. Could not set-up managed injection endpoint: Could not connect to remoting service: Rx8_Managed_2564. System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: Nie można odnaleźć określonego pliku.
I am using Ranorex 8.1.2 +git.31d95a93,
OS: Windows 7 Professional 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_ldr.170307-1800),
.NET Framewok: 4.7.02053.

Please find Snapshots of the AUT, Ranorex error, and DxDiag attached.

Would you be so kind and help with this issue? The Ranorex can not properly recognize my controls and it's properties. What's more the Ranorex 7.x did not have this problem (on the same machine and AUT). The AUT is .net with wpf and Winforms.

Best regards,
S.

Re: Failed to instrument WPF process

Posted: Thu Jun 28, 2018 7:23 pm
by Support Team
Hi s.knapek,

This is likely a permission related issue since it worked in previous versions of Ranorex. Try the following and see if there is any improvement:
  1. Run Ranorex and your application under test with administrative rights
  2. Disabled Windows UAC
  3. Ensure Ranorex is whitelisted in any installed antivirus software
  4. Ensure Ranorex, your Ranorex Test, and your application under test are all stored on a local non-encrypted drive (no network drives)
If you continue to experience issues, try the other available WPF plugins (WpfOnly & WpfImprovedOnly) and see if you get better object recognition. I highly recommend checking out the below links for more information on the different WPF plugins. Be aware, changing the WPF plugin may break your existing repository objects.
1.png
Furthermore, you can enable Show all elements to ensure these items are not being filtered out. Note, this option should not remain enabled as it is only for troubleshooting. If this resolves the issue, you can adjust the filters to better fit your needs.
2.png
Filters:
3.png
I hope this helps!

Cheers,
Ned

Re: Failed to instrument WPF process

Posted: Fri Jun 29, 2018 7:33 am
by s.knapek
Hi Ned,

Unfortunelty your instructions did not help me.

As for the steps:
1. Run Ranorex and your application under test with administrative rights
2. Disabled Windows UAC
3. Ensure Ranorex is whitelisted in any installed antivirus software
4. Ensure Ranorex, your Ranorex Test, and your application under test are all stored on a local non-encrypted drive (no network drives)
1. Done,
2. Done,
3. Not running any antivir software on my test PC,
4. Done.

The issue still occurs.

I also tried all the diffrent WPF plugins as you instracted, which did not help in my case.

The worst part is: when I just rolled back to Ranorex 8.0.1 and it is working like a charm (on the same test PC). The problem is that, I need TestRail integrestion of the new version...

Any more ideas of what could cause this?

S.

Re: Failed to instrument WPF process

Posted: Tue Jul 03, 2018 7:42 pm
by Support Team
Hi s.knapek,

I am sorry to hear you are still experiencing issue despite trying the recommended troubleshooting steps. I think a remote session may be the next best course of action at this point. Please create a new support ticket with your availability for a remote session (including time zone) and a link to this forum thread as a reference and we will be happy to further investigate this issue. Thank you in advance!

Kind Regards,
Ned

Re: Failed to instrument WPF process

Posted: Sun Aug 26, 2018 6:50 pm
by naveenkumar narra
I would like to know is this problem solved and if solved what is the solution applied because am facing the same exception with my application.

Re: Failed to instrument WPF process

Posted: Mon Aug 27, 2018 9:39 pm
by Support Team
Hi Naveenkumar,

For this specific support case, we reached a point where we needed the application under test to further investigate, however, the customer was not able to share it at the time and the case closed due to no response from the customer.

If the above recommendations did not resolve your issue, please make a new support query and we will be happy to further investigate this issue you are experiencing. If you do make a ticket, please reference this forum thread in the message.

Kind Regards,
Ned

Re: Failed to instrument WPF process

Posted: Fri Aug 31, 2018 9:00 am
by Jonas
I ran into a similar problem like described in this thread. I had some test cases that were working perfectly fine on an older Ranorex version but stopped working at some point. In my case I managed to get it working so hopefully this can be helpful to some of you who have similar problems.

We have a setup where we build Ranorex test cases into an exe file that then run on our build server. What happend was that this stopped working at some point, however I was still able to run locally in Ranorex Studio and remotely (on the agent which build server uses) from within Ranorex Studio. But builds would still fail with this error:
Failed to instrument WPF process. UI element identification capabilities for this window are limited. Could not set-up managed injection endpoint: Could not connect to remoting service: Rx8_Managed_2836. System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.

Server stack trace:
at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Ranorex.Core.IpcRemotingService.IPingable.Ping()
at Ranorex.Core.Injection.DotNetThingy.GetInstance(Int32 pid) InnerException:
Process: 'SoftwareUnderTest' (pid 2836)
The following website provides more information on this technology limitation:
https://www.ranorex.com/help/v8.0/techn ... eason#2:.1
(This message is only shown once per report.)
The solution which worked for me was to ensure the same Ranorex DLLs were used on the build server as I had locally. I turned out that the build used old Ranorex DLLs (likely from Ranorex 8.0) while Ranorex was using Ranorex 8.1.1+git.4526ebf7 DLLs. My guess would be that after updating my test cases they were no longer compatible with the older DLLs that were used on the build server.

Re: Failed to instrument WPF process

Posted: Fri May 22, 2020 2:32 pm
by anuprout007
I am facing a similar issue. Whenever i am trying the inspect the Table cell element of my application in Ranorex 9.2 Spy, i am getting the below message in the overlay,

Failed to instrument WPF process. UI element identification capabilities for this window are limited.
Exception while setting-up managed injection endpoint: System.Threading.ThreadAbortException: Der Thread wurde abgebrochen.
bei System.Number.FormatInt32(Int32 value, String format, NumberFormatInfo info)
bei System.String.Concat(Object arg0, Object arg1)
bei Ranorex.Core.Injection.DotNetThingy.GetInstance(Int32 pid)
bei Ranorex.Core.Injection.DotNetThingy.TryGetInstance(Int32 pid, Int32 tryCount)
bei Ranorex.Core.Injection.Injector.InjectManagedEndpoint(IntPtr targetWindow, InjectionFlags activeHacks)
bei Ranorex.Plugin.WpfFlavor.InjectWpf(IntPtr hwnd, Int32 pid)
Process: 'TraceiT.WNUI.STARTUP.Client' (pid 7968)

Navigation link: https://www.ranorex.com/help/v9.0/inter ... #DotNetWPF

If you could hellp me on this, it would be very helpful.

Re: Failed to instrument WPF process

Posted: Mon May 25, 2020 12:23 pm
by foals11
Hi,

At first, I would suggest downloading and installing Ranorex 9.3.1: https://www.ranorex.com/download-archive/
What's more, do you execute Ranorex Studio and your application as admin?

regards

Re: Failed to instrument WPF process

Posted: Tue May 26, 2020 8:05 am
by anuprout007
Yes i do run it as admin. I will try having 9.3.1 installed and try there but with 9.2 is there any issue or workaround

Re: Failed to instrument WPF process

Posted: Tue May 26, 2020 8:13 am
by odklizec
Hi,

It's impossible to tell what's wrong without seeing the app under test. So I would suggest to first try 9.3.1. If it fixes your problem, then you have the answer. There is no publicly known WPF-related issue in 9.2, but you may newer know? It's always best to use most recent Ranorex version, instead of the obsolete one ;)

If updating Ranorex does not help, then you may need to contact Ranorex support and request a remote session with them, so they may analyze the issue directly on your PC.

BTW, check if you tried these steps:
- make sure the app under test is white listed
- try to reproduce the problem on another PC
- make sure that there are installed all system requirements:
https://www.ranorex.com/help/latest/ran ... uirements/
Usually, all system requirements are installed automatically with Ranorex, but in some cases, it may be required to reinstall them manually.