phoenicis icon indicating copy to clipboard operation
phoenicis copied to clipboard

PlayOnMac 4 Wine Versions

Open thekee04 opened this issue 3 years ago • 3 comments

I saw a post somewhere on wine versions not showing for phoenicis and wondered if there was a fix for play on mac 4 too Screenshot 2021-11-11 at 17 35 27

*Latest play on mac version *Mac Big Sur

thekee04 avatar Nov 11 '21 17:11 thekee04

System Version: macOS 12.0.1 (21A559) Kernel Version: Darwin 21.1.0 Boot Volume: Macintosh HD Boot Mode: Normal Secure Virtual Memory: Enabled System Integrity Protection: Enabled Time since boot: 23:04

It looks like an issue with the underlying Python SSL Libraries

% ./playonmac
[main] Message: PlayOnMac (4.4.3) is starting
[clean_tmp] Message: Cleaning temp directory
[install_plugins] Message: Checking plugin: ScreenCap...
[update_check] Message: List is up to date
Donwloading https://phoenicis.playonlinux.com/index.php/wine?os=darwin
Traceback (most recent call last):
  File "urllib/request.pyc", line 1350, in do_open
  File "http/client.pyc", line 1240, in request
  File "http/client.pyc", line 1286, in _send_request
  File "http/client.pyc", line 1235, in endheaders
  File "http/client.pyc", line 1006, in _send_output
  File "http/client.pyc", line 946, in send
  File "http/client.pyc", line 1409, in connect
  File "ssl.pyc", line 500, in wrap_socket
  File "ssl.pyc", line 1040, in _create
  File "ssl.pyc", line 1309, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/PlayOnMac.app/Contents/Resources/playonlinux/python/wine_versions/WineVersionsFetcher.py", line 24, in _sync_fetch_all_available_wine_versions
  File "urllib/request.pyc", line 222, in urlopen
  File "urllib/request.pyc", line 525, in open
  File "urllib/request.pyc", line 542, in _open
  File "urllib/request.pyc", line 502, in _call_chain
  File "urllib/request.pyc", line 1393, in https_open
  File "urllib/request.pyc", line 1353, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>

Valid Chain as of Nov 26 2021: Certificate chain 0 s:/CN=phoenicis.org i:/C=US/O=Let's Encrypt/CN=R3 1 s:/C=US/O=Let's Encrypt/CN=R3 i:/C=US/O=Internet Security Research Group/CN=ISRG Root X1 2 s:/C=US/O=Internet Security Research Group/CN=ISRG Root X1 i:/O=Digital Signature Trust Co./CN=DST Root CA X3

Adding additional certs to bundle doesn't fix as the R3 (letsencryptauthorityx3.pem) and ISRG X1 (isrgrootx1.pem) roots are already in the file): /Applications/PlayOnMac.app/Contents/Resources/lib/python3.8/certifi/cacert.pem

Nrezinorn avatar Nov 26 '21 19:11 Nrezinorn

@qparis

git diff with fix:

--- a/python/wine_versions/WineVersionsFetcher.py
+++ b/python/wine_versions/WineVersionsFetcher.py
@@ -18,10 +18,13 @@ class WineVersionFetcher():

     def _sync_fetch_all_available_wine_versions(self, callback, error):
         wine_version_url = "https://phoenicis.playonlinux.com/index.php/wine?os=%s" % self.operating_system
-        print("Donwloading %s " % wine_version_url)
+        print("Downloading %s " % wine_version_url)
         try:
             request = urllib.request.Request(wine_version_url, None, {'User-Agent': Variables.userAgent})
-            handle = urllib.request.urlopen(request, timeout=5)
+            if self.operating_system == 'darwin':
+                handle = urllib.request.urlopen(request, cafile='../../lib/python3.8/certifi/cacert.pem', timeout=5)
+            else:
+                handle = urllib.request.urlopen(request, timeout=5)
             callback(self._convert_phoenicis_wine_versions_to_v4(json.load(handle)))
         except Exception as e:
             error(traceback.format_exc())

edit: I am not seeing where the DMG files for 4.4.3 were created. Is there a different repo that contains the PoM 4 builds?

Nrezinorn avatar Dec 16 '21 19:12 Nrezinorn

The proposed fix is in https://github.com/PlayOnLinux/POL-POM-4/pull/69

Nrezinorn avatar Jun 19 '23 15:06 Nrezinorn