Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run YouTube downloads without php-curl, but php-curl isn't used in youtube-dl #224

Open
aclbandit opened this issue Oct 8, 2021 · 0 comments

Comments

@aclbandit
Copy link

aclbandit commented Oct 8, 2021

Steps to reproduce

  1. Deploy nextcloud:latest container (Debian-based, no longer contains php-curl)
  2. Install python3-pip
  3. Install youtube-dl via pip3
  4. (did not install php-curl, since it's unavailable and should be unnecessary for youtube-dl)
  5. Attempt to download a video via ocDownloader

Expected behaviour

Video downloads

Actual behaviour

Gets stuck on "Waiting."

cat /tmp/nohup.out 

Fatal error: Uncaught TypeError: curl_setopt(): supplied argument is not a valid File-Handle resource in /var/www/html/custom_apps/ocdownloader/SERVER/fallback.php:99
Stack trace:
#0 /var/www/html/custom_apps/ocdownloader/SERVER/fallback.php(99): curl_setopt(Object(CurlHandle), 10001, '1633720269_MC_H...')
#1 /var/www/html/custom_apps/ocdownloader/SERVER/fallback.php(34): OCD::curlSetAdvancedOptions(Array)
#2 /var/www/html/custom_apps/ocdownloader/SERVER/fallback.php(115): OCD::load('616097cd0fad4', 'https://r2---sn...', Array)
#3 {main}
  thrown in /var/www/html/custom_apps/ocdownloader/SERVER/fallback.php on line 99

A workaround is to remove line 99:

            curl_setopt(self::$CurlHandler, CURLOPT_FILE, $OPTIONS['out']);

from fallback.php (https://github.com/e-alfred/ocdownloader/blob/master/SERVER/fallback.php)

Server configuration

Operating system:
Debian 11

Web server:
apache2

Database:
MariaDB

PHP version:
8.0.11

Nextcloud version: (see Nextcloud admin page)
22.2.0

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from an older

Where did you install Nextcloud from:
DockerHub

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.8.0
  - activity: 2.15.0
  - breezedark: 22.0.2
  - calendar: 2.3.4
  - camerarawpreviews: 0.7.12
  - circles: 22.1.1
  - cloud_federation_api: 1.5.0
  - comments: 1.12.0
  - contactsinteraction: 1.3.0
  - dashboard: 7.2.0
  - dav: 1.19.0
  - federatedfilesharing: 1.12.0
  - federation: 1.12.0
  - files: 1.17.0
  - files_antivirus: 3.2.2
  - files_pdfviewer: 2.3.0
  - files_rightclick: 1.1.0
  - files_sharing: 1.14.0
  - files_trashbin: 1.12.0
  - files_versions: 1.15.0
  - files_videoplayer: 1.11.0
  - firstrunwizard: 2.11.0
  - logreader: 2.7.0
  - lookup_server_connector: 1.10.0
  - music: 1.3.3
  - nextcloud_announcements: 1.11.0
  - notifications: 2.10.1
  - oauth2: 1.10.0
  - ocdownloader: 1.7.12
  - password_policy: 1.12.0
  - photos: 1.4.0
  - privacy: 1.6.0
  - provisioning_api: 1.12.0
  - ransomware_protection: 1.11.0
  - recommendations: 1.1.0
  - serverinfo: 1.12.0
  - settings: 1.4.0
  - sharebymail: 1.12.0
  - support: 1.5.0
  - survey_client: 1.10.0
  - systemtags: 1.12.0
  - text: 3.3.0
  - theming: 1.13.0
  - twofactor_backupcodes: 1.11.0
  - updatenotification: 1.12.0
  - user_status: 1.2.0
  - video_converter: 1.0.3
  - viewer: 1.6.0
  - weather_status: 1.2.0
  - workflowengine: 2.4.0
Disabled:
  - admin_audit
  - bruteforcesettings
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
              "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "22.2.0.2",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbport": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mysql.utf8mb4": true,
        "dbtableprefix": "oc_",
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "overwrite.cli.url": "***REMOVED SENSITIVE **VALUE***"**
    }
}

Are you using external storage, if yes which one (currently not supported by ocDownloader): local/smb/sftp/...
Yes, NFS mount

Are you using encryption (currently not supported by ocDownloader): yes/no
??? SSL? Yes?

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

ocDownloader configuration:

Which downloader are you using: Curl/Aria2
n/a -- youtube-dl. Set as curl, though.

Do you use a proxy: Yes/No
No

Which protocols do you allow:
Youtube only

Client configuration

Browser:
FireFox

Operating system:
Fedora 34

Logs

Web server error log

Web server error log

[Web server logs omitted -- can provide, but seem unnecessary]

Nextcloud log (data/nextcloud.log)

Nextcloud log

[NextCloud logs omitted -- can provide, but seem unnecessary]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant