Solved - Ranorex was unable to start the 32/64 Bit Bridge

Ask general questions here.
benny28
Posts: 34
Joined: Thu May 31, 2012 4:48 pm
Location: London
Contact:

Solved - Ranorex was unable to start the 32/64 Bit Bridge

Post by benny28 » Thu Feb 06, 2014 6:03 pm

When I look inside the installed Bin folder:C:\Program Files (x86)\Ranorex 4.1\Bin
I can see 'Ranorex.BitBridge32.exe' but no 'Ranorex.BitBridge64.exe' which the error message is failing to find.

I'm running my test suite on a Win 7 64bit machine (.Net 4.5). The first couple of steps in my test pass.
i.e.
Launch Application
Click on menu bar.

But then when I try to access inside the application the below error is returned.

Code: Select all

[2014/02/06 16:40:53.604][Warn   ][Win32]: The automating and the automated process do not have the same bit width and Ranorex was unable to start the 32/64 Bit Bridge. UI element identification capabilities for controls in that process are limited.
(Detailed error message: Ranorex.RanorexException: Failed to find BitBridge executable 'Ranorex.BitBridge64.exe'.
   at Ranorex.Plugin.CommonControlsFactory.ComputeBridgePath(Boolean x86)
   at Ranorex.Plugin.CommonControlsFactory.RunBridge(Boolean x86, Process& bridgeProcess, String& errorMessage))
The following website provides more information on this technology limitation:
http://www.ranorex.com/support/user-guide-20/technology-instrumentation/general-troubleshooting.html#c3252
I see this error when running my project with MsTest via cmd and VS.
But when I record the sequence via Ranorex Studio it work correctly.

Is there some additional code that Studio implements that I'm missing from my framework created in VS?
Last edited by benny28 on Wed Feb 12, 2014 12:51 pm, edited 1 time in total.

benny28
Posts: 34
Joined: Thu May 31, 2012 4:48 pm
Location: London
Contact:

Re: Ranorex was unable to start the 32/64 Bit Bridge

Post by benny28 » Fri Feb 07, 2014 3:18 pm

Reading this troubleshooting page:
http://www.ranorex.com/support/user-gui ... html#c3252

... would suggest 'Enable the 32/64 Bit Bridge in the General Ranorex Settings.'.

Do you have code/method to allow me do this outside of the Studio env (i.e. in a VS project) ?


Reason #2:
The automating and the automated process do not have the same bit width and Ranorex was unable to start the 32/64 Bit Bridge. UI element identification capabilities for controls in that process are limited.

Solution:
Please contact Ranorex support team for further assistance.

Reason #3:
The automating and the automated process do not have the same bit width and the 32/64 Bit Bridge is disabled. UI element identification capabilities for controls in that process are limited.

Solution:
Enable the 32/64 Bit Bridge in the General Ranorex Settings.

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

Re: Ranorex was unable to start the 32/64 Bit Bridge

Post by Support Team » Fri Feb 07, 2014 4:59 pm

Hi benny28,

Yes it is possible to enable the BitBridge in VS.

To enable BitBridge via code use:
Ranorex.Core.Configuration.Current.Plugins.Win32.EnableBitBridge = true;
kind regards,

Markus
.
Image

benny28
Posts: 34
Joined: Thu May 31, 2012 4:48 pm
Location: London
Contact:

Re: Ranorex was unable to start the 32/64 Bit Bridge

Post by benny28 » Fri Feb 07, 2014 5:42 pm

Thanks Markus

Does this need to called located within a specific method name?
Similar to 'public static void ApplicationRunSpeed()' which I have in a root config file.
Or maybe even within a [Before] hook?

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

Re: Ranorex was unable to start the 32/64 Bit Bridge

Post by Support Team » Mon Feb 10, 2014 5:11 pm

Just add this line of code in your public static int main method
e.g.:

Code: Select all

public static int Main(string[] args)
        {
            // Uncomment the following 2 lines if you want to automate Windows apps
            // by starting the test executable directly
            //if (Util.IsRestartRequiredForWinAppAccess)
            //    return Util.RestartWithUiAccess();

            Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
            int error = 0;
            Ranorex.Core.Configuration.Current.Plugins.Win32.EnableBitBridge = true;
            try
            {
                error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);
            }
            catch (Exception e)
            {
                Report.Error("Unexpected exception occurred: " + e.ToString());
                error = -1;
            }
            return error;
        }
Regards,

Markus (S)
.
Image

benny28
Posts: 34
Joined: Thu May 31, 2012 4:48 pm
Location: London
Contact:

Re: Ranorex was unable to start the 32/64 Bit Bridge

Post by benny28 » Wed Feb 12, 2014 12:51 pm

Thanks for the response Support Team.

EnablingBitBridge = true; did not resolve my issue so I had to continue digging. I knew that my framework was working correctly on my previous Dev machine. It also worked via Ranorex Studio. But not on my new Dev machine which had a new image (closer to a Live machine).

Anyhow the solution was to reference the x64 DLL's instead of x86 which I had previously referenced (although my previous machines were x64 also). All's good now :)

DIVKON
Posts: 2
Joined: Thu Mar 06, 2014 3:42 am

Re: Solved - Ranorex was unable to start the 32/64 Bit Bridge

Post by DIVKON » Thu Mar 06, 2014 4:00 am

Could anyone explain me the steps to reference the x64 DLL's instead of x86?

DIVKON
Posts: 2
Joined: Thu Mar 06, 2014 3:42 am

Re: Solved - Ranorex was unable to start the 32/64 Bit Bridge

Post by DIVKON » Thu Mar 06, 2014 4:03 am

Please explain the steps to reference the x64 DLL's instead of x86

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

Re: Solved - Ranorex was unable to start the 32/64 Bit Bridge

Post by Support Team » Mon Mar 10, 2014 4:40 pm

Hi Divkon,

You can find the x64 Ranorex DLL's here:"C:\Program Files (x86)\Ranorex 5.0\Bin\x64".
To reference them you just need to right click on your "References" folder in Ranorex Studio (Projects View) and to select them after you clicked on the "Browse..." button in the ".Net Assembly Browser" tab.

By the way, why do you want to reference the x64 DLL's?

Regards,
Markus
.
Image

mdgairaud
Posts: 87
Joined: Sun Aug 05, 2012 11:59 am
Location: Bilbao, Spain

Re: Ranorex was unable to start the 32/64 Bit Bridge

Post by mdgairaud » Mon Jun 30, 2014 11:40 am

Support Team wrote:Hi benny28,

Yes it is possible to enable the BitBridge in VS.

To enable BitBridge via code use:
Ranorex.Core.Configuration.Current.Plugins.Win32.EnableBitBridge = true;
kind regards,

Markus

Markus, you make my day... These line of code solved my issue with Chrome and Ranorex :D :D :D
not the same problem as benny28 but the error message was the same.


:mrgreen:

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

Re: Solved - Ranorex was unable to start the 32/64 Bit Bridge

Post by Support Team » Wed Jul 02, 2014 4:13 pm

Hi,

I am glad I was able to help :)!

Regards,
Markus
.
Image