System.ServiceModel.FaultException encountered trying to launch Chrome using Manager.LaunchNewBrowser()

2 Answers 314 Views
Chrome Execution
Jim
Top achievements
Rank 1
Iron
Jim asked on 02 Dec 2022, 08:43 PM

Hello, 

I am having difficulty running tests using Telerik Testing Framework on a new laptop that was provided by my employer.  The framework works fine on my old machine, but I believe a firewall rule may be interfering with the Framework's ability to communicate to the browser or some kind of proxy.

When my test executes the line Manager.LaunchNewBrowser(configured to use a default browser of Chrome), I get this error:

System.ServiceModel.FaultException : The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.

Server stack trace: 
ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]: 
RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
IBrowserLauncher.LaunchBrowser(ILauncherOptions launchOptions)
HostsProxy.LaunchBrowser(ILauncherOptions launcherOptions)
ChromiumActions.LaunchCDPManagedBrowser(String startUrl, BrowserType browserType, Boolean windowVisible, String pathToBrowserExecutable)
ChromeActions.LaunchNewBrowserInternal(Boolean useExtension, String startUrl, Boolean disableWebSecurity, ProcessWindowStyle windowStyle)
ChromeActions.LaunchNewBrowserInstance(ProcessWindowStyle windowStyle, Manager manager)
Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
Manager.LaunchNewBrowser()
ManagerHook.LaunchBrowserAndBuildScenarioContainer() line 131

If I configure the default browser to FireFox, then the test runner seems to work.

The test runner works with Chrome on my old machine, so that leads me to believe that it is a security issue on my new machine.  I want to approach my tech support with details about what might need to be opened up on the firewall in order for this to work.

Can you provide guidance on what endpoints this might be trying to hit and are getting refused?

Or can you provide guidance on how to get more details about this FaultException? 

Thank you!

 

2 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 06 Dec 2022, 02:12 PM

Hi JIm,

There are few assumptions from my side, so correct me for any of these if necessary: 

  • the Chrome and Edge browsers are set to run without using the extension;
  • the Testing Framework version is not the latest available - there was a release last week; 

So, this error is related to an issue with starting the Chrome or Edge browser for first time in the extension-less mode. We have addressed this with our latest release.

So, the number one option to resolve the error is to iInstall the latest available version of the Testing Framework. If, for any reason, you cannot perform the upgrade straight away, you can set the browsers to run with the extensions - Manager.Settings.Web.UseBrowserExtension = true;.

Don't hesitate to get back to me in case of any follow up questions on the topic. Thank you for your cooperation in advance.

Regards,
Elena
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Jim
Top achievements
Rank 1
Iron
answered on 14 Dec 2022, 10:56 PM

Hi Elena, 

I have Testing Framework 223.10.13.0 installed.  I am having difficulty finding the release history for Testing Framework, I can find the Release History of Test Studio, are they one and the same?

Release History of Test Studio Automated Testing Software | Telerik

Anyway, setting the setting Manager.Settings.Web.useBrowserExtension = true fixed the problem for me.  It is a bit strange that I never needed to add this line of code before.  Perhaps something changed with the default behavior of the "evergreen" web browsers that required me to add this?  

Elena
Telerik team
commented on 16 Dec 2022, 11:17 AM

Hi Jim, 

The Testing Framework could be considered as the base layer of Test Studio, so the release notes are for both products. The version you mentioned is not the latest one - there is one more after it and you should be able to see it in your Telerik account here

The workaround in the current installed version you have is to set the mentioned setting to true so that the browsers run with the extension.

This version 223.10.13.0 is also the first where the default setting is to use the browsers without extension and you hit that error and found out that there are options for this at all. 

So, if you install the latest available version you can skip using the extension for Chrome and Edge, or in other words remove that line of code I shared, and run the tests without the need of additional extension. 

I hope this information helps you sort out your doubts. Let me know if you have further questions.

Regards,
Elena

Tags
Chrome Execution
Asked by
Jim
Top achievements
Rank 1
Iron
Answers by
Elena
Telerik team
Jim
Top achievements
Rank 1
Iron
Share this question
or