rpaframework icon indicating copy to clipboard operation
rpaframework copied to clipboard

Environment is recreated all the time when Browser is run headless

Open adrian-evo opened this issue 3 years ago • 2 comments

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: image

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
  

adrian-evo avatar Jun 10 '21 10:06 adrian-evo

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

osrjv avatar Jun 10 '21 12:06 osrjv

I checked and it takes each times around 5 minutes to recreate.

adrian-evo avatar Jun 11 '21 06:06 adrian-evo

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

cmin764 avatar Jun 02 '23 03:06 cmin764