Could not connect to the playwright ptocess

Hi,
I just made a fresh installation of Browser Library according to instruction from Introduction section of https://robotframework-browser.org/

I have run rfbrowser init and tried to run Example. Unfortunately script finished as follow:

==============================================================================
Workspace

Workspace.BrowserLibraryExample

Workspace.BrowserLibraryExample.Example

[ ERROR ] Calling method ‘_start_suite’ of listener ‘Browser’ failed: Could not connect to the playwright process at port 52538.
[ ERROR ] Calling method ‘_start_test’ of listener ‘Browser’ failed: Could not connect to the playwright process at port 52589.
Example Test | FAIL |
Could not connect to the playwright process at port 52640.

Workspace.BrowserLibraryExample.Example | FAIL |
1 test, 0 passed, 1 failed

Workspace.BrowserLibraryExample | FAIL |
1 test, 0 passed, 1 failed

Workspace | FAIL |
1 test, 0 passed, 1 failed

Output: C:\workspace\output.xml
Log: C:\workspace\log.html
Report: C:\workspace\report.html

Can anyone please direct me how I can identify what needs to be done to start using browser library on my machine?

That usually means that there was error during installation. Do you have the output of the rfbrowser init command.

Hi @aaltat . I don’t have any output from my first rfbrowser init. If I run rfbrowser init one more time would such output be helpful?

You need to uninstall first and to be sure delete the installation folder.

most of the time it is because there was an issue with the command rfbrowser init
Could you copy the output of the command ? (sometimes for unknown reason, you need to scroll up in your terminal windows to get the proper output of the command)

I face similar kind of issue last time. I am still searching for some proper solution.

MyFordBenefits

same comment, please provide rfbrowser init output so that we can help

we have been thinking that we should save the last output of the rfbrowser init to a file in a predefined location.

1 Like

i have the same issue when run docker files in stg env. but sucess when run the same docker files in my local machine.

It could be that your node.js version got outdated (see playwright issue 769 ).

In my environment, robotframework-browser logged:

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'worker_threads'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)

Updating node.js fixed the issue.