-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playwright process connection in container fails when proxy is set .. client_channel/lb_policy/pick_first/pick_first.cc","file_line":397,"grpc_status":14 #1037
Comments
Most likely you are experiencing same issue as in here: #599 (comment) |
This case host where docker is running indeed enforces proxy, it is required for outside connections. However, I have not found a way to make it work with Browser. "@599... grpc seems to use this proxy even for localhost. Explicitly unsetting http(s)_proxy solved the problem for me..". Even though there is env setting "no_proxy=no_proxy=.nnn.com,0.0.0.0,127.0.0.1,.nnnn.local" I guess gprc-connection in container probably omits it. I'd need a solution with proxy set and containerized RF/Browser connecting successfully. |
Your no_proxy environment variable should include localhost. If there's nothing else on that list, then gRPC has had some issues recognizing the no_proxy variable, but that should be fixed: Modifying playwright.py on lines 108 & 125 should also have the same effect: |
Thx ! It worked :-) |
We should implement @notKonU suggested change |
Just checking if this is now implemented of workaround suggested above export no_proxy=localhost is required? This was working fine till recently for me. |
I have the same issue as discribed here in my builded Docker image.
With robotframework-browser 15.0.0 the Problem is still there. I tried "no_proxy=localhost" with no luck. |
Interestingly, I needed to do (Or rather, |
I tried your Suggestion with "127.0.0.1", but no change. |
I have Tried the Suggestion with the latest Version 16.1.0.. |
(Blowing away the dust 💨) |
I don’t recall any changes in this matter. But I have not looked deeply on the gRPC side, would it offer easy solution for this. Perhaps there is an flag when we setup the services that could be used. |
I also asked Robocorp to allow |
When running test in a container - and when there are proxy-settings in the environment - Browser systematically fails to connect with Playwright. Test passes in host with proxies set
export http_proxy http://proxy-xxxx:8080
export https_proxy http://proxy-xxxxxxx:8080
The following keep repeating in the trace:
<_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "failed to connect to all addresses" debug_error_string = "{"created":"@1622469263.764339400","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":5419,"referenced_errors":[{"created":"@1622469263.764108500","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":397,"grpc_status":14}]}" >
If env proxy settings are removed, Browser connects to Playwright and test proceeds, but in absence of proxy test cannot connect URL and thus fails by Playwright timeout.
Doing these for npm does not help to get thru..
npm config set proxy xxxx
npm config set https-proxy xxxx
To Reproduce
Steps to reproduce the behavior:
Run prebuilt marketsquare/robotframework-browser container image
docker run -it -v ${pwd}:/home/jenkins/tests:rw -v ${pwd}/report:/home/jenkins/report:rw marketsquare/robotframework-browser /bin/bash
Proxy settings are added to env (This is required in the domain host is running)
export https_proxy=http://proxy-xxxxx:8080
export http_proxy=http://proxy-xxxxx:8080
Simple test is launched by robot -L TRACE test.robot
<test.robot>
*** Settings ***
Library Browser
*** Test Cases ***
Starting a browser with a page
New Browser chromium headless=true
New Context viewport={‘width’: 1920, ‘height’: 1080}
New Page https://marketsquare.github.io/robotframework-browser/Browser.html
Get Title == Browser
root@e2794c33c434:/home/jenkins/tests# robot -L DEBUG test.robot
==============================================================================
Test
==============================================================================
[ ERROR ] Calling method '_start_suite' of listener 'Browser' failed: Could not connect to the playwright process at port 45797.
[ ERROR ] Calling method '_start_test' of listener 'Browser' failed: Could not connect to the playwright process at port 57861.
Starting a browser with a page | FAIL |
Expected behavior
Expect client_channel to connect even if there is a proxy setting in the environment
** version information **
pwuser@4de0d08e255c:/home/jenkins/tests$ pip list |grep robot
robotframework 4.0.1
robotframework-assertion-engine 0.0.6
robotframework-browser 5.0.0
robotframework-pythonlibcore 2.2.1
pwuser@4de0d08e255c:/home/jenkins/tests$ npm --version
6.14.12
pwuser@4de0d08e255c:/home/jenkins/tests$ npm list |grep grp
+-- @grpc/[email protected]
+-- [email protected]
pwuser@4de0d08e255c:/home/jenkins/tests$ pip list |grep grpcio
grpcio 1.37.1
grpcio-tools 1.37.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: