Closed aarushiag closed 2 years ago
This is the same issue as https://github.com/microsoft/playwright/issues/10036
The container was missing basic windows fonts. After installing the fonts, the issue was resolved. Are fonts a basic requirement for playwright library to work in Windows env?
Yes, the browser may fail without those fonts and they are apparently not shipped with windows server by default. For now you can either install the fonts manually or you can use our official docker linux image, we don't have one for Windows.
Can we expect to have similar behaviour in Windows ?
We can probably install missing fonts similar to how we install media pack on windows server. (cc @aslushnikov)
After installing the fonts, the issue was resolved.
Did you install some standard windows pack or downloaded the fonts from another source?
Thanks @yury-s for the clarification.
We can probably install missing fonts similar to how we install media pack on windows server. (cc @aslushnikov)
Could you clarify what media pack are you talking about ? Does playwright/browser install some fonts in case of linux? I wasn't able to see any fonts installed in the linux system while using playwright.
Did you install some standard windows pack or downloaded the fonts from another source?
We installed the standard windows pack. (We copied the ttf/otf files from the host system and registered them just to check the workflow (I understand this won't be a long term solution from the perspective of licensing)
Could you clarify what media pack are you talking about ?
Server-Media-Foundation that we install automatically when running playwright on Windows Server.
Does playwright/browser install some fonts in case of linux?
Yes, it does install some fonts as native dependencies.
We need more information to act on this report. Please file a new one and link to this issue when you get back to it!
Hi @yury-s , could you please suggest from where we can install the - Server-Media-Foundation package in Windows Server ?
Context:
Code Snippet
Describe the bug
Playwright is not working within dockerized environment in Windows Server 2019. The error is thrown while creating new page -
Page page = context.newPage()
. Strangely the same code snippet doesn't throw any error on the host machine which again has the same OS version (Microsoft Windows Server 2019 Standard). This was tried both by settingPLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
as 1 and 0. Is there any dependency which can be possibly missing inside the container and should be installed explicitly for playwright to work?UPDATE - The container was missing basic windows fonts. After installing the fonts, the issue was resolved. Are fonts a basic requirement for playwright library to work in Windows env? I remember using playwright in a linux based image (which also didn't have basic fonts) without facing such issues. Can we expect to have similar behaviour in Windows ?
Error Log