'unable to install playwright as a maven dependancy

I'm trying to build my automation framework using playwright with java, however I'm running into below issue when running the tests. Please advice!

Failed to install browsers
Error: Failed to download chromium v1000, caused by
Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
    at TLSSocket.emit (node:events:390:28)
    at TLSSocket._finishInit (node:_tls_wrap:944:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
Exception in thread "main" java.lang.RuntimeException: Failed to create driver
    at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:61)
    at com.microsoft.playwright.impl.PlaywrightImpl.create(PlaywrightImpl.java:40)
    at com.microsoft.playwright.Playwright.create(Playwright.java:96)
    at com.microsoft.playwright.Playwright.create(Playwright.java:100)
    at Example.main(Example.java:5)
Caused by: java.lang.RuntimeException: Failed to install browsers, exit code: 1
    at com.microsoft.playwright.impl.DriverJar.installBrowsers(DriverJar.java:76)
    at com.microsoft.playwright.impl.DriverJar.initialize(DriverJar.java:48)
    at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:57)
    ... 4 more


Solution 1:[1]

It's not a Playwright or Maven problem. You can fix it yourself. If you want just to avoid the problem, not fixing it, you can follow this recommendation: https://community.claris.com/en/s/question/0D53w00005GuQXxCAN/nodejs-fmsapiclient-unable-to-verify-the-first-certificate-local-server namely by setting the system variable to zero

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alexander Petrovskiy