Skip to content
Advertisement

OpenSSL Error messages: error:14095126 unexpected eof while reading

Description
This error:

JavaScript

returns when:

JavaScript

Steps to Reproduce

Video to download:


https://www.youtube.com/watch?v=r5NzAksjfDI

Extract the video id:

JavaScript

Get the downloadable url

JavaScript

Get the array key for the specified video quality etc.

JavaScript

Set $url to array

JavaScript

Disable SSL

JavaScript

Get the file from the url

JavaScript

Send the video back to front end

JavaScript

Expected behavior:
The video gets downloaded
Actual behavior:

I get this error:

JavaScript

The code stops.

Version
The latest version of:
https://github.com/Athlon1600/youtube-downloader/blob/master/src/YouTubeDownloader.php

Additional Information
This code is in the laravel framework, the code here is in the UrlController. This is a local development server, this error also shows up when the firewall is disabled. All the functions used in my code are in the YouTubeDownloader.php file

Advertisement

Answer

I ran into this issue as well and was able to follow up a little deeper into @Huzaifa99’s recommendations.

In my case, I was running a Laravel app with PHP 7.4.5 on Windows. There is apparently an issue with OpenSSL v1.1.1e, possibly just with Windows. Installing the latest build of PHP 7.4.6+ fixed my issues. Specifically, the replacing the file libssl-1_1-x64.dll.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement