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

ocDownloader broken on Nextcloud 21 Release (500 Internal Server Error) #200

Closed StupidJolteon closed 3 years ago

StupidJolteon commented 3 years ago
### Steps to reproduce 1. Install Nextcloud 21 2. Install ocDownloader plugin ### Expected behaviour When you access ocDownloader via the top pane, it takes you to the plugin downloaded page. ### Actual behaviour Internal Server Error ### Server configuration **Operating system**: Ubuntu 20.04 **Web server:** apache2 **Database:** MySQL **PHP version:** 7.4 **Nextcloud version:** 21.0 **Updated from an older Nextcloud/ownCloud or fresh install:** Fresh Install **Where did you install Nextcloud from:** Nextcloud homepage **Signing status:**
Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. ```
**List of activated apps:**
App list ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ```
**Nextcloud configuration:**
Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ```
**Are you using external storage, if yes which one (currently not supported by ocDownloader):** No **Are you using encryption (currently not supported by ocDownloader):** No **Are you using an external user-backend, if yes which one:** No #### LDAP configuration (delete this part if not used)
LDAP config ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ```
#### ocDownloader configuration: **Which downloader are you using:** Aria2 **Do you use a proxy:** No **Which protocols do you allow**: HTTPS #### Aria2c configuration (remove if not used): **Which command line/configuration options are you using:** Post command line/options here... ##### Aria2c error log
Aria2c log file (set the log level to debug by using --log-level=debug) ``` Insert your Aria2c error log here ```
### Client configuration **Browser: Firefox **Operating system:** Windows 10 ### Logs #### Web server error log
Web server error log ``` Insert your webserver log here ```
#### Nextcloud log (data/nextcloud.log)
Nextcloud log ``` Insert your Nextcloud log here ```
#### Browser log
Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
Happyfeet01 commented 3 years ago

Error:

`Call to a member function is_dir() on null

/var/www/nextcloud/apps/ocdownloader/controller/index.php - line 250:

OC\Files\Filesystem::is_dir()

/var/www/nextcloud/apps/ocdownloader/controller/index.php - line 90:

OCA\ocDownloader\Controller\Index->syncDownloadsFolder()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 218:

OCA\ocDownloader\Controller\Index->add()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 127:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 157:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 302:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 993:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 37:

OC::handleRequest()`
moviuro commented 3 years ago

Mine looks like:

{"reqId":"mS7qtXJI00Ukkr1oqzql","level":3,"time":"2021-03-05T18:41:44+00:00","remoteAddr":"10.21.10.12","user":"nextcloud-administrator","app":"PHP","method":"GET","url":"/settings/admin/logging","message":{"Exception":"Error","Message":"Undefined index: VAL at /usr/local/www/nextcloud/apps/ocdownloader/settings/admin.php#28","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/ocdownloader/settings/admin.php","line":28,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8,"Undefined index: VAL","/usr/local/www/nextcloud/apps/ocdownloader/settings/admin.php",28,{"0":"And 3 more entries, set log level to debug to see all entries","type":"admin","forms":[],"source":["ocdownloader/settings/admin.php"],"form":"ocdownloader/settings/admin.php","Tmpl":{"__class__":"OCP\\Template"}}]},{"file":"/usr/local/www/nextcloud/lib/private/legacy/OC_App.php","line":660,"args":["/usr/local/www/nextcloud/apps/ocdownloader/settings/admin.php"],"function":"include"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":95,"function":"getForms","class":"OC_App","type":"::","args":["admin"]},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":124,"function":"formatSections","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[[[{"__class__":"OCA\\Settings\\Sections\\Admin\\Overview"}],[{"__class__":"OCA\\Support\\Settings\\Section"},{"__class__":"OCA\\Settings\\Sections\\Admin\\Server"}],[{"__class__":"OCA\\Settings\\Sections\\Admin\\Sharing"}],[{"__class__":"OCA\\Settings\\Sections\\Admin\\Security"}],[{"__class__":"OCA\\Theming\\Settings\\Section"}],"And 5 more entries, set log level to debug to see all entries"],"logging","admin","admin",false]},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":76,"function":"formatAdminSections","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","logging",false]},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":148,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","logging"]},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","logging"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["logging"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"section":"logging","_route":"settings.AdminSettings.index"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/logging"]},{"file":"/usr/local/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36","version":"21.0.0.18","id":"60427b6963133"}
[PHP] Error: Error: Undefined index: VAL at /usr/local/www/nextcloud/apps/ocdownloader/settings/admin.php#28 at <<closure>>

 0. /usr/local/www/nextcloud/apps/ocdownloader/settings/admin.php line 28
    OC\Log\ErrorHandler::onError(8, "Undefined index: VAL", "/usr/local/www/ ... p", 28, {0: "And 3 more  ... }})
 1. /usr/local/www/nextcloud/lib/private/legacy/OC_App.php line 660
    include("/usr/local/www/ ... p")
 2. /usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php line 95
    OC_App::getForms("admin")
 3. /usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php line 124
    OCA\Settings\Controller\AdminSettingsController->formatSections([[OCA\Settings\S ... "], "logging", "admin", "admin", false)
 4. /usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php line 76
    OCA\Settings\Controller\AdminSettingsController->formatAdminSections("admin", "logging", false)
 5. /usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php line 148
    OCA\Settings\Controller\AdminSettingsController->getNavigationParameters("admin", "logging")
 6. /usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/AdminSettingsController.php line 68
    OCA\Settings\Controller\AdminSettingsController->getIndexResponse("admin", "logging")
 7. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 218
    OCA\Settings\Controller\AdminSettingsController->index("logging")
 8. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 127
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings\Con ... {}, "index")
 9. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 157
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con ... {}, "index")
10. /usr/local/www/nextcloud/lib/private/Route/Router.php line 302
    OC\AppFramework\App::main("OCA\\Settings\\ ... r", "index", OC\AppFramework\ ... {}, {section: "loggi ... "})
11. /usr/local/www/nextcloud/lib/base.php line 993
    OC\Route\Router->match("/settings/admin/logging")
12. /usr/local/www/nextcloud/index.php line 37
    OC::handleRequest()

GET /settings/admin/logging
from 10.21.10.12 by nextcloud-administrator at 2021-03-05T18:41:44+00:00

FreeBSD jail with nextcloud-php73 21.0.0 from binary packages.

And I also have a similar error to that of @HappyFeet01

[index] Error: Exception: Call to a member function is_dir() on null at <<closure>>

0. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 157
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\ocDownloader\Controller\Index {}, "Add")
1. /usr/local/www/nextcloud/lib/private/Route/Router.php line 302
   OC\AppFramework\App::main("IndexController", "Add", OC\AppFramework\ ... {}, {_route: "ocdownloader.Index.Add"})
2. /usr/local/www/nextcloud/lib/base.php line 993
   OC\Route\Router->match("/apps/ocdownloader/add")
3. /usr/local/www/nextcloud/index.php line 37
   OC::handleRequest()

GET /apps/ocdownloader/add
from 10.21.10.12 by moviuro at 2021-03-05T18:46:02+00:00

Also tried with nextcloud-php80:

Access to ocDownloader with an admin account:

[index] Error: Exception: Call to a member function is_dir() on null at <<closure>>

0. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 157
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\ocDownloader\Controller\Index {}, "Add")
1. /usr/local/www/nextcloud/lib/private/Route/Router.php line 302
   OC\AppFramework\App::main("IndexController", "Add", OC\AppFramework\ ... {}, {_route: "ocdownloader.Index.Add"})
2. /usr/local/www/nextcloud/lib/base.php line 993
   OC\Route\Router->match("/apps/ocdownloader/add")
3. /usr/local/www/nextcloud/index.php line 37
   OC::handleRequest()

GET /apps/ocdownloader/add
from 10.21.10.12 by nextcloud-administrator at 2021-03-05T18:57:13+00:00

Access as a user:

[index] Error: Exception: Call to a member function is_dir() on null at <<closure>>

0. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 157
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\ocDownloader\Controller\Index {}, "Add")
1. /usr/local/www/nextcloud/lib/private/Route/Router.php line 302
   OC\AppFramework\App::main("IndexController", "Add", OC\AppFramework\ ... {}, {_route: "ocdownloader.Index.Add"})
2. /usr/local/www/nextcloud/lib/base.php line 993
   OC\Route\Router->match("/apps/ocdownloader/add")
3. /usr/local/www/nextcloud/index.php line 37
   OC::handleRequest()

GET /apps/ocdownloader/add
from 10.21.10.12 by moviuro at 2021-03-05T18:59:09+00:00