XamlParseException After upgrading from v4 to v6

Ask general questions here.
IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

XamlParseException After upgrading from v4 to v6

Post by IanKnight » Mon Jan 23, 2017 2:24 pm

Hi,

I am just starting the process of upgrading all of our Ranorex projects from v4.2 to v6.2.1.

The first issue I have encountered is with WPF where when searching for an object I get the following error -

System.Windows.Markup.XamlParseException: Creating an instance of the COM component with CLSID {7AB36653-1796-484B-BDFA-E74F1DB7C1DC} from the IClassFactory failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). ---> System.UnauthorizedAccessException: Creating an instance of the COM component with CLSID {7AB36653-1796-484B-BDFA-E74F1DB7C1DC} from the IClassFactory failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

This works with no issue in v4 so must be a v6 specific issue or an upgrade issue.

I would appreciate any help in resolving this as we will not be able to upgrade to v6 until it is sorted out.

Even if you suggest reviewing our code, we still need to know where to start reviewing given that this isn't an issue using v4 of Ranorex.

Thanks
Attachments
xamlparse_201701231321_v2.jpg
xamlparse_201701231321_v2.jpg (125.33 KiB) Viewed 702 times

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

Re: XamlParseException After upgrading from v4 to v6

Post by odklizec » Tue Jan 24, 2017 10:11 am

Hi,

Could you please confirm if the same error appears on different PC? I guess that there is something corrupted on your PC, which makes Ranorex 6 somewhat incompatible with your actual system? I would suggest to reinstall .Net and required runtime libs.

Also, does it happen both in debug and release mode? And finally, please make sure both Ranorex and the AUT is started with the same user rights (ideally, run them both as admin).

BTW, if the problem happens in Debug mode, please make sure the Target CPU is set to 32bit. Ranorex 6 cannot debug 64bit apps!
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

IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Re: XamlParseException After upgrading from v4 to v6

Post by IanKnight » Mon Jan 30, 2017 1:08 pm

Hi,

Thanks for the reply.

I have now discovered that this only affects Windows 10 machines, our Windows 7 and 8 machines run the same test on the same test environment without a problem.

The machines are configured the same, apart from the OS obviously, and all have been running the same tests without an issue for some time until the upgrade.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: XamlParseException After upgrading from v4 to v6

Post by krstcs » Mon Jan 30, 2017 3:58 pm

I'm running on Windows 10 without any issues. My guess is that your .NET install may be incorrectly installed or corrupted.
Shortcuts usually aren't...

IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Re: XamlParseException After upgrading from v4 to v6

Post by IanKnight » Mon Jan 30, 2017 4:37 pm

We have done some more testing and combinations and it appears to be an incompatibility with a spell checker component in .net 4.6.1 which is only available on Windows 10.

If we run the same tests using all the same versions and method on a Windows 7 or 8 machine there is no error.

https://connect.microsoft.com/VisualStu ... erent-user

We encounter the issue when running the test remotely, as we have done for a couple of years without issue. Our system uses PSEXEC to start the test suite runner on the remote machine. PSEXEC takes a username and password parameter, and if we match that to the user logged on to the remote machine then things work ok, if the PSEXEC user does not match the logged on user the application fails.

This is, on the surface, a workaround to the problem, but our system finds an available machine in the pool and we won't know which machine until the test runs and we can't work out which user is logged on using PSEXEC so we would have to hard code users and machines into the code that controls this which is not ideal by any means.

Our developers are going to see if they can use a different component, but I think we can eliminate Ranorex as the cause as I can now reproduce the error using v4 and v6 test suite runners, only on Windows 10 machines with this new component.