Ranorex Spy exception (Failed to write to an IPC Port: The pipe is being closed.)

Bug reports.
eadan
Posts: 1
Joined: Mon Jan 13, 2020 1:59 pm

Ranorex Spy exception (Failed to write to an IPC Port: The pipe is being closed.)

Post by eadan » Mon Jan 13, 2020 2:05 pm

I have a C# WPF application (attaching a simple demo app) that is using the following code:

Code: Select all

                var channel = new IpcServerChannel("someName");
                ChannelServices.RegisterChannel(channel, true);
and

Code: Select all

                RemotingConfiguration.RegisterWellKnownServiceType(typeof(TObjectType), "someUrl",
                    WellKnownObjectMode.SingleCall);
When trying to use Ranorex Spy to capture WPF elements, we are receiving the following error:

Code: Select all

Failed to instrument WPF process. UI element identification capabilities for this window are limited.
Exception while initializing WPF proxy: System.Runtime.Remoting.RemotingException: Failed to write to an IPC Port: The pipe is being closed.
Is this a bug? if not, what are we doing wrong?

Thanks
Eadan
Attachments
WpfApp14.zip
(306.76 KiB) Downloaded 13 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6016
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex Spy exception (Failed to write to an IPC Port: The pipe is being closed.)

Post by odklizec » Tue Jan 14, 2020 8:27 am

Hi,

Have you tried to run Spy/Studio as Administrator? Also, which Ranorex version do you use?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6016
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex Spy exception (Failed to write to an IPC Port: The pipe is being closed.)

Post by odklizec » Tue Jan 14, 2020 9:35 am

Hi again,

I checked the app you posted and after some research I found this post:
http://www.windows-tech.info/13/8db2a922d4ddd2d4.php

Basically, it suggests to replace...

Code: Select all

ChannelServices.RegisterChannel(channel, true);
with...

Code: Select all

ChannelServices.RegisterChannel(channel, false);
The good news is, that it really eradicates the error "Failed to write to an IPC Port)". The bad news is, that there is thrown another instrumentation error (no matter the Spy is started as Admin or used with different WPF related or bitbridge settings)...

Code: Select all

Could not set-up managed injection endpoint: DotNet Core CLR bootrapping error
And I believe, that this is a Ranorex "own" error message. In other words, I think it's definitely something that should be checked, and eventually fixed, by Ranorex folks? Please create a support query via this form:
https://www.ranorex.com/support-query/
Don't forget to upload your sample and eventually provide a link to this post. Let's hope that Ranorex folks will find the cause of the problem ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration