hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.25k stars 430 forks source link

networkGet(url) failing in "Tab for URLs with Title and Icon" command #2634

Closed richlux closed 3 months ago

richlux commented 3 months ago

The "Tab for URLs with Title and Icon" command in the documentation is no longer working. I've traced it down to the networkGet function. The networkGet(url) function appears to be failing. It is returning the error "TLS initialization failed". I also see the following messages in the Server Log:

CopyQ Warning [2024-03-14 11:46:38.144] : [qt.network.ssl] QtWarning: No TLS backend is available CopyQ Warning [2024-03-14 11:46:38.144] : [qt.network.ssl] QtWarning: No functional TLS backend was found CopyQ Warning [2024-03-14 11:46:38.157] : [qt.network.ssl] QtWarning: QSslSocket::connectToHostEncrypted: TLS initialization failed

To Reproduce this you can add "serverLog(reply.error) to the "fetchContent" function and then copy a URL. You will see the error string in the log file.

I'm running the latest version of CopyQ (8.0.0) on Windows 11

This is unrelated, but in case someone else is interested, you can use the old method to get the Icon via API call to "https://s2.googleusercontent.com/s2/favicons?domain_url=", if the method in the current command fails.

Thanks, Rich

hluk commented 3 months ago

The reason is most probably missing plugin in copyq.exe installer. Fixing.

Workaround would be to copy the tls folder from copyq.zip to the installation directory.

hluk commented 3 months ago

Fixed installer: https://ci.appveyor.com/project/hluk/copyq/builds/49420809/artifacts

richlux commented 3 months ago

Thanks! This fixed the problem getting the data, but now the Title of the page that is put into the Notes field is wrapping strangely after I copy the URL. If I edit the Clip without even saving it, the formatting is corrected. See the images below.

image

If I edit the clip and the press ESC without making any changes, the Title formats properly and doesn't wrap.

image