<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TLS Initialization Failed on MacOS in Deployed Application]]></title><description><![CDATA[<p dir="auto">Got an interesting issue that I am trying to track down. Our application talks to our web server through “https” which uses SSL at some point. We are using Qt 6.7 and Qt 6.8 on macOS (where this problem is occurring). If I build and run from my IDE (CLion) everything works just fine. When I create the final deployable .app package and then try the same operation I get the “TLS Initialization Failed”.</p>
<p dir="auto">I have looked in the .app package at the Plugins folder which does contain the “tls” subdirectory and there are 3 libraries inside that folder. Adding these 3 plugins solved the issue on the other platforms (Linux and Windows) but macOS I guess is missing something “special”. Anyone have any ideas what special sauce I need for my macOS package? We are using the Qt binaries downloaded from <a href="http://Qt.io" target="_blank" rel="noopener noreferrer nofollow ugc">Qt.io</a>. Feel like I’m missing an openssl library maybe?</p>
<p dir="auto">I’ve tested on both ARM64 and x64 systems running macOS 14.7.4.</p>
<p dir="auto">Thanks for any help.<br />
Mike Jackson</p>
]]></description><link>https://forum.qt.io/topic/161459/tls-initialization-failed-on-macos-in-deployed-application</link><generator>RSS for Node</generator><lastBuildDate>Fri, 30 Oct 2026 11:52:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/161459.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Mar 2025 19:44:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Fri, 21 Mar 2025 06:52:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/imikejackson">@<bdi>imikejackson</bdi></a> said in <a href="/post/822908">TLS Initialization Failed on MacOS in Deployed Application</a>:</p>
<blockquote>
<p dir="auto">I guess it would be handy to know exactly which OpenSSL library is trying to be loaded via DLOpen().</p>
</blockquote>
<p dir="auto">The environment variable <a href="https://doc.qt.io/qt-6/deployment-plugins.html#debugging-plugins" target="_blank" rel="noopener noreferrer nofollow ugc">QT_DEBUG_PLUGINS</a> is a good first step for debugging any dynamic library use by Qt-using applications. I ran a quick test program with TLS support on a mac, and found the output to be under-informative. It's still my first suggestion.</p>
<p dir="auto">Setting DYLD_PRINT_SEARCHING resulted in more useful information, for this case, about attempts to locate libssl and others. For example:</p>
<pre><code class="language-shell">dyld[24496]: find path "/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib"
dyld[24496]:   possible path(original path): "/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib"
dyld[24496]:   found: dylib-from-disk: "/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib"
</code></pre>
<p dir="auto">The <code>man -S 1 dyld</code> suggests several other environment variables to try.</p>
]]></description><link>https://forum.qt.io/post/822975</link><guid isPermaLink="true">https://forum.qt.io/post/822975</guid><dc:creator><![CDATA[jeremy_k]]></dc:creator><pubDate>Fri, 21 Mar 2025 06:52:42 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Thu, 20 Mar 2025 20:42:12 GMT]]></title><description><![CDATA[<p dir="auto">About the only difference I can see is that CMake likes to use @executable_path instead of @rpath in the libraries. Not really sure what it could be past that. I tured off the CMake install bits, and basically rewrote the logic for macdeployqt to look for additional libraries that I know are not being picked up with macdeployqt. Seems like I've probably reinvented the wheel but not sure what else to do to solve the problem. I now have a working macOS DMG package that can properly initialize TLS and talk to our https web server.</p>
]]></description><link>https://forum.qt.io/post/822956</link><guid isPermaLink="true">https://forum.qt.io/post/822956</guid><dc:creator><![CDATA[imikejackson]]></dc:creator><pubDate>Thu, 20 Mar 2025 20:42:12 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Thu, 20 Mar 2025 14:31:11 GMT]]></title><description><![CDATA[<p dir="auto">More debugging: When I run my app from the IDE I get this:</p>
<pre><code>Debug: QSslSocket::supportsSsl():  true 
 QSslSocket::sslLibraryBuildVersionString():  "Secure Transport, macOS Sonoma (14.7)" 
 QSslSocket::sslLibraryVersionString():  "Secure Transport, macOS Sonoma (14.7)" 
</code></pre>
<p dir="auto">After packaging I get:</p>
<pre><code class="language-Warning:">Warning: No functional TLS backend was found
Warning: No functional TLS backend was found
Debug: QSslSocket::supportsSsl():  false 
 QSslSocket::sslLibraryBuildVersionString():  "" 
 QSslSocket::sslLibraryVersionString():  "" 

Warning: No functional TLS backend was found
Warning: No functional TLS backend was found
Warning: QSslSocket::connectToHostEncrypted: TLS initialization failed
</code></pre>
]]></description><link>https://forum.qt.io/post/822939</link><guid isPermaLink="true">https://forum.qt.io/post/822939</guid><dc:creator><![CDATA[imikejackson]]></dc:creator><pubDate>Thu, 20 Mar 2025 14:31:11 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Thu, 20 Mar 2025 13:47:50 GMT]]></title><description><![CDATA[<p dir="auto">I think it's likely rather something that should be fixed at the macdeployqt level.</p>
]]></description><link>https://forum.qt.io/post/822938</link><guid isPermaLink="true">https://forum.qt.io/post/822938</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 20 Mar 2025 13:47:50 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Thu, 20 Mar 2025 13:18:07 GMT]]></title><description><![CDATA[<p dir="auto">Is that something that I, as the app developer, should be compiling and including in my app package?</p>
<p dir="auto">The weird thing is that it works if I just launch the app from my IDE, but when I package then it fails. This leads me to believe that the the necessary libraries are in the Qt install but are not getting included in my package.</p>
]]></description><link>https://forum.qt.io/post/822936</link><guid isPermaLink="true">https://forum.qt.io/post/822936</guid><dc:creator><![CDATA[imikejackson]]></dc:creator><pubDate>Thu, 20 Mar 2025 13:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Wed, 19 Mar 2025 22:48:33 GMT]]></title><description><![CDATA[<p dir="auto">For OpenSSL, it's should be the 3 series looking at your Qt versions.</p>
]]></description><link>https://forum.qt.io/post/822915</link><guid isPermaLink="true">https://forum.qt.io/post/822915</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 19 Mar 2025 22:48:33 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Wed, 19 Mar 2025 19:56:51 GMT]]></title><description><![CDATA[<p dir="auto">I guess it would be handy to know exactly which OpenSSL library is trying to be loaded via DLOpen().</p>
]]></description><link>https://forum.qt.io/post/822908</link><guid isPermaLink="true">https://forum.qt.io/post/822908</guid><dc:creator><![CDATA[imikejackson]]></dc:creator><pubDate>Wed, 19 Mar 2025 19:56:51 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Wed, 19 Mar 2025 19:49:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Yep. that is done during the deployment process.</p>
<pre><code>1005:[mjackson@Octane:tls]% otool -L libqopensslbackend.dylib
libqopensslbackend.dylib (architecture x86_64):
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1953.255.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60420.60.24)
	@rpath/QtNetwork.framework/Versions/A/QtNetwork (compatibility version 6.0.0, current version 6.7.3)
	@rpath/QtCore.framework/Versions/A/QtCore (compatibility version 6.0.0, current version 6.7.3)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
libqopensslbackend.dylib (architecture arm64):
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1953.255.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60420.60.24)
	@rpath/QtNetwork.framework/Versions/A/QtNetwork (compatibility version 6.0.0, current version 6.7.3)
	@rpath/QtCore.framework/Versions/A/QtCore (compatibility version 6.0.0, current version 6.7.3)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
</code></pre>
]]></description><link>https://forum.qt.io/post/822907</link><guid isPermaLink="true">https://forum.qt.io/post/822907</guid><dc:creator><![CDATA[imikejackson]]></dc:creator><pubDate>Wed, 19 Mar 2025 19:49:47 GMT</pubDate></item><item><title><![CDATA[Reply to TLS Initialization Failed on MacOS in Deployed Application on Wed, 19 Mar 2025 19:47:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You will also need to update the rpath of the plugins so they search for their non system dependencies within the bundle. You can do that with otool (the check) and install_name_tool (the paths changes).</p>
]]></description><link>https://forum.qt.io/post/822906</link><guid isPermaLink="true">https://forum.qt.io/post/822906</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 19 Mar 2025 19:47:58 GMT</pubDate></item></channel></rss>