Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Failed to get deciphers function #349

Closed
zannix opened this issue Nov 16, 2018 · 3 comments
Closed

Failed to get deciphers function #349

zannix opened this issue Nov 16, 2018 · 3 comments

Comments

@zannix
Copy link

zannix commented Nov 16, 2018

Getting fatal error: Failed to get deciphers function
Trying for video id: y5QaCpZhgzs

Stack trace:

Fatal error: Uncaught Exception: Failed to get deciphers function in /public/vendor/jeckman/YouTube-Downloader/src/Provider/Youtube/SignatureDecipher.php:187 Stack trace: #0 /public/vendor/jeckman/YouTube-Downloader/src/Provider/Youtube/Format.php(161): YoutubeDownloader\Provider\Youtube\SignatureDecipher::extractDecipherOpcode('var _yt_player=...', Object(YoutubeDownloader\Logger\HandlerAwareLogger)) #1 /public/vendor/jeckman/YouTube-Downloader/src/Provider/Youtube/Format.php(223): YoutubeDownloader\Provider\Youtube\Format->parseUrl() #2 /public/vendor/jeckman/YouTube-Downloader/src/Application/ControllerAbstract.php(238): YoutubeDownloader\Provider\Youtube\Format->getItag() #3 /public/vendor/jeckman/YouTube-Downloader/src/Application/ResultController.php(101): YoutubeDownloader\Application\ControllerAbstract->getDownloadUrlByFormat(Object(YoutubeDownloader\Provid in /public/vendor/jeckman/YouTube-Downloader/src/Provider/Youtube/SignatureDecipher.php on line 187

@jswails
Copy link

jswails commented Nov 16, 2018

I get the same error on that one too. Seems something has changed again with ciphers. I tried a number of music downloads just now and couldnt get them to work either. I was able to get some video downloads to work to verify it wasnt just broken.

@zannix
Copy link
Author

zannix commented Nov 16, 2018

Solved

SignatureDecipher.php, line: 183

if($deciphers && count($deciphers[0]) > 2){

changed to

if($deciphers && count($deciphers[0]) >= 2){

because for some reason $deciphers[0] contained 2 elements only.

I didn't fully inspect the source code for this project and I don't know if that will negatively affect something else, but it seems to be working great for me.

Someone with more knowledge should do a PR.

@jeckman
Copy link
Owner

jeckman commented Nov 16, 2018

Merged in #350

@jeckman jeckman closed this as completed Nov 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants