Errno: -4058, with rfbrowser init

Hello, i have a problem with rfbrowser init.

it seems , it can’t download chromium.

2024-11-15 17:33:25,543 [INFO    ] ==============================================================================================================

2024-11-15 17:33:25,543 [INFO ] Installing node dependencies…
2024-11-15 17:33:27,046 [INFO ] Installing rfbrowser node dependencies at c:\Users\user\ROBOT\jdc-test-auto.venv\Lib\site-packages\Browser\wrapper
2024-11-15 17:33:28,390 [INFO ] npm warn config production Use --omit=dev instead.
2024-11-15 17:33:33,666 [INFO ]
2024-11-15 17:33:33,666 [INFO ] added 61 packages, and audited 62 packages in 5s
2024-11-15 17:33:33,666 [INFO ]
2024-11-15 17:33:33,666 [INFO ] 7 packages are looking for funding
2024-11-15 17:33:33,666 [INFO ] run npm fund for details
2024-11-15 17:33:33,673 [INFO ]
2024-11-15 17:33:33,673 [INFO ] 1 moderate severity vulnerability
2024-11-15 17:33:33,673 [INFO ]
2024-11-15 17:33:33,673 [INFO ] To address all issues, run:
2024-11-15 17:33:33,673 [INFO ] npm audit fix
2024-11-15 17:33:33,673 [INFO ]
2024-11-15 17:33:33,673 [INFO ] Run npm audit for details.
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ]
2024-11-15 17:33:33,848 [INFO ] Installing browser binaries to c:\Users\user\ROBOT\jdc-test-auto.venv\Lib\site-packages\Browser\wrapper
2024-11-15 17:33:33,848 [INFO ] npx --quiet playwright install
2024-11-15 17:33:39,627 [INFO ] | | 0% of 122 Mb
2024-11-15 17:33:39,627 [INFO ] [Error: ENOENT: no such file or directory, open ‘C:\Users\user\AppData\Local\Temp;C:\Program Files\java\jre1.8.0_261\bin\playwright-download-chromium-win64-1091.zip’] {
2024-11-15 17:33:39,627 [INFO ] errno: -4058,
2024-11-15 17:33:39,627 [INFO ] code: ‘ENOENT’,
2024-11-15 17:33:39,627 [INFO ] syscall: ‘open’,
2024-11-15 17:33:39,627 [INFO ] path: ‘C:\Users\user\AppData\Local\Temp;C:\Program Files\java\jre1.8.0_261\bin\playwright-download-chromium-win64-1091.zip’
2024-11-15 17:33:39,633 [INFO ] }
2024-11-15 17:33:40,085 [INFO ] | | 0% of 122 Mb
2024-11-15 17:33:40,089 [INFO ] [Error: ENOENT: no such file or directory, open ‘C:\Users\user\AppData\Local\Temp;C:\Program Files\java\jre1.8.0_261\bin\playwright-download-chromium-win64-1091.zip’] {
2024-11-15 17:33:40,089 [INFO ] errno: -4058,
2024-11-15 17:33:40,090 [INFO ] code: ‘ENOENT’,
2024-11-15 17:33:40,090 [INFO ] syscall: ‘open’,
2024-11-15 17:33:40,090 [INFO ] path: ‘C:\Users\user\AppData\Local\Temp;C:\Program Files\java\jre1.8.0_261\bin\playwright-download-chromium-win64-1091.zip’
2024-11-15 17:33:40,090 [INFO ] }
2024-11-15 17:33:40,974 [INFO ] | | 0% of 122 Mb
2024-11-15 17:33:40,974 [INFO ] [Error: ENOENT: no such file or directory, open ‘C:\Users\user\AppData\Local\Temp;C:\Program Files\java\jre1.8.0_261\bin\playwright-download-chromium-win64-1091.zip’] {
2024-11-15 17:33:40,974 [INFO ] errno: -4058,
2024-11-15 17:33:40,974 [INFO ] code: ‘ENOENT’,
2024-11-15 17:33:40,974 [INFO ] syscall: ‘open’,
2024-11-15 17:33:40,974 [INFO ] path: ‘C:\Users\user\AppData\Local\Temp;C:\Program Files\java\jre1.8.0_261\bin\playwright-download-chromium-win64-1091.zip’
2024-11-15 17:33:40,974 [INFO ] }
2024-11-15 17:33:40,990 [INFO ] Failed to install browsers
2024-11-15 17:33:40,990 [INFO ] Error: Failed to download Chromium 120.0.6099.28 (playwright build v1091), caused by
2024-11-15 17:33:40,990 [INFO ] Error: Download failure, code=1
2024-11-15 17:33:40,990 [INFO ] at ChildProcess. (c:\Users\user\ROBOT\jdc-test-auto.venv\Lib\site-packages\Browser\wrapper\node_modules\playwright-core\lib\server\registry\browserFetcher.js:91:16)
2024-11-15 17:33:40,990 [INFO ] at ChildProcess.emit (node:events:517:28)
2024-11-15 17:33:40,990 [INFO ] at ChildProcess._handle.onexit (node:internal/child_process:292:12)
2024-11-15 17:33:41,091 [INFO ]
2024-11-15 17:33:41,091 [INFO ]
2024-11-15 17:33:41,091 [INFO ]
2024-11-15 17:33:41,091 [INFO ]
2024-11-15 17:33:41,091 [INFO ]
2024-11-15 17:33:41,091 [INFO ] ==============================================================================================================
2024-11-15 17:33:41,091 [INFO ] Traceback (most recent call last):
File “c:\Users\user\ROBOT\jdc-test-auto.venv\Lib\site-packages\Browser\entry.py”, line 335, in init
_rfbrowser_init(skip_browsers, silent_mode, with_deps, browser)
File “c:\Users\user\ROBOT\jdc-test-auto.venv\Lib\site-packages\Browser\entry.py”, line 178, in _rfbrowser_init
_process_poller(process, silent_mode)
File “c:\Users\user\ROBOT\jdc-test-auto.venv\Lib\site-packages\Browser\entry.py”, line 75, in _process_poller
raise RuntimeError(
RuntimeError: Problem installing node dependencies.Node process returned with exit status 1

COuld you help me ?

python --version
Python 3.11.5
node --version
v18.18.0
npm --version
10.9.0

npm --version
10.9.0

Hi Nicolas,

I found that trying to run on an older nodejs version caused this type of error, I had a similar issue when node 18.0 was the latest version and I was on node 16.0.

I don’t know what the officially supported nodejs versions are, and couldn’t find it on the playwright or Browser Library sites :disappointed:

As nodejs version 22.11 is the latest LTS version and 23.2 is the current version I’ll suggest updating to one of these and see if that resolves your issue.

Dave.

are you working for cooporate and you are running your tests on work computer

I know that it is a low probability root cause but who knows (maybe because yesterday i have seen due to IT policy that’s why ):

Could be proxy issue

1 Like

wait !

2024-11-15 17:33:39,627 [INFO ] path: ‘C:\Users\user\AppData\Local\Temp;C:\Program Files\java\jre1.8.0_261\bin\playwright-download-chromium-win64-1091.zip’

i am seeing this line multiple time formatted in the same way. is it concatenated because when you did a copy paste ?

It might be due to a misconfiguration in your environment variables, likely in TEMP, TMP, or PATH

could you check please , paste this commands in your terminal and see :
echo %TEMP%
echo %TMP%
echo %PATH%

3 Likes

Hi here the result of commands

I think @hassineabd is on the right track here and its about the node version. The download location looks really fishy as it has two actual directories splitted via semicolon.

2 Likes

OK i remove the second part after the semicolon in %TEMP% variable and the “rfbrowser init” works well now

Thanks a lot for your help !

3 Likes