Issue 1:
I am unable to install Playwright. This is what happens:

12:25:15 tmp % mkdir playwright
12:25:21 tmp % cd playwright
12:25:22 playwright % uname -a
Darwin IM00276.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64

12:25:24 playwright % npm doctor
Check Value Recommendation/Notes
npm ping ok
npm -v ok current: v9.6.7, latest: v9.6.7
node -v ok current: v18.16.0, recommended: v18.16.0
npm config get registry ok using default registry (https://registry.npmjs.org/)
git executable in PATH ok /usr/local/bin/git
global bin folder in PATH ok /Users/.../.nvm/versions/node/v18.16.0/bin
Perms check on cached files ok
Perms check on local node_modules ok
Perms check on global node_modules ok
Perms check on local bin folder ok
Perms check on global bin folder ok
Verify cache contents ok verified 6 tarballs

12:25:32 playwright % npm list -g
/Users/.../.nvm/versions/node/v18.16.0/lib
├── corepack@0.17.0
└── npm@9.6.7

12:25:35 playwright % npm list
/Users/.../tmp/playwright
└── (empty)

12:25:40 playwright % npm install playwright
npm ERR! code 1
npm ERR! path /Users/.../tmp/playwright/node_modules/playwright
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! Removing unused browser at /Users/.../Library/Caches/ms-playwright/chromium-1064
npm ERR! Downloading Chromium 114.0.5735.35 (playwright build v1064) from https://playwright.azureedge.net/builds/chromium/1064/chromium-mac.zip
npm ERR! | | 0% of 129.1 Mb
npm ERR! |■■■■■■■■ | 10% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■ | 20% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■ | 30% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 40% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 50% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 60% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 70% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 80% of 129.1 Mb
npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 90% of 129.1 Mb
npm ERR! /Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:651
npm ERR! throw new Error(`Failed to download ${title}, caused by\n${e.stack}`);
npm ERR! ^
npm ERR!
npm ERR! Error: Failed to download Chromium 114.0.5735.35 (playwright build v1064), caused by
npm ERR! Error: end of central directory record signature not found
npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:24033
npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:31712
npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:17288
npm ERR! at FSReqCallback.wrapper [as oncomplete] (node:fs:682:5)
npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:651:13
npm ERR! at async Registry._downloadExecutable (/Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:650:5)
npm ERR! at async Registry.install (/Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:614:9)
npm ERR! at async installBrowsersForNpmInstall (/Users/...tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:790:3)
npm ERR!
npm ERR! Node.js v18.16.0

Expected

The browsers should download and install.

Actual

The downloaded file is truncated and so the zip file is missing the central directory record.

All browsers are affected.

The issue repeats every time.

I can download the ZIP files manually without problem.

Running the 'oopDownloadMain.js' file directly produces the same failure.

Issue 2:
System info

Playwright Version: 1.31.2

Operating System: Windows Server 2016

Browser: N/A

Other info:

Source code

[X ] I provided exact source code that allows reproducing the issue locally.

Teamcity build with the following build steps and a Windows server 2016 build agent.

cinst python3 nodejs.install -y
PATH=%env.Path%;C:\Python39;C:\Program Files\nodejs
python.exe -m pip install --upgrade pip
pip install -U -r ./requirements.txt
rfbrowser init
robot --variable environment:%env.testenvironment% --variable browser:%env.browser% ./robot-framework-docker-MyDimensional/tests/%env.testapplication%

Steps

Run the build

Expected

rfbrowser init should complete without errors.

Actual

[15:18:53]
[Step 2/3] 2023-03-28 15:18:53,966 [INFO ] Downloading Chromium playwright build v1050 from https://playwright.azureedge.net/builds/chromium/1050/chromium-win64.zip
[15:18:53]
[Step 2/3]
[15:18:54]
[Step 2/3] 2023-03-28 15:18:54,329 [INFO ] | | 0% of 113.3 Mb
[15:18:54]
[Step 2/3]
[15:18:55]
[Step 2/3] --- Logging error ---
[15:18:55]
[Step 2/3] Traceback (most recent call last):
[15:18:55]
[Step 2/3] File "C:\Python37\lib\logging\__init__.py", line 1037, in emit
[15:18:55]
[Step 2/3] stream.write(msg + self.terminator)
[15:18:55]
[Step 2/3] File "C:\Python37\lib\encodings\cp1252.py", line 19, in encode
[15:18:55]
[Step 2/3] return codecs.charmap_encode(input,self.errors,encoding_table)[0]
[15:18:55]
[Step 2/3] UnicodeEncodeError: 'charmap' codec can't encode characters in position 36-43: character maps to <undefined>
[15:18:55]
[Step 2/3] Call stack:
[15:18:55]
[Step 2/3] File "C:\Python37\lib\runpy.py", line 193, in _run_module_as_main
[15:18:55]
[Step 2/3] "__main__", mod_spec)
[15:18:55]
[Step 2/3] File "C:\Python37\lib\runpy.py", line 85, in _run_code
[15:18:55]
[Step 2/3] exec(code, run_globals)
[15:18:55]
[Step 2/3] File "C:\Python37\Scripts\rfbrowser.exe\__main__.py", line 7, in <module>
[15:18:55]
[Step 2/3] sys.exit(main())
[15:18:55]
[Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 298, in main
[15:18:55]
[Step 2/3] runner(command, skip_browsers, trace_file)
[15:18:55]
[Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 240, in runner
[15:18:55]
[Step 2/3] rfbrowser_init(skip_browsers)
[15:18:55]
[Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 62, in rfbrowser_init
[15:18:55]
[Step 2/3] _rfbrowser_init(skip_browser_install)
[15:18:55]
[Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 172, in _rfbrowser_init
[15:18:55]
[Step 2/3] logging.info(output)
[15:18:55]
[Step 2/3] Message: '|\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0 | 10% of 113.3 Mb\n'