{"id":39,"date":"2021-12-16T14:33:05","date_gmt":"2021-12-16T21:33:05","guid":{"rendered":"https:\/\/blog.nrezinorn.net\/?p=39"},"modified":"2021-12-16T17:05:42","modified_gmt":"2021-12-17T00:05:42","slug":"fixing-playonmac-wine-versions","status":"publish","type":"post","link":"https:\/\/blog.nrezinorn.net\/index.php\/2021\/12\/16\/fixing-playonmac-wine-versions\/","title":{"rendered":"Fixing PlayOnMac Wine Manager"},"content":{"rendered":"\n<p>The latest release of PlayOnMac 4.4.3 does not allow viewing Wine packages, due to missing Certificate Authority verification.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>% .\/playonmac\n&#91;main] Message: PlayOnMac (4.4.3) is starting\n&#91;clean_tmp] Message: Cleaning temp directory\n&#91;install_plugins] Message: Checking plugin: ScreenCap...\n&#91;update_check] Message: List is up to date\nDonwloading https:\/\/phoenicis.playonlinux.com\/index.php\/wine?os=darwin\nTraceback (most recent call last):\n  File \"urllib\/request.pyc\", line 1350, in do_open\n  File \"http\/client.pyc\", line 1240, in request\n  File \"http\/client.pyc\", line 1286, in _send_request\n  File \"http\/client.pyc\", line 1235, in endheaders\n  File \"http\/client.pyc\", line 1006, in _send_output\n  File \"http\/client.pyc\", line 946, in send\n  File \"http\/client.pyc\", line 1409, in connect\n  File \"ssl.pyc\", line 500, in wrap_socket\n  File \"ssl.pyc\", line 1040, in _create\n  File \"ssl.pyc\", line 1309, in do_handshake\nssl.SSLCertVerificationError: &#91;SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"\/Applications\/PlayOnMac.app\/Contents\/Resources\/playonlinux\/python\/wine_versions\/WineVersionsFetcher.py\", line 24, in _sync_fetch_all_available_wine_versions\n  File \"urllib\/request.pyc\", line 222, in urlopen\n  File \"urllib\/request.pyc\", line 525, in open\n  File \"urllib\/request.pyc\", line 542, in _open\n  File \"urllib\/request.pyc\", line 502, in _call_chain\n  File \"urllib\/request.pyc\", line 1393, in https_open\n  File \"urllib\/request.pyc\", line 1353, in do_open\nurllib.error.URLError: &lt;urlopen error &#91;SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)&gt;<\/code><\/pre>\n\n\n\n<p>The error results in the Wine Version UI not updating:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"573\" src=\"https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.32.28-PM-1024x573.png\" alt=\"\" class=\"wp-image-43\" srcset=\"https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.32.28-PM-1024x573.png 1024w, https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.32.28-PM-300x168.png 300w, https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.32.28-PM-768x430.png 768w, https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.32.28-PM.png 1500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>The Fix<\/strong><\/p>\n\n\n\n<p>A quick fix is to modify the functions that handle downloading the wine versions, which is <code>WineVersionsFetcher.py<\/code>:<\/p>\n\n\n\n<p><span class=\"has-inline-color has-vivid-red-color\">Note:  I have updated this file here so that if it is added to the main repo, we do not break Linux compatibility.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>diff --git a\/python\/wine_versions\/WineVersionsFetcher.py b\/python\/wine_versions\/WineVersionsFetcher.py\nindex fd758798..5f57aa45 100644\n--- a\/python\/wine_versions\/WineVersionsFetcher.py\n+++ b\/python\/wine_versions\/WineVersionsFetcher.py\n@@ -18,10 +18,13 @@ class WineVersionFetcher():\n\n     def _sync_fetch_all_available_wine_versions(self, callback, error):\n         wine_version_url = \"https:\/\/phoenicis.playonlinux.com\/index.php\/wine?os=%s\" % self.operating_system\n-        print(\"Donwloading %s \" % wine_version_url)\n+        print(\"Downloading %s \" % wine_version_url)\n         try:\n             request = urllib.request.Request(wine_version_url, None, {'User-Agent': Variables.userAgent})\n-            handle = urllib.request.urlopen(request, timeout=5)\n+            if self.operating_system == 'darwin':\n+                handle = urllib.request.urlopen(request, cafile='..\/..\/lib\/python3.8\/certifi\/cacert.pem', timeout=5)\n+            else:\n+                handle = urllib.request.urlopen(request, timeout=5)\n             callback(self._convert_phoenicis_wine_versions_to_v4(json.load(handle)))\n         except Exception as e:\n             error(traceback.format_exc())<\/code><\/pre>\n\n\n\n<p>The above block can be copied into a patch file and ran:<\/p>\n\n\n\n<p><code>cp WineVersionFetcher.py.orig WineVersionsFetcher.py<br>temp % patch -p3 &lt; pol4_winemanager_patch.patch<br>patching file WineVersionsFetcher.py<\/code><\/p>\n\n\n\n<p>Now we are able to download WINE!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.29.33-PM-1024x577.png\" alt=\"\" class=\"wp-image-42\" srcset=\"https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.29.33-PM-1024x577.png 1024w, https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.29.33-PM-300x169.png 300w, https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.29.33-PM-768x432.png 768w, https:\/\/blog.nrezinorn.net\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-16-at-2.29.33-PM.png 1506w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Enjoy your games!<\/p>\n\n\n\n<p>-Nrezinorn<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The latest release of PlayOnMac 4.4.3 does not allow viewing Wine packages, due to missing Certificate Authority verification. The error results in the Wine Version UI not updating: The Fix A quick fix is to modify the functions that handle downloading the wine versions, which is WineVersionsFetcher.py: Note: I have updated this file here so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11],"tags":[13,12],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-games","category-mac","tag-mac","tag-osx"],"_links":{"self":[{"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":10,"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":53,"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/posts\/39\/revisions\/53"}],"wp:attachment":[{"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nrezinorn.net\/index.php\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}