Failed to instrument WPF process

Bug reports.
s.knapek
Posts: 2
Joined: Thu Jun 28, 2018 7:13 am

Failed to instrument WPF process

Post by s.knapek » Thu Jun 28, 2018 7:30 am

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.
Attachments
RanorexError.txt
Ranorex Error
(1.57 KiB) Downloaded 8 times
DxDiag.txt
DxDiag of test PC
(37.88 KiB) Downloaded 7 times
TestSnapShot2.rxsnp
Snapshot UAT
(193.78 KiB) Downloaded 9 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Failed to instrument WPF process

Post by Support Team » Thu Jun 28, 2018 7:23 pm

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
1.png (62.97 KiB) Viewed 375 times
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
2.png (10.04 KiB) Viewed 375 times
Filters:
3.png
3.png (19.18 KiB) Viewed 375 times
I hope this helps!

Cheers,
Ned
.
Image

s.knapek
Posts: 2
Joined: Thu Jun 28, 2018 7:13 am

Re: Failed to instrument WPF process

Post by s.knapek » Fri Jun 29, 2018 7:33 am

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Failed to instrument WPF process

Post by Support Team » Tue Jul 03, 2018 7:42 pm

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
.
Image

naveenkumar narra
Posts: 1
Joined: Mon Aug 13, 2018 9:11 pm

Re: Failed to instrument WPF process

Post by naveenkumar narra » Sun Aug 26, 2018 6:50 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Failed to instrument WPF process

Post by Support Team » Mon Aug 27, 2018 9:39 pm

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
.
Image

Jonas
Posts: 1
Joined: Fri Aug 31, 2018 8:46 am

Re: Failed to instrument WPF process

Post by Jonas » Fri Aug 31, 2018 9:00 am

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.