Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2736

Windows: SSL errors if conflicting libssl is installed system wide

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.9.2
    • None
    • None
    • None

      Hi,

      I can't log in with the generated token - here's the error log...

       

      E: 12:47:24,297 webservice._handle_reply:511: Network request error for https://musicbrainz.org/oauth2/token -> TLS initialization failed (QT code 99, HTTP code 0)

      E: 12:47:24,297 oauth.on_exchange_authorization_code_finished:241: OAuth: authorization_code exchange failed: b''

          [PICARD-2736] Windows: SSL errors if conflicting libssl is installed system wide

          Thanks again for confirming. So what I did now is doing exactly that and moving all the DLLs from the PyQt5\Qt5\bin folder into the main folder next to picard.exe on packaging. That's how older versions of PyInstaller did this, and only since it got changed that layout we are getting all kinds of Qt related DLL loading issues. I'll probably also open an issue with PyInstaller, but AFAIK they had some good reasons for the changes as well.

          Anyway, I'd appreciate one last test of the portable daily build from https://github.com/phw/picard-daily/releases/tag/continuous . Then we can I think ship this with the next release.

           

          Philipp Wolfer added a comment - Thanks again for confirming. So what I did now is doing exactly that and moving all the DLLs from the PyQt5\Qt5\bin folder into the main folder next to picard.exe on packaging. That's how older versions of PyInstaller did this, and only since it got changed that layout we are getting all kinds of Qt related DLL loading issues. I'll probably also open an issue with PyInstaller, but AFAIK they had some good reasons for the changes as well. Anyway, I'd appreciate one last test of the portable daily build from https://github.com/phw/picard-daily/releases/tag/continuous . Then we can I think ship this with the next release.  

          RouteA66 added a comment -

          Hi Folks,

          I tried the workaround and copied all the dll files from the Qt5 folders into the C:\Program Files\MusicBrainz Picard\ folder and things are working now and I can log in and use the programme.

           

          Thanks for all your help...

          RouteA66 added a comment - Hi Folks, I tried the workaround and copied all the dll files from the Qt5 folders into the C:\Program Files\MusicBrainz Picard\ folder and things are working now and I can log in and use the programme.   Thanks for all your help...

          Zas added a comment -

          Zas added a comment - About Qt5, SSL & Windows, for reference: https://doc.qt.io/qt-5/windows-requirements.html#ssl https://kb.firedaemon.com/support/solutions/articles/4000121705 Also it can be a sub-requirement issue as described in https://www.reddit.com/r/QtFramework/comments/vpyqpw/qt_ssl_problem_windows_msvc2019_with_minimal/ienkrfe/

          Thanks you both for the feedback and the help in figuring out the issue. The results are unfortunately really confusing, especially as I can not reproduce the issues at all and the SSL libraries.

          I have now updated my daily builds to use PyInstaller 5.11 again, as upgrading this to the newer 5.12 was one of the changes we did for 2.9 beta 2. Maybe this makes a difference.

           

          @RouteA66 The SSL DLLs are shipped as part of the regular installer inside the installation folder in C:\Program Files\MusicBrainz Picard\PyQt5\Qt5\bin . Please see IxeYgrek's comment above, you can try the workaround of copying those files into C:\Program Files\MusicBrainz Picard\ .

          Could you please also check whether you have existing files libcrypto-1_1-x64.dll or libssl-1_1-x64.dll in your system folder under C:\Windows\System32 ? If you have, please right click them, select Properties and in the properties dialog look at the Details tab. What does this say for "Product version" and "File version" for those files?

           

          The same issue was also brought up on the forums https://community.metabrainz.org/t/how-to-fix-the-website-cant-load-tag/652720 and IxeYgrek's workaround worked for that user as well.

          Philipp Wolfer added a comment - Thanks you both for the feedback and the help in figuring out the issue. The results are unfortunately really confusing, especially as I can not reproduce the issues at all and the SSL libraries. I have now updated my daily builds to use PyInstaller 5.11 again, as upgrading this to the newer 5.12 was one of the changes we did for 2.9 beta 2. Maybe this makes a difference.   @RouteA66 The SSL DLLs are shipped as part of the regular installer inside the installation folder in C:\Program Files\MusicBrainz Picard\PyQt5\Qt5\bin . Please see IxeYgrek's comment above, you can try the workaround of copying those files into C:\Program Files\MusicBrainz Picard\ . Could you please also check whether you have existing files libcrypto-1_1-x64.dll or libssl-1_1-x64.dll in your system folder under C:\Windows\System32 ? If you have, please right click them, select Properties and in the properties dialog look at the Details tab. What does this say for "Product version" and "File version" for those files?   The same issue was also brought up on the forums https://community.metabrainz.org/t/how-to-fix-the-website-cant-load-tag/652720 and IxeYgrek's workaround worked for that user as well.

          RouteA66 added a comment -

          Hi - I've tried the daily build from here Release MusicBrainz Picard daily builds · phw/picard-daily · GitHub and I'm still getting the https error?

           

          Can you tell me where I can download the ssl dlls?

           

          Cheers,

           

          ssl-error.txt

          RouteA66 added a comment - Hi - I've tried the daily build from here Release MusicBrainz Picard daily builds · phw/picard-daily · GitHub and I'm still getting the https error?   Can you tell me where I can download the ssl dlls?   Cheers,   ssl-error.txt

          IxeYgrek added a comment -

          Hello,

          It doesn't work, but with the tinkering I've done, I don't think I'm in the best position right now to do this kind of test...
          When I open the portable version, I get this error message twice: "The OPENSSL_sk_new_reserve procedure entry point cannot be found in the dynamic link library C:\Users\IxeYgrek\AppData\Local\Temp_MEI327202\PyQt5\Qt5\bin\libssl-1_1-x64.dll".

          However, when I run the portable executable with the -d parameter, it no longer indicates that SSL is not installed:

           

           

          E: 13:00:25,271 util/pipe.send_to_pipe:274: pipe sender exception: (2, 'CreateFile', 'Le fichier spécifié est introuvable.')
          D: 13:00:25,281 tagger.__init__:327: Starting Picard from 'C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\picard\\tagger.pyc'
          D: 13:00:25,281 tagger.__init__:328: Platform: Windows-10-10.0.19045-SP0 CPython 3.8.10
          D: 13:00:25,281 tagger.__init__:330: Versions: Picard 2.9.1 (177-203524c2.20230831074029), Python 3.8.10, PyQt 5.15.9, Qt 5.15.2, Mutagen 1.46.0, Discid discid 1.2.0, libdiscid 0.6.3, astrcmp C, SSL OpenSSL 1.1.1b 26 Feb 2019
          D: 13:00:25,281 tagger.__init__:331: Configuration file path: 'C:/Users/IxeYgrek/Downloads/MusicBrainz-Picard/Config.ini'
          D: 13:00:25,281 tagger.__init__:333: User directory: 'C:\\Users\\IxeYgrek\\Downloads\\MusicBrainz-Picard'
          D: 13:00:25,281 tagger.__init__:334: System long path support: True
          D: 13:00:25,281 i18n.setup_gettext:146: UI language: system
          D: 13:00:25,281 i18n._log_lang_env_vars:131: Env vars:
          D: 13:00:25,281 i18n.setup_gettext:154: Trying locales: ['fr_FR']
          D: 13:00:25,288 i18n.setup_gettext:160: Set locale to: 'fr_FR'
          D: 13:00:25,288 i18n.setup_gettext:171: Using locale: 'fr_FR'
          D: 13:00:25,288 i18n._load_translation:118: Loading gettext translation for picard, localedir='C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale', language='fr_FR'
          D: 13:00:25,290 i18n._load_translation:118: Loading gettext translation for picard-attributes, localedir='C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale', language='fr_FR'
          D: 13:00:25,291 i18n._load_translation:118: Loading gettext translation for picard-constants, localedir='C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale', language='fr_FR'
          D: 13:00:25,291 i18n._load_translation:121: [Errno 2] No translation file found for domain: 'picard-constants'
          D: 13:00:25,291 i18n._load_translation:118: Loading gettext translation for picard-countries, localedir='C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale', language='fr_FR'
          D: 13:00:25,292 i18n.setup_gettext:191: _ = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x000001608E2E42E0>>
          D: 13:00:25,292 i18n.setup_gettext:192: N_ = <function <lambda> at 0x000001608CC55310>
          D: 13:00:25,292 i18n.setup_gettext:193: ngettext = <bound method GNUTranslations.ngettext of <gettext.GNUTranslations object at 0x000001608E2E42E0>>
          D: 13:00:25,292 i18n.setup_gettext:194: gettext_countries = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x000001608E2E43D0>>
          D: 13:00:25,292 i18n.setup_gettext:195: gettext_attributes = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x000001608E2E4310>>
          D: 13:00:25,292 i18n.setup_gettext:196: pgettext_attributes = <bound method GNUTranslations.pgettext of <gettext.GNUTranslations object at 0x000001608E2E4310>>
          D: 13:00:25,299 webservice._network_accessible_changed:387: Network accessible requested: 1, actual: 1
          D: 13:00:25,300 webservice.set_cache:409: NetworkDiskCache dir: 'C:/Users/IxeYgrek/Downloads/MusicBrainz-Picard/Cache/network/' current size: 0 B max size: 100 MB
          I: 13:00:25,300 pluginmanager.load_plugins_from_directory:248: Plugin directory 'plugins' doesn't exist
          D: 13:00:25,301 pluginmanager.load_plugins_from_directory:260: Looking for plugins in directory 'C:\\Users\\IxeYgrek\\Downloads\\MusicBrainz-Picard\\Plugins', 0 names found
          D: 13:00:25,305 ui/playertoolbar.__init__:90: Internal player: QtMultimedia available, initializing QMediaPlayer
          D: 13:00:25,332 ui/playertoolbar.__init__:97: Internal player: available, QMediaPlayer set up
          D: 13:00:25,472 tagger.main:1571: Looking for Qt locale fr_FR in C:/Users/IxeYgrek/AppData/Local/Temp/_MEI368322/PyQt5/Qt5/translations
          I: 13:00:25,474 browser/browser.start:121: Starting the browser integration (127.0.0.1:8000)
          D: 13:00:25,492 ui/mainwindow.auto_update_check:1783: Initiating startup check for program updates. Today: 2023-08-31, Last check: never (Check interval: 7 days), Update level: 0 (stable)
          D: 13:00:25,492 util/checkupdate._query_available_updates:90: Getting Picard release information from https://picard.musicbrainz.org/api/v2/releases
          D: 13:00:25,492 config.event:259: Config file update requested on thread 26028
          D: 13:00:25,496 webservice/ratecontrol.get_delay_to_next_request:122: ('picard.musicbrainz.org', 443): First request
          D: 13:00:25,496 webservice/ratecontrol.increment_requests:147: ('picard.musicbrainz.org', 443): Incrementing requests to: 1
          D: 13:00:55,503 webservice/ratecontrol.decrement_requests:155: ('picard.musicbrainz.org', 443): Decrementing requests to: 0
          E: 13:00:55,504 webservice._handle_reply:534: Network request error for https://picard.musicbrainz.org/api/v2/releases -> L'opération est annulée (QT code 5, HTTP code 0)
          E: 13:00:55,504 util/checkupdate._releases_json_loaded:101: Erreur lors chargement de la liste des parutions de Picard : L'opération est annulée
          D: 13:00:55,504 ui/mainwindow.update_last_check_date:2011: The update check was unsuccessful. The last update date will not be changed.
          D: 13:00:55,505 webservice/ratecontrol._out_of_backoff:231: ('picard.musicbrainz.org', 443): oobackoff; delay: 1000ms -> 1000ms; slow start; window size 1.000 -> 2.000
          

           

           

           

          And when I want to do a search on MusicBrainz via the application it searches for a while and ends on this error: 

           

          L’erreur suivante s’est produite pendant la récupération des résultats :
          
          Erreur de requête réseau pour https://musicbrainz.org/ws/2/recording?limit=50&query=track%3A%28Mario Airlines %5C%28Razor1911 Crysis%5C-Keygen Edit%5C%29%29 artist%3A%28Dubmood%29 release%3A%28Best of Crackscene Music%5C%3A 2004%5C-2007%29 tnum%3A%282%29 tracks%3A%2814%29 qdur%3A%28143%29 :
          L'opération est annulée (code QT 5, code HTTP None)

          IxeYgrek added a comment - Hello, It doesn't work, but with the tinkering I've done, I don't think I'm in the best position right now to do this kind of test... When I open the portable version, I get this error message twice: "The OPENSSL_sk_new_reserve procedure entry point cannot be found in the dynamic link library C:\Users\IxeYgrek\AppData\Local\Temp_MEI327202\PyQt5\Qt5\bin\libssl-1_1-x64.dll". However, when I run the portable executable with the -d parameter, it no longer indicates that SSL is not installed:     E: 13:00:25,271 util/pipe.send_to_pipe:274: pipe sender exception: (2, 'CreateFile' , 'Le fichier spécifié est introuvable.' ) D: 13:00:25,281 tagger.__init__:327: Starting Picard from 'C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\picard\\tagger.pyc' D: 13:00:25,281 tagger.__init__:328: Platform: Windows-10-10.0.19045-SP0 CPython 3.8.10 D: 13:00:25,281 tagger.__init__:330: Versions: Picard 2.9.1 (177-203524c2.20230831074029), Python 3.8.10, PyQt 5.15.9, Qt 5.15.2, Mutagen 1.46.0, Discid discid 1.2.0, libdiscid 0.6.3, astrcmp C, SSL OpenSSL 1.1.1b 26 Feb 2019 D: 13:00:25,281 tagger.__init__:331: Configuration file path: 'C:/Users/IxeYgrek/Downloads/MusicBrainz-Picard/Config.ini' D: 13:00:25,281 tagger.__init__:333: User directory: 'C:\\Users\\IxeYgrek\\Downloads\\MusicBrainz-Picard' D: 13:00:25,281 tagger.__init__:334: System long path support: True D: 13:00:25,281 i18n.setup_gettext:146: UI language: system D: 13:00:25,281 i18n._log_lang_env_vars:131: Env vars: D: 13:00:25,281 i18n.setup_gettext:154: Trying locales: [ 'fr_FR' ] D: 13:00:25,288 i18n.setup_gettext:160: Set locale to: 'fr_FR' D: 13:00:25,288 i18n.setup_gettext:171: Using locale: 'fr_FR' D: 13:00:25,288 i18n._load_translation:118: Loading gettext translation for picard, localedir= 'C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale' , language= 'fr_FR' D: 13:00:25,290 i18n._load_translation:118: Loading gettext translation for picard-attributes, localedir= 'C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale' , language= 'fr_FR' D: 13:00:25,291 i18n._load_translation:118: Loading gettext translation for picard-constants, localedir= 'C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale' , language= 'fr_FR' D: 13:00:25,291 i18n._load_translation:121: [Errno 2] No translation file found for domain: 'picard-constants' D: 13:00:25,291 i18n._load_translation:118: Loading gettext translation for picard-countries, localedir= 'C:\\Users\\IxeYgrek\\AppData\\Local\\Temp\\_MEI368322\\locale' , language= 'fr_FR' D: 13:00:25,292 i18n.setup_gettext:191: _ = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x000001608E2E42E0>> D: 13:00:25,292 i18n.setup_gettext:192: N_ = <function <lambda> at 0x000001608CC55310> D: 13:00:25,292 i18n.setup_gettext:193: ngettext = <bound method GNUTranslations.ngettext of <gettext.GNUTranslations object at 0x000001608E2E42E0>> D: 13:00:25,292 i18n.setup_gettext:194: gettext_countries = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x000001608E2E43D0>> D: 13:00:25,292 i18n.setup_gettext:195: gettext_attributes = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x000001608E2E4310>> D: 13:00:25,292 i18n.setup_gettext:196: pgettext_attributes = <bound method GNUTranslations.pgettext of <gettext.GNUTranslations object at 0x000001608E2E4310>> D: 13:00:25,299 webservice._network_accessible_changed:387: Network accessible requested: 1, actual: 1 D: 13:00:25,300 webservice.set_cache:409: NetworkDiskCache dir: 'C:/Users/IxeYgrek/Downloads/MusicBrainz-Picard/Cache/network/' current size: 0 B max size: 100 MB I: 13:00:25,300 pluginmanager.load_plugins_from_directory:248: Plugin directory 'plugins' doesn't exist D: 13:00:25,301 pluginmanager.load_plugins_from_directory:260: Looking for plugins in directory 'C:\\Users\\IxeYgrek\\Downloads\\MusicBrainz-Picard\\Plugins' , 0 names found D: 13:00:25,305 ui/playertoolbar.__init__:90: Internal player: QtMultimedia available, initializing QMediaPlayer D: 13:00:25,332 ui/playertoolbar.__init__:97: Internal player: available, QMediaPlayer set up D: 13:00:25,472 tagger.main:1571: Looking for Qt locale fr_FR in C:/Users/IxeYgrek/AppData/Local/Temp/_MEI368322/PyQt5/Qt5/translations I: 13:00:25,474 browser/browser.start:121: Starting the browser integration (127.0.0.1:8000) D: 13:00:25,492 ui/mainwindow.auto_update_check:1783: Initiating startup check for program updates. Today: 2023-08-31, Last check: never (Check interval: 7 days), Update level: 0 (stable) D: 13:00:25,492 util/checkupdate._query_available_updates:90: Getting Picard release information from https: //picard.musicbrainz.org/api/v2/releases D: 13:00:25,492 config.event:259: Config file update requested on thread 26028 D: 13:00:25,496 webservice/ratecontrol.get_delay_to_next_request:122: ( 'picard.musicbrainz.org' , 443): First request D: 13:00:25,496 webservice/ratecontrol.increment_requests:147: ( 'picard.musicbrainz.org' , 443): Incrementing requests to: 1 D: 13:00:55,503 webservice/ratecontrol.decrement_requests:155: ( 'picard.musicbrainz.org' , 443): Decrementing requests to: 0 E: 13:00:55,504 webservice._handle_reply:534: Network request error for https: //picard.musicbrainz.org/api/v2/releases -> L'opération est annulée (QT code 5, HTTP code 0) E: 13:00:55,504 util/checkupdate._releases_json_loaded:101: Erreur lors chargement de la liste des parutions de Picard : L'opération est annulée D: 13:00:55,504 ui/mainwindow.update_last_check_date:2011: The update check was unsuccessful. The last update date will not be changed. D: 13:00:55,505 webservice/ratecontrol._out_of_backoff:231: ( 'picard.musicbrainz.org' , 443): oobackoff; delay: 1000ms -> 1000ms; slow start; window size 1.000 -> 2.000       And when I want to do a search on MusicBrainz via the application it searches for a while and ends on this error:    L’erreur suivante s’est produite pendant la récupération des résultats : Erreur de requête réseau pour https: //musicbrainz.org/ws/2/recording?limit=50&query=track%3A%28Mario Airlines %5C%28Razor1911 Crysis%5C-Keygen Edit%5C%29%29 artist%3A%28Dubmood%29 release%3A%28Best of Crackscene Music%5C%3A 2004%5C-2007%29 tnum%3A%282%29 tracks%3A%2814%29 qdur%3A%28143%29 : L'opération est annulée (code QT 5, code HTTP None)

          Turns out the openssl DLLS where actually placed in the main folder, but there was a workaround for some old issue which removed those DLLs again before we created the packages.

          I have now removed this. Can you guys test if the dev build from https://github.com/phw/picard-daily/releases/tag/continuous (it's a portable version) works for you?

          IxeYgrek: You probably cannot reproduce the crash anymore anyway after copying around the libraries with working versions. But I'd still appreciate if your feedback on the new build.

          RouteA66: If this does not fix the issue for you I need to dig deeper.

          Philipp Wolfer added a comment - Turns out the openssl DLLS where actually placed in the main folder, but there was a workaround for some old issue which removed those DLLs again before we created the packages. I have now removed this. Can you guys test if the dev build from https://github.com/phw/picard-daily/releases/tag/continuous (it's a portable version) works for you? IxeYgrek: You probably cannot reproduce the crash anymore anyway after copying around the libraries with working versions. But I'd still appreciate if your feedback on the new build. RouteA66: If this does not fix the issue for you I need to dig deeper.

          GitHub Bot added a comment -

          See code changes in pull request #2296 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #2296 submitted by phw .

          IxeYgrek added a comment -

          For your information, the same problem occurs with the version available on the Microsoft store and with the portable version.

          IxeYgrek added a comment - For your information, the same problem occurs with the version available on the Microsoft store and with the portable version.

          OK, thanks for the details. I tried myself by placing a different Openssl 1.1 version of those in System32, and indeed Picard loaded those instead of the bundled ones. So 8f you had an older, incompatible version there it would explain the behavior.

           

          We had similar issues in the past and this was supposed to be resolved with the code linked above. But this all seems to be very fragile and tends to break when new  PyInstaller releases juggle around the file structure.

           

          I'll see if newer PyInstaller fixes this specific issue. If not we probably have to reorganize files ourselves (by putting all the DLLs in the main install folder next to picard.exe).

          Philipp Wolfer added a comment - OK, thanks for the details. I tried myself by placing a different Openssl 1.1 version of those in System32, and indeed Picard loaded those instead of the bundled ones. So 8f you had an older, incompatible version there it would explain the behavior.   We had similar issues in the past and this was supposed to be resolved with the code linked above. But this all seems to be very fragile and tends to break when new  PyInstaller releases juggle around the file structure.   I'll see if newer PyInstaller fixes this specific issue. If not we probably have to reorganize files ourselves (by putting all the DLLs in the main install folder next to picard.exe).

            outsidecontext Philipp Wolfer
            RouteA66 RouteA66
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.9.2