ocdownloader icon indicating copy to clipboard operation
ocdownloader copied to clipboard

Exception: Argument 4 passed to OC\Files\Utils\Scanner::__construct() must implement interface Psr\Log\LoggerInterface

Open jackrsteiner opened this issue 2 years ago • 2 comments

Steps to reproduce

  1. Install ocdownloader 1.8.1 on Nextcloud 24.0.5 using Apps in browser.
  2. "YouTube DL Binary Path" points to custom youtube-dl install directory.
  3. "Which downloader do you want to use?" select cURL.
  4. Confirm cURL is installed on system.
  5. Confirm php extension cURL is installed. Not sure if this is different from php-curl.
  6. Make SERVER/fallback.* executable.
  7. Browse to domain/index.php/apps/ocdownloader/add

Expected behaviour

Access the ocdownloader landing page

Actual behaviour

Page with:

Internal Server Error The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

Technical details Remote Address: 120.17.79.217 Request ID: YzZgRe1xP2FGa1RuZbwv@AAAABM

Server configuration

Operating system: Ubuntu 18.04.4 LTS

Web server: Apache

Database: mysql 8.0.28

PHP version: 7.4.25

Nextcloud version: 24.0.5

Updated from an older Nextcloud/ownCloud or fresh install: Has been updated, but never installed ocDownloader before.

Where did you install Nextcloud from: Installed on shared host. Not in container.

index.php/settings/integrity/failed: No errors have been found.

List of activated apps:

Enabled: - accessibility: 1.10.0 - activity: 2.16.0 - bruteforcesettings: 2.4.0 - circles: 24.0.1 - cloud_federation_api: 1.7.0 - comments: 1.14.0 - contactsinteraction: 1.5.0 - dav: 1.22.0 - federatedfilesharing: 1.14.0 - federation: 1.14.0 - files: 1.19.0 - files_pdfviewer: 2.5.0 - files_rightclick: 1.3.0 - files_sharing: 1.16.2 - files_trashbin: 1.14.0 - files_versions: 1.17.0 - files_videoplayer: 1.13.0 - logreader: 2.9.0 - lookup_server_connector: 1.12.0 - maps: 0.2.1 - nextcloud_announcements: 1.13.0 - notifications: 2.12.1 - oauth2: 1.12.0 - password_policy: 1.14.0 - photos: 1.6.0 - privacy: 1.8.0 - provisioning_api: 1.14.0 - recommendations: 1.3.0 - serverinfo: 1.14.0 - settings: 1.6.0 - sharebymail: 1.14.0 - support: 1.7.0 - survey_client: 1.12.0 - systemtags: 1.14.0 - text: 3.5.1 - theming: 1.15.0 - twofactor_backupcodes: 1.13.0 - updatenotification: 1.14.0 - user_status: 1.4.0 - viewer: 1.8.0 - workflowengine: 2.6.0 Disabled: - admin_audit - dashboard: 7.1.0 - encryption - files_external - firstrunwizard: 2.10.0 - ocdownloader: 1.8.1 (only after failure) - user_ldap - weather_status: 1.1.0

Nextcloud configuration:

"system": {
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "{MYDOMAIN}"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "24.0.5.1",
    "overwrite.cli.url": "https:\/\/{MYDOMAIN}",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "maintenance": false,
    "loglevel": 2,
    "theme": "",
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "ssl",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "updater.release.channel": "stable",
    "filesystem_check_changes": 0,
    "updater.secret": "***REMOVED SENSITIVE VALUE***"
}

}

Are you using external storage, if yes which one (currently not supported by ocDownloader): Local only

Are you using encryption (currently not supported by ocDownloader): No

Are you using an external user-backend, if yes which one: No

ocDownloader configuration:

Which downloader are you using: Curl

Do you use a proxy: No

Which protocols do you allow: FTP/HTTP/Youtube

Nextcloud log (data/nextcloud.log)

Nextcloud formatted log [index] Error: Exception: Argument 4 passed to OC\Files\Utils\Scanner::__construct() must implement interface Psr\Log\LoggerInterface, instance of OC\Log given, called in /home/{USER}/{DOMAINDIR}/apps/ocdownloader/controller/index.php on line 249 in file '/home/{USER}/{DOMAINDIR}/lib/private/Files/Utils/Scanner.php' line 95 at >
  1. /home/{USER}/{DOMAINDIR}/lib/private/AppFramework/App.php line 172 OC\AppFramework\Http\Dispatcher->dispatch(OCA\ocDownloader\Controller\Index {}, "Add")
  2. /home/{USER}/{DOMAINDIR}/lib/private/Route/Router.php line 298 OC\AppFramework\App::main("IndexController", "Add", OC\AppFramework\ ... {}, ["ocdownloader.Index.Add"])
  3. /home/{USER}/{DOMAINDIR}/lib/base.php line 1030 OC\Route\Router->match("/apps/ocdownloader/add")
  4. /home/{USER}/{DOMAINDIR}/index.php line 36 OC::handleRequest()

GET /index.php/apps/ocdownloader/add from 120.17.79.217 by superuser at 2022-09-30T03:19:33+00:00

Thanks

jackrsteiner avatar Sep 30 '22 04:09 jackrsteiner

Same error on Nextcloud 25 (Ubuntu 22) and nginx

TubaApollo avatar Oct 12 '22 17:10 TubaApollo

Same error on Nextcloud image v24.0.6 with added aria2 and youtube-dl, though spotted when trying to go to index.php/apps/ocdownloader/add

It seems to be duplicate of: https://github.com/e-alfred/ocdownloader/issues/248 Which effectively is: https://github.com/e-alfred/ocdownloader/pull/247 and: https://github.com/e-alfred/ocdownloader/issues/245

Hope that could be merged into mainline for v24 as it seems like it breaks pre v24 though is required on v24.

Seems like it's pending @e-alfred PR approval.

bugsyb avatar Oct 17 '22 19:10 bugsyb