e-alfred / ocdownloader

ocDownloader - AGPL-licensed multi-protocol download manager for Nextcloud using ARIA2, youtube-dl and Curl (supports Youtube, BitTorrent, HTTP, FTP)
https://github.com/e-alfred/ocdownloader
GNU Affero General Public License v3.0
375 stars 85 forks source link

Youtube-DL does not work (ignores the absolute path of the yt-dl bin) #199

Open xkill opened 3 years ago

xkill commented 3 years ago

Steps to reproduce

  1. update youtube-dl to the latest version
  2. try to download any youtube video
  3. the error: "Unable to retrieve true YouTube video URL" will appear

Expected behaviour

Youtube video start to download

Actual behaviour

Error message appears: Unable to retrieve true YouTube video URL

Server configuration

Operating system: Ubuntu 20.04.2

Web server: nginx + php-fmp

Database: mariadb

PHP version: 7.4.3

Nextcloud version: tested on 20.0.6 and 20.0.7

Updated from an older Nextcloud/ownCloud or fresh install: Updated from older nextcloud versions.

Where did you install Nextcloud from: N/A

Signing status:

Signing status No errors have been found.

List of activated apps:

App list ``` Enabled: - accessibility: 1.6.0 - activity: 2.13.4 - admin_audit: 1.10.0 - announcementcenter: 4.0.1 - apporder: 0.11.0 - audioplayer: 3.0.0 - audioplayer_editor: 0.3.0 - bruteforcesettings: 2.0.1 - calendar: 2.1.3 - camerarawpreviews: 0.7.10 - carnet: 0.23.7 - checksum: 1.0.1 - cloud_federation_api: 1.3.0 - comments: 1.10.0 - contacts: 3.4.3 - contactsinteraction: 1.1.0 - dashboard: 7.0.0 - dav: 1.16.2 - documentserver_community: 0.1.8 - drawio: 0.9.8 - epubreader: 1.4.5 - extract: 1.3.0 - facerecognition: 0.7.2 - federatedfilesharing: 1.10.2 - federation: 1.10.1 - files: 1.15.0 - files_antivirus: 3.1.2 - files_downloadactivity: 1.9.0 - files_external: 1.11.1 - files_markdown: 2.3.1 - files_mindmap: 0.0.24 - files_pdfviewer: 2.0.1 - files_photospheres: 1.20.1 - files_rightclick: 0.17.0 - files_sharing: 1.12.2 - files_trashbin: 1.10.1 - files_versions: 1.13.0 - files_videoplayer: 1.9.0 - forms: 2.1.0 - logreader: 2.5.0 - lookup_server_connector: 1.8.0 - maps: 0.1.8 - metadata: 0.12.0 - nextcloud_announcements: 1.9.0 - notifications: 2.8.0 - oauth2: 1.8.0 - ocdownloader: 1.7.10 - onlyoffice: 6.2.0 - password_policy: 1.10.1 - photos: 1.2.3 - polls: 1.7.5 - previewgenerator: 3.1.1 - privacy: 1.4.0 - provisioning_api: 1.10.0 - quota_warning: 1.9.1 - recommendations: 0.8.0 - serverinfo: 1.10.0 - settings: 1.2.0 - sharebymail: 1.10.0 - socialsharing_email: 2.1.0 - spreed: 10.0.5 - survey_client: 1.8.0 - systemtags: 1.10.0 - tasks: 0.13.6 - text: 3.1.0 - theming: 1.11.0 - twofactor_backupcodes: 1.9.0 - twofactor_totp: 5.0.0 - unsplash: 1.2.1 - updatenotification: 1.10.0 - user_status: 1.0.1 - video_converter: 1.0.0 - viewer: 1.4.0 - weather_status: 1.0.0 - workflowengine: 2.2.0 Disabled: - admin_notifications - emlviewer - encryption - files_clipboard - files_retention - firstrunwizard - flowupload - sharelisting - sharerenamer - support - user_ldap ```

Nextcloud configuration:

Config from occ ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "20.0.7.1", "installed": true, "theme": "", "maintenance": false, "loglevel": "0", "log_type": "file", "logfile": "\/srv\/http\/***REMOVED SENSITIVE VALUE***\/nextcloud-logs\/nextcloud.log", "share_folder": "\/Shared", "forcessl": true, "mail_smtpmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "secret": "***REMOVED SENSITIVE VALUE***", "filelocking.enabled": true, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "dbindex": 0, "timeout": 1.5 }, "memcache.locking": "\\OC\\Memcache\\Redis", "trashbin_retention_obligation": "auto", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "mysql.utf8mb4": true, "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "overwriteprotocol": "https", "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***", "data-fingerprint": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***", "***REMOVED SENSITIVE VALUE***", "***REMOVED SENSITIVE VALUE***" ], "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\Movie", "OC\\Preview\\Photoshop", "OC\\Preview\\SVG", "OC\\Preview\\TIFF", "OC\\Preview\\Font", "OC\\Preview\\Image", "OC\\Preview\\MKV", "OC\\Preview\\MP4", "OC\\Preview\\MTS", "OC\\Preview\\AVI" ], "has_rebuilt_cache": true, "preview_max_x": "1080", "preview_max_y": "1920", "jpeg_quality": "60", "preview": { "jpeg_quality": "60" }, "encryption.legacy_format_support": false, "encryption.key_storage_migrated": false, "updater.secret": "***REMOVED SENSITIVE VALUE***" } } ```

ocDownloader configuration:

Which downloader are you using: Aria2

Do you use a proxy: No

Which protocols do you allow: FTP, HTTP, Bittorrent and Youtube

Aria2c configuration (remove if not used):

See https://github.com/e-alfred/ocdownloader/wiki/Aria2c-Daemon-Setup (this is my configuration)

Aria2c error log
Aria2c log file (set the log level to debug by using --log-level=debug) ``` N/A ```

Client configuration

Browser: Chrome and Firefox

Operating system: Ubuntu 20.04

Logs

Web server error log

Web server error log ``` No errors ```

Nextcloud log (data/nextcloud.log)

Nextcloud log Confidential, but no errors apart of: ``` "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead." ``` on most of the apps.

Browser log

Browser log ``` $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 5 globals.js:60:15 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 8 globals.js:60:15 $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 21 globals.js:60:15 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. ```
xkill commented 3 years ago

Related to #173

Fixed it, by making a a symlink on /usr/bin/:

cd /usr/bin
ln -s ../usr/local/bin/youtube-dl

So basically the bug is that ocDownloader is ignoring the absolute path set on the admin settings page.

weeman1337 commented 3 years ago

@xkill found that as well. A workaround is to write something different into the settings input → save → put your path into it.

weeman1337 commented 3 years ago

@e-alfred I would like to spend some work on the settings, since the have this "default value" issue in general (not only the path). Waiting for #204 before since this migrates the settings to the new API.

e-alfred commented 3 years ago

@weeman1337 Thanks for your help! I will review your changes and merge them as soon as possible.

changemenemo commented 3 years ago

I can confirm it's still a bug in 1.7.11 version fo your plugin

changemenemo commented 3 years ago

I m going to add that the problem is resolvable when aria is not configured. By resolvable I mean that as someone proposed, you change it to a wrong path, the setting is saved but give you a red error message as it supposed to do( YouTube-dl is not located at this location) then you change it back again to the old value -> accepted and saved.

But when aria is correctly running and configured as described in the wiki then it gives the error message again about youtube-dl not being able to retrieve the url

ÉDIT: i should specify that It is working when curl is selected as the downloader. I don't understand why all of a sudden YouTube-dl is not working after the change to aria2c

changemenemo commented 3 years ago

Still nothing about this ?

e-alfred commented 3 years ago

@boistordu 1.7.12 has all the patches from @weeman1337 included. Could you test it again?

RealSerga commented 2 years ago

@e-alfred, version 1.8.0 Settings start working (absolute path) after waiting a few minutes