Browserinit fails in Azure Devops

Hi all,

I’m trying to install and initialize the Browser Library in Azure Devops.

In my YAML file I use:

- script:
    rfbrowser init

The error message I’m getting is not very helpful to me:

Traceback (most recent call last):
File “/opt/hostedtoolcache/Python/3.7.12/x64/bin/rfbrowser”, line 8, in
sys.exit(run())
File “/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/Browser/entry.py”, line 237, in run
rfbrowser_init(args.skip_browsers)
File “/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/Browser/entry.py”, line 53, in rfbrowser_init
raise error
File “/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/Browser/entry.py”, line 45, in rfbrowser_init
_rfbrowser_init(skip_browser_install, install_file)
File “/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/Browser/entry.py”, line 155, in _rfbrowser_init
+ f"Node process returned with exit status {process.returncode}"
RuntimeError: Problem installing node dependencies.Node process returned with exit status 1
##[error]Bash exited with code ‘1’.
##[section]Finishing: CmdLine

Has anybody got an idea how to solve this?

Hi, maybe first clean dependencies on browser’s nodes and binaries:
command: “rfbrowser clean-node”

ow and for the installation in Azure you need the “NodeTool” that you can added to your yaml.
That works fine for me.

It turned out that we were using the wrong node.js version (to old).

This yaml works:

- task: NodeTool@0
  inputs:
    versionSpec: '16.x'
  displayName: 'Installing Node.js'

- script:
    pip install --upgrade pip
    pip install -r requirements.txt
  displayName: 'Installing RF tool stack'

- script:
    rfbrowser init
  displayName: 'RF Browser init'

Thanks for your input!

1 Like