rpaframework
rpaframework copied to clipboard
Environment is recreated all the time when Browser is run headless
I have the following code, that I try to run headless:
New Browser chromium
# headless=false
New Context httpCredentials={'username': '%DEV_USER', 'password': '%DEV_PW'}
New Page %{SERVER_URL}
At the end of the run, the following is displayed:
On the next run, the environment is recreated, which obviously takes a lot of time. I checked the modified directory and when the code is run headless, a debug.log file is created in that chrome-win folder. When run headless false, the debug.log is not created and environment is not built again.
Debug.log contains the following 2 lines:
[0610/133159.321:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader
[0610/133159.370:ERROR:command_buffer_proxy_impl.cc(126)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
conda.yaml is:
channels:
# Define conda channels here.
- default
- conda-forge
dependencies:
# Define conda packages here.
# If available, always prefer the conda version of a package, installation will be faster and more efficient.
# https://anaconda.org/search
- python=3.8.6
- nodejs=14.15.4
- pip=21.1.2
- pip:
# Define pip packages here.
# https://pypi.org/
- rpaframework==10.2.0 # https://rpaframework.org/releasenotes.html
- robotframework-browser==5.0.1
- robotframework-pabot==1.13
rccPostInstall:
- rfbrowser init
I think the log creation happens upstream inside chromium, but I can see if we can suppress the log output somehow. There's also the option of ignoring things inside rcc.
Just out of curiosity, how long does it take to "recreate" the env in this case? It should be limited to copying local files around
I checked and it takes each times around 5 minutes to recreate.
According to the release of the latest library version 23.2.0, your problem might be already solved, please try again with this conda.yaml and let us know if it still replicates:
channels:
# Define conda channels here.
- conda-forge
dependencies:
# Define conda packages here.
# If available, always prefer the conda version of a package.
# Installation will be faster and more efficient.
# https://anaconda.org/search
- python=3.9.13
- nodejs=16.14.2
- pip=22.1.2
- pip:
# Define pip packages here.
# https://pypi.org/
- robotframework-browser==16.2.0
- rpaframework==23.2.0 # https://rpaframework.org/releasenotes.html
rccPostInstall:
- rfbrowser init