Sibusten / derpibooru-downloader

A downloader for imageboards running Philomena, such as Derpibooru.
MIT License
62 stars 6 forks source link

Network Error: Unable to Init SSL #3

Closed BusterNeece closed 7 years ago

BusterNeece commented 7 years ago

Hello! Thank you for your hard work on creating this downloader project. :D

I'm running into a fatal error when attempting to connect to the Derpibooru API using the downloader:

[05:28:05] - Network Error - c - Unable to init SSL Context: 
Sibusten commented 7 years ago

Hi, I'm glad you appreciate the program, and thank you for reporting this problem.

To help figure out what's going wrong I'll need to know a bit more about the situation.

  1. What operating system are you using?
  2. Did you run the program using the compiled binary from the releases page, or did you build from source?
  3. Does this happen every time you try to download, preventing any images from being downloaded?
BusterNeece commented 7 years ago

@Sibusten Happy to help provide any additional information:

BusterNeece commented 7 years ago

@Sibusten I researched the situation further, and found the solution (at least for my instance)!

QtMake apps on Windows depend on two OpenSSL DLLs, libeay32.dll and ssleay32.dll, which must be present either in the app's directory or in the system32 directory. In my case, the DLLs were missing, and downloading them from this page and dropping them directly into the downloader's directory fixed the problem entirely.

You may want to directly include these DLLs in the release builds of the app, just in case other people don't have OpenSSL installed globally on Windows. :)

Sibusten commented 7 years ago

You are right, openssl is a dependency of qt when using https. Apparently it's loaded as needed, not at startup, which is why the program will start just fine, but not download anything.

Funny thing is that both of my test computers had some Intel program which was in the global path, and that program just happened to have distributed with openssl, so it was borrowing the dlls from there without me even knowing...

I've updated the current release with the dlls, so things should work now. Thanks again for reporting this.