cURL error 56: SSLRead() — Reinstallation
I was working on a Vue JS app that contained a vue2-dropzone component, which providers a beautiful and configurable file-picker component.
The Problem
Whenever I selected a file, it would upload it to the url I provided, but the server would return an HTTP 500 status code and the message would be:
cURL error 56: SSLRead() return error -9806 (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Cryptic huh?
The link provided gives a list of all possible errors that curl
can return, and.
Oh, by the way,
[CURL](http://curl.haxx.se)
is the default program used to make HTTP requests on unix systems.
For a program that makes HTTP requests, you’d think its website would have better UI, eh? 🤔
The Solution
I finally stumbled upon this, and the accepted answer was to restart my system.
So I did, and went for lunch!
The Real Solution
Didn’t work!
Same issue!
So I picked the second answer which was to force install curl
with brew
.
brew install --force --with-openssl curl
In hindsight, I don’t think the force-install option was necessary. But who has time to try it again? 😂
Because curl was already installed by the OS, I had to make sure the brew installation path was picked when I executed curl
, so:
echo 'export PATH="/usr/local/opt/curl/bin/curl:$PATH"' >> ~/.bash_profile
To verify, executing which curl
should return
/usr/local/opt/curl/bin/curl
When I tested the component again, it worked. Now, we can go on to be great!
Happy Coding!