Katalon Studio behind Proxy is unable to open browser on BrowserStack

**OS : **Windows 7

Katalon Studio Version : 5.3.1

**## Katalon Studio logs: **

Windows (\config\.metadata\.log) is attached

## Environment (for Web testing)

Browser : Remote (Windows 10, Chrome 62.0) on BrowserStack

## Environment (for Mobile testing)

N/A

## Steps to reproduce -

  1. I created my Browser Stack account, got Username and Access Key.

  2. My PC at work is located behind HTTP Proxy, so I set Proxy for Katalon Studio. see the attached image:

  3. In my Katalon project, I added definition of a Remote browser using my BrowserStack credential. See the attached image:

## Actual Behavior -

When I ran my Test Suite with Remote browser, I got a FAILURE:

Unable to open browser with url: '' (Root cause: org.openqa.selenium.remote.UnreachableBrowserException:Could not start a new session. Possible cause are invalid address of the remote server or browser start-up failure.

**
## Expected Behavior -
**
I run the same test project on the same PC using local FireFox browser, it ran SUCCESS.

I tried to run the same project on another PC which is NOT behind the Proxy. The test ran SUCCESS. See the attached:
I changed my Proxy setting from “Manual Proxy Configuration” to “Use system proxy configuration” and tried. I got the same result.

## I think

As Browserstack’s documentation [“Running tests from behind a proxy”](Run Selenium tests with Java | BrowserStack Docs) sais, I think Katalon Studio behind Proxy seeds to do this:

System.getProperties().put("http.proxyHost", "<HOST>");
System.getProperties().put("http.proxyPort", "<PORT>");

But Katalon Studio seems not doing this.

I would request Katalon Team to look as this problem.

---------------------------------------------------------------------------------

In my job we are interested in testing on multi-versions of browsers. The combination of Katalon Studio and Browserstack looks promising for me. But our companies policy requires us stay behind Proxy. Therefore I strongly require the above problem to be fixed a.s.a.p.

## Screenshots / Videos

see above.

.log

Windows_KatalonStudioPreference_Katalon_Proxy.PNG

ProjectSettings_Execution_Default_WebUI_Remote.PNG

KatalonStudioUnableToOpenBrowser_UnreachableBrowserException.PNG

ă‚čクăƒȘăƒŒăƒłă‚·ăƒ§ăƒƒăƒˆ 2018-03-30 21.01.36.png

3 Likes

Is your web application a local / staging or just a production server?

1 Like

I am looking at our production server exposed to the Internet. BrowserStack should be able to get access to it directly without intervening proxy etc.

Let me draft the configuration:

My PC --> Http Proxy --> BrowserStack --> Our production Web App

1 Like

https://stackoverflow.com/questions/34846014/using-selenium-remotewebdriver-behind-corporate-proxy

This post in the Stackoverflow seems desribing how a Java App (Katalon Studio) can connect to a selenium grid such as BrowserStack via RemoteWebDriver from behind a corporate proxy.

2 Likes

I have been struggling with this issue. I want to it clear if I could make any workaround for myself. I have studied the code described by the StackOverflow 34846014 post I mentioned above, and understood the mechanism of org.openqa.selenium.remote.RemoteWebDriver class.

Now I want to ask a question to someone (Katalon Team, of course) who has immediate access to the Katalon Studio source code. I would be grateful if you reply to my question; I am aware that Katalon Studio is not an OSS product.

I believe that Katalon Studio calls org.openqa.selenium.remote.RemoteWebDriver object to communicate with “Remote” browser. According to the API document, it has 5 signatures of constructor:

  1. public RemoteWebDriver(Capabilities desiredCapability)
  2. public RemoteWebDriver(CommandExecutor executor, Capabilities desiredCapabilities)
  3. public RemoteWebDriver(CommandExecutor executor, Capabilities desiredCapabilities, Capabilities requiredCapabilities)
  4. public RemoteWebDriver(URL remoteAddress, Capabilities desiredCapabilities)
  5. public RemoteWebDriver(URL remoteAddress, Capabilities desiredCapabilities, Capabilities requiredCapabilities)

Which signature of constructor is Katalon Studio ver5.3.1 invoking in order to instantiate a RemoteWebDriver? 
 I guess it uses #4. Am I right?

1 Like

This issue is still outstanding for me. I haven’t got any favorable solution yet.

My PC sits behind the cooperate proxy. When I run my test case selecting Remote Browser directed to the Browserstack URL, the Katalon Studio fails to find the hostname of URL of Browserstack. The message indicates that Katalon Studio tried to make a HTTP request to the URL WITHOUT setting proxy information.

The following figure shows what I guess.

(1) On my PC when I run a test selecting local Firefox browser, Katalon App calls Selenium server to talk to Firefox. The Katalon App informs Firefox browser of the Cooperate Proxy’s address and port.

(2) Firefox browser starts HTTP session to the Target Web App through the Cooperate Proxy. The session successfully goes through the Proxy. Test case runs.

(3) If I do NOT have a Proxy, Katalon app can call the Selenium server running on the remote server (Zalenium or Browserstack). I have ever tried it and got success.

(4) On the remote server (Zalenium or Browserstack) the Selenium server process runs. The Selenium server accepts HTTP request from my Katalon studio for activating remote browser.

(5) On the contrary, if I sit behind the cooperate proxy, the Katalon app fails to communicate with the remote Selenium server. Why? ---- Katalon Team has explained very little. All they said is “Remote Browser is not supported”. I would rephrase this: “Katalon Studio does not support communicating with Remote Selenium server over Proxy”.

Let me tell you what I presume. Katalon app is coded with assumption that it can communicate with the Selenium server without Proxy in between.

This naive assumption holds true in the case of (1) where the Selenium server is running locally on my PC. However it does not necessarily true in the case of (3) and (5) where the Selenium server is running on a remote server. There may be or may not be a proxy. If there isn’t =(3), you would be happy. If there is =(5), you would be annoyed.

Even if I have set the Proxy address and port at the menu Window>Katalon Studio Preferences>Katalon>Proxy, the Katalon app does not use it for communicating with the Selenium server.

Why the Katalon app does not (yet) support Proxy in between the local PC and the remote Selenium servers? — I don’t know. Ask Katalon.

----------------------------------------------------------------------------------------------------------------------------

My advise to Katalon users behind proxy who want to use Zalenium/Browserstack

Get out of your cooperate proxy barrier. Go home, or run Katalon Studio on AWS EC2, or find a new job without proxy annoyance.

----------------------------------------------------------------------------------------------------------------------------

Additional discussion.

A few people behind cooperate proxy want to use remote Selenium Grid (Zalenium, Browserstack). They are discussing how to set proxy information.

I am afraid that their efforts would not be successful. Because the DesiredCapabilities set to the remote browser (see (6) in the above figure) has nothing to do with the communication between the Katalon Studio app and the remote Selenium server (see (5) in the above figure).

RemoteBrowserProxy1.png

1 Like

We’ve added a ticket for it. It will be considered for efforts to fix it in later releases.

Regards

2 Likes

Hi - Any updates on this issue. I just met this issue in our project. Could you please update whats happening with this. it seems to be this is blocker whoever using Katalon in automating behind the proxy.

No resolution done yet.

Just an idea how to workaround:

1 Like

Vinh Nguyen said:

We’ve added a ticket for it. It will be considered for efforts to fix it in later releases.

Regards

Hi Vinh,

Any update on this? In which Katalon release this will be fixed?
To be honest with you, this is very much required in our organization as we have huge cross-browser testing requirements. also, this fix will be more useful for other people as well. Pushing this ticket to next release will be a great help.

Thanks

3 Likes

Vinh Nguyen said:

We’ve added a ticket for it. It will be considered for efforts to fix it in later releases.

Any updates??

Any updates on this ticket??..it quite blocking!

Any updates on this? It’s really blocking us from using Katalon Studio. Also is there any way to distribute our test in multiple machines?? like Selenium Grid, register the nodes with hub and start executing the tests on multiple machines. These are the two main features, which will make automation more effective. Please provide updates.

1 Like

Hi All, we are also stuck on the same. We raised a ticket also. Any latest on this thread ?

Just to link the info.

BETA release 5.10.4 covered this issue, which was recorded as katalon-studio/issues/51

I am going to check it if this issue has been fixed or not.

1 Like

Is this issue fixed in 5.10.4? I have had downloaded the latest version 6.0.4 and tried to execute scripts in sauce labs but still no luck. Same exception, Browser Not reachable exception.
Below are the capabilities i’m using

  1. platform : Windows 8.1
  2. browserName : Chrome
  3. browserVersion : 71.0
  4. chromedriverVersion : 2.15
  5. seleniumVersion : 2.15.0
    I’m a doing wrong some where? or still this issue exists?
    Note : I’m behind corporate proxy.

@sandeepteja, thank you for your report. The issue is expected to be fixed since 5.10.4. Somehow, the fix still does not work for you. We will investigate this and inform you soon.

1 Like

@huynguyen, thanks for your reply, i will be looking for your reply at the earliest, as it is blocking us from a major release/execution.

@sandeepteja, could you please paste the whole log with exception here? We will have more clues to investigate the issue.
Regards.

1 Like

@huynguyen, I’m afraid I wouldn’t be able to copy/paste the complete log, as such activity is restricted in our organization. Hope you understand. But I can type the error is required.