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

Internal Server Error after upgrade to 1.7.9 #192

Closed nikolafamit closed 3 years ago

nikolafamit commented 3 years ago

Im using: Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic

After upgrade to ver 1.7.9 ocDownloader, when i want to open app or to go on NextCloud Settings, im getting error: 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: 24.135.92.22 Request ID: xtahd3UavYzB61UO4Sq0

e-alfred commented 3 years ago

Could you try to uninstall and reinstall the app? To make it compatible I had to change the database table names so it stays compatible with Nextcloud 20.

If you are able to access your database, you could try to rename the tables ocdownloader_adminsettings to ocdownloader_admin and ocdownloader_personalsettings to ocdownloader_personal.

nikolafamit commented 3 years ago

I tried remove and reinstall but the same situation. I try with renaming the tables and after that it worked, but it could not find Aria2 service. So i tried in Advance setting to enter Secret Token again, but i could not save is. The spinning circle is endless.

nikolafamit commented 3 years ago

This may help what is the problem occ $ app:check-code ocdownloader Analysing /var/www/nextcloud/apps/ocdownloader/appinfo/app.php 4 errors line 22: OCP\App - Static method of deprecated class must not be called line 22: OCP\App::registerAdmin - Method of deprecated class must not be called line 23: OCP\App - Static method of deprecated class must not be called line 23: OCP\App::registerPersonal - Method of deprecated class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/SERVER/fallback.php 8 errors line 43: != - is discouraged line 44: == - is discouraged line 44: == - is discouraged line 45: == - is discouraged line 46: == - is discouraged line 47: == - is discouraged line 67: == - is discouraged line 67: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/queue.php 68 errors line 38: == - is discouraged line 47: == - is discouraged line 130: == - is discouraged line 134: OC_DB - Static method of private class must not be called line 140: == - is discouraged line 165: == - is discouraged line 169: == - is discouraged line 170: != - is discouraged line 170: == - is discouraged line 172: == - is discouraged line 174: == - is discouraged line 176: == - is discouraged line 180: == - is discouraged line 190: != - is discouraged line 191: == - is discouraged line 191: == - is discouraged line 196: == - is discouraged line 201: OC_DB - Static method of private class must not be called line 208: == - is discouraged line 212: == - is discouraged line 216: OC_DB - Static method of private class must not be called line 231: == - is discouraged line 236: OC_DB - Static method of private class must not be called line 265: == - is discouraged line 324: == - is discouraged line 329: != - is discouraged line 330: != - is discouraged line 331: == - is discouraged line 335: == - is discouraged line 337: == - is discouraged line 341: OC_DB - Static method of private class must not be called line 377: == - is discouraged line 382: != - is discouraged line 383: != - is discouraged line 384: == - is discouraged line 388: == - is discouraged line 390: == - is discouraged line 394: OC_DB - Static method of private class must not be called line 435: == - is discouraged line 439: OC_DB - Static method of private class must not be called line 471: == - is discouraged line 475: OC_DB - Static method of private class must not be called line 518: == - is discouraged line 524: != - is discouraged line 525: != - is discouraged line 527: == - is discouraged line 531: != - is discouraged line 531: == - is discouraged line 535: == - is discouraged line 538: == - is discouraged line 543: OC_DB - Static method of private class must not be called line 585: == - is discouraged line 588: != - is discouraged line 589: != - is discouraged line 590: == - is discouraged line 593: == - is discouraged line 596: == - is discouraged line 601: OC_DB - Static method of private class must not be called line 643: == - is discouraged line 648: == - is discouraged line 650: == - is discouraged line 657: == - is discouraged line 661: OC_DB - Static method of private class must not be called line 694: == - is discouraged line 696: == - is discouraged line 698: == - is discouraged line 705: == - is discouraged line 709: OC_DB - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/btdownloader.php 10 errors line 49: == - is discouraged line 67: == - is discouraged line 76: == - is discouraged line 92: == - is discouraged line 120: OC_User - Static method of private class must not be called line 164: == - is discouraged line 169: OC_DB - Static method of private class must not be called line 180: == - is discouraged line 239: OC_User - Static method of private class must not be called line 266: OC_User - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/ytdownloader.php 9 errors line 49: == - is discouraged line 90: == - is discouraged line 95: == - is discouraged line 119: OC_User - Static method of private class must not be called line 129: == - is discouraged line 135: == - is discouraged line 181: == - is discouraged line 190: == - is discouraged line 196: OC_DB - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/personalsettings.php 3 errors line 62: == - is discouraged line 62: == - is discouraged line 93: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/aria2.php 1 errors line 31: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/settings.php 13 errors line 25: == - is discouraged line 55: == - is discouraged line 59: OC_DB - Static method of private class must not be called line 66: == - is discouraged line 76: == - is discouraged line 80: OC_DB - Static method of private class must not be called line 88: == - is discouraged line 98: == - is discouraged line 102: OC_DB - Static method of private class must not be called line 115: == - is discouraged line 119: OC_DB - Static method of private class must not be called line 132: == - is discouraged line 136: OC_DB - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/tools.php 10 errors line 136: == - is discouraged line 144: OC_DB - Static method of private class must not be called line 164: == - is discouraged line 167: OC_DB - Static method of private class must not be called line 173: != - is discouraged line 174: != - is discouraged line 180: == - is discouraged line 182: == - is discouraged line 185: OC_DB - Static method of private class must not be called line 192: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/api.php 37 errors line 50: == - is discouraged line 94: == - is discouraged line 95: OC_User - Static method of private class must not be called line 115: OC_User - Static method of private class must not be called line 118: OC_User - Static method of private class must not be called line 145: == - is discouraged line 154: == - is discouraged line 160: OC_DB - Static method of private class must not be called line 165: == - is discouraged line 217: == - is discouraged line 222: OC_DB - Static method of private class must not be called line 229: == - is discouraged line 253: == - is discouraged line 257: == - is discouraged line 258: == - is discouraged line 258: != - is discouraged line 260: == - is discouraged line 262: == - is discouraged line 264: == - is discouraged line 268: == - is discouraged line 277: != - is discouraged line 278: == - is discouraged line 278: == - is discouraged line 282: == - is discouraged line 287: OC_DB - Static method of private class must not be called line 294: == - is discouraged line 298: == - is discouraged line 302: OC_DB - Static method of private class must not be called line 317: == - is discouraged line 322: OC_DB - Static method of private class must not be called line 359: == - is discouraged line 399: == - is discouraged line 420: == - is discouraged line 424: == - is discouraged line 427: == - is discouraged line 430: == - is discouraged line 433: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/curl.php 2 errors line 63: == - is discouraged line 85: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/youtube.php 1 errors line 87: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/httpdownloader.php 10 errors line 45: == - is discouraged line 62: == - is discouraged line 66: == - is discouraged line 71: == - is discouraged line 96: OC_User - Static method of private class must not be called line 142: == - is discouraged line 150: == - is discouraged line 155: OC_DB - Static method of private class must not be called line 167: == - is discouraged line 206: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/ftpdownloader.php 11 errors line 45: == - is discouraged line 63: == - is discouraged line 67: == - is discouraged line 72: == - is discouraged line 96: OC_User - Static method of private class must not be called line 125: == - is discouraged line 140: == - is discouraged line 148: == - is discouraged line 153: OC_DB - Static method of private class must not be called line 165: == - is discouraged line 204: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/index.php 11 errors line 45: == - is discouraged line 56: OC_User - Static method of private class must not be called line 57: == - is discouraged line 60: OC_User - Static method of private class must not be called line 61: == - is discouraged line 64: OC_User - Static method of private class must not be called line 65: == - is discouraged line 68: OC_User - Static method of private class must not be called line 69: == - is discouraged line 181: != - is discouraged line 205: != - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/adminsettings.php 21 errors line 38: == - is discouraged line 67: == - is discouraged line 74: == - is discouraged line 75: == - is discouraged line 76: == - is discouraged line 82: == - is discouraged line 92: == - is discouraged line 94: == - is discouraged line 96: == - is discouraged line 100: == - is discouraged line 106: == - is discouraged line 116: == - is discouraged line 118: == - is discouraged line 121: != - is discouraged line 124: == - is discouraged line 128: == - is discouraged line 132: == - is discouraged line 136: == - is discouraged line 140: == - is discouraged line 144: == - is discouraged line 150: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/settings/personal.php 3 errors line 14: OCP\User - Static method of deprecated class must not be called line 14: OCP\User::checkLoggedIn - Method of deprecated class must not be called line 25: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/settings/admin.php 2 errors line 14: OC_User - Static method of private class must not be called line 14: OC_User - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/templates/add.php 5 errors line 31: == - is discouraged line 44: == - is discouraged line 57: == - is discouraged line 59: == - is discouraged line 62: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/templates/settings/personal.php 19 errors line 17: == - is discouraged line 47: == - is discouraged line 48: == - is discouraged line 49: == - is discouraged line 50: == - is discouraged line 51: == - is discouraged line 52: == - is discouraged line 53: == - is discouraged line 54: == - is discouraged line 55: == - is discouraged line 56: == - is discouraged line 57: == - is discouraged line 66: == - is discouraged line 70: == - is discouraged line 71: == - is discouraged line 72: == - is discouraged line 73: == - is discouraged line 74: == - is discouraged line 75: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/templates/settings/admin.php 11 errors line 57: == - is discouraged line 73: == - is discouraged line 77: == - is discouraged line 94: == - is discouraged line 94: == - is discouraged line 117: == - is discouraged line 124: == - is discouraged line 131: == - is discouraged line 136: == - is discouraged line 138: == - is discouraged line 140: == - is discouragedApp is not compliant

e-alfred commented 3 years ago

Which database type do you use?

nikolafamit commented 3 years ago

PostgreSQL

mattish91 commented 3 years ago

Have the same issue, NC 20. Here's my error log:

{"reqId":"jwrhhJAT3mbDk7m9E3jS","level":3,"time":"2020-12-19T20:18:34+00:00","remoteAddr":"x.x.x.x","user":"hiddenusername","app":"index","method":"GET","url":"/settings/user","message":{"Exception":"Doctrine\\DBAL\\Exception\\InvalidFieldNameException","Message":"An exception occurred while executing 'SELECT \"VAL\" FROM oc_ocdownloader_admin WHERE \"KEY\" = ? LIMIT 1' with params [\"AllowProtocolBT\"]:\n\nSQLSTATE[42703]: Undefined column: 7 ERROR: column \"VAL\" does not exist\nLINE 1: SELECT \"VAL\" FROM oc_ocdownloader_admin WHERE \"KEY\" = $1 LIM...\n ^","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractPostgreSQLDriver","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":149,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php","line":162,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_DB_StatementWrapper.php","line":72,"function":"execute","class":"Doctrine\\DBAL\\Statement","type":"->"},{"file":"/var/www/nextcloud/apps/ocdownloader/controller/lib/settings.php","line":85,"function":"execute","class":"OC_DB_StatementWrapper","type":"->"},{"file":"/var/www/nextcloud/apps/ocdownloader/settings/personal.php","line":24,"function":"getValue","class":"OCA\\ocDownloader\\Controller\\Lib\\Settings","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":652,"args":["/var/www/nextcloud/apps/ocdownloader/settings/personal.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Settings/Manager.php","line":263,"function":"getForms","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":119,"function":"getPersonalSections","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":64,"function":"formatPersonalSections","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":151,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php","Line":60,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDOException","Message":"SQLSTATE[42703]: Undefined column: 7 ERROR: column \"VAL\" does not exist\nLINE 1: SELECT \"VAL\" FROM oc_ocdownloader_admin WHERE \"KEY\" = $1 LIM...\n ^","Code":"42703","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php","line":153,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_DB_StatementWrapper.php","line":72,"function":"execute","class":"Doctrine\\DBAL\\Statement","type":"->"},{"file":"/var/www/nextcloud/apps/ocdownloader/controller/lib/settings.php","line":85,"function":"execute","class":"OC_DB_StatementWrapper","type":"->"},{"file":"/var/www/nextcloud/apps/ocdownloader/settings/personal.php","line":24,"function":"getValue","class":"OCA\\ocDownloader\\Controller\\Lib\\Settings","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":652,"args":["/var/www/nextcloud/apps/ocdownloader/settings/personal.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Settings/Manager.php","line":263,"function":"getForms","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":119,"function":"getPersonalSections","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":64,"function":"formatPersonalSections","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":151,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":129,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42703]: Undefined column: 7 ERROR: column \"VAL\" does not exist\nLINE 1: SELECT \"VAL\" FROM oc_ocdownloader_admin WHERE \"KEY\" = $1 LIM...\n ^","Code":"42703","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","line":127,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php","line":153,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_DB_StatementWrapper.php","line":72,"function":"execute","class":"Doctrine\\DBAL\\Statement","type":"->"},{"file":"/var/www/nextcloud/apps/ocdownloader/controller/lib/settings.php","line":85,"function":"execute","class":"OC_DB_StatementWrapper","type":"->"},{"file":"/var/www/nextcloud/apps/ocdownloader/settings/personal.php","line":24,"function":"getValue","class":"OCA\\ocDownloader\\Controller\\Lib\\Settings","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":652,"args":["/var/www/nextcloud/apps/ocdownloader/settings/personal.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Settings/Manager.php","line":263,"function":"getForms","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":119,"function":"getPersonalSections","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":64,"function":"formatPersonalSections","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":151,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":127}},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.41 Safari/537.36 Edg/88.0.705.22","version":"20.0.4.0","id":"5fde606861e1c"}

Hope this helps in any way as i use ocDownloader to grab files from various sources.

e-alfred commented 3 years ago

@mattish91 Can you try to rename the tables in your database as explained in https://github.com/e-alfred/ocdownloader/issues/192#issuecomment-747686827 to see if this fixes your problem?

aduarte9 commented 3 years ago

@e-alfred I've tryed remove ocDownloader, remove all oc_ocdownload tables and all references to ocdownloader in oc_appconfig, oc_migrations, then installed ocDownloader from webinterface again to try fresh install and it doesn't work also.

It seems that it's related to case sensitive.

Error in nextcloud:

SQLSTATE[42703]: Undefined column: 7 ERROR:  column "VAL" does not exist
LINE 1: SELECT "VAL" FROM oc_ocdownloader_admin WHERE "KEY" = $1 LIM...
               ^ at <<closure>>

Table created in postgres:

nextcloud=# SELECT "VAL" FROM oc_ocdownloader_admin ;
ERROR:  column "VAL" does not exist
LINE 1: SELECT "VAL" FROM oc_ocdownloader_admin ;
               ^
nextcloud=# SELECT * from oc_ocdownloader_admin;
 id | key | val 
----+-----+-----
(0 rows)

nextcloud=# SELECT val from oc_ocdownloader_admin;
 val 
-----
(0 rows)
nikolafamit commented 3 years ago

@mattish91 Can you try to rename the tables in your database as explained in #192 (comment) to see if this fixes your problem?

I already tried that, but it's still not working

y0grt commented 3 years ago

Same here, not working even after renaming the database tables.

vstoppe commented 3 years ago

I can confirm the problem too:

Safari/537.36" "10.1.1.42"
nexteval_pg        | 2020-12-21 22:05:30.876 CET [108] ERROR:  column "VAL" does not exist at character 8
nexteval_pg        | 2020-12-21 22:05:30.876 CET [108] STATEMENT:  SELECT "VAL" FROM oc_ocdownloader_admin WHERE "KEY" = $1 LIMIT 1

Dockerized setup

I can say the the problem occurs on a living as well on a fresh configuration.

florianschroen commented 3 years ago

Hi, the problem is the uppercase column name in the query. The columns are lowercase in the db!

Queries in app-code are also in uppercase. I guess something changed in table creation/definition.

Running it with NC 18.0.4 the User settings will open. Starting with the upgrade to NC18.0.12 the user settings refuse to open.

currently: NC 20.0.4 PostgreSQL 11.7 (Debian 11.7-0+deb10u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

already tried to remove ocdownloader and remove db entries + tables, which did not help:

drop table oc_ocdownloader_personalsettings;
drop table oc_ocdownloader_queue;
drop table oc_ocdownloader_personalsettings;
drop table oc_ocdownloader_personal;
delete from oc_appconfig where appid = 'ocdownloader';
delete from oc_migrations where app = 'ocdownloader';

PG

=# \d oc_ocdownloader_admin
                                    Table "public.oc_ocdownloader_admin"
 Column |          Type          | Collation | Nullable |                      Default
--------+------------------------+-----------+----------+---------------------------------------------------
 id     | integer                |           | not null | nextval('oc_ocdownloader_admin_id_seq'::regclass)
 key    | character varying(100) |           | not null |
 val    | character varying(255) |           |          | NULL::character varying
Indexes:
    "oc_ocdownloader_admin_pkey" PRIMARY KEY, btree (id)

=# SELECT "VAL" FROM oc_ocdownloader_admin LIMIT 1;
FEHLER:  Spalte »VAL« existiert nicht
ZEILE 1: SELECT "VAL" FROM oc_ocdownloader_admin LIMIT 1;
                ^
owncloud=# SELECT "val" FROM oc_ocdownloader_admin LIMIT 1;
 val
-----
(0 rows)

occ log:tail

Level: Error
App: index
Message:
Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT "VAL" FROM
oc_ocdownloader_admin WHERE "KEY" = ? LIMIT 1' with params ["AllowProtocolBT"]:

SQLSTATE[42703]: Undefined column: 7 FEHLER:  Spalte »VAL« existiert nicht
LINE 1: SELECT "VAL" FROM oc_ocdownloader_admin WHERE "KEY" = $1 LIM...
                ^ at .../Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php line 60

0. .../Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException(
    "An exception occurred while executing  ... ^",
    Doctrine\DBAL\Driver\PDOException {erro ... ]}
    )
1. .../doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(
    Doctrine\DBAL\Driver\PDOPgSql\Driver {},
    Doctrine\DBAL\Driver\PDOException {errorInfo:["42703",7,"FEH ... ]},
    "An exception occurred while executing 'SELECT \"VAL\" FROM  ... ^"
    )
2. .../dbal/lib/Doctrine/DBAL/Statement.php line 162
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(
    Doctrine\DBAL\Driver\PDOPgSql\Driver {},
    Doctrine\DBAL\Driver\PDOException {errorInfo:[" ... ]},
    "SELECT \"VAL\" FROM oc_ocdownloader_admin WHER ... 1",
    {1:"AllowProtocolBT"}
    )
3. lib/private/legacy/db/statementwrapper.php line 71
    Doctrine\DBAL\Statement->execute(["AllowProtocolBT"])
4. apps/ocdownloader/controller/lib/settings.php line 85
    OC_DB_StatementWrapper->execute(["AllowProtocolBT"])
5. apps/ocdownloader/settings/personal.php line 24
    OCA\ocDownloader\Controller\Lib\Settings->getValue(

    )
6. lib/private/legacy/app.php line 629
    include("\/var\/www\/nextcloud\/apps\/ocdownloader\/settings\/personal.php")
7. lib/private/Settings/Manager.php line 359
    OC_App::getForms("personal")
8. apps/settings/lib/Controller/CommonSettingsTrait.php line 119
    OC\Settings\Manager->getPersonalSections(

    )
9. .../CommonSettingsTrait.php line 64
    OCA\Settings\Controller\PersonalSettingsController->formatPersonalSections("personal", "personal-info")
10. .../CommonSettingsTrait.php line 151
    OCA\Settings\Controller\PersonalSettingsController->getNavigationParameters("personal", "personal-info")
11. .../PersonalSettingsController.php line 67
    OCA\Settings\Controller\PersonalSettingsController->getIndexResponse("personal", "personal-info")
12. .../private/AppFramework/Http/Dispatcher.php line 170
    OCA\Settings\Controller\PersonalSettingsController->index("personal-info")
13. lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(
    OCA\Settings\Controller\PersonalSettingsController {},
    "index"
    )
14. lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Controller\PersonalSettingsController {}, "index")
15. lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main(
    "OCA\\Settings\\Controller\\PersonalSettingsController",
    "index",
    OC\AppFramework\DependencyInjection\DIContainer {},
    {section:"personal-info",_route:"settings.PersonalSettings.index"}
    )
16. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({section:"personal-info",_route:"settings.Personal ... "})
17. lib/private/Route/Router.php line 299
    call_user_func(
    OC\AppFramework\Routing\RouteActionHandler {},
    {section:"personal-info",_route:"settings.PersonalSettings.index"}
    )
18. lib/base.php line 1011
    OC\Route\Router->match("\/settings\/user")
19. index.php line 38
    OC::handleRequest(

    )

apps/ocdownloader/controller/lib/settings.php:

$SQL = 'SELECT `VAL` FROM `*PREFIX*ocdownloader_'.$this->Table.'` WHERE `KEY` = ?'
e-alfred commented 3 years ago

Fixed by https://github.com/e-alfred/ocdownloader/commit/cfa4c8fb3430ab4b7a84625b44e091c4621b2124 and ocDownloader 1.7.10. Thanks for your report!

nikolafamit commented 3 years ago

Fixed by cfa4c8f and ocDownloader 1.7.10. Thanks for your report!

Actually it's not fixed. The same problem with version 1.7.10

nikolafamit commented 3 years ago

Analysing /var/www/nextcloud/apps/ocdownloader/appinfo/app.php 4 errors line 22: OCP\App - Static method of deprecated class must not be called line 22: OCP\App::registerAdmin - Method of deprecated class must not be called line 23: OCP\App - Static method of deprecated class must not be called line 23: OCP\App::registerPersonal - Method of deprecated class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/SERVER/fallback.php 8 errors line 43: != - is discouraged line 44: == - is discouraged line 44: == - is discouraged line 45: == - is discouraged line 46: == - is discouraged line 47: == - is discouraged line 67: == - is discouraged line 67: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/queue.php 68 errors line 38: == - is discouraged line 47: == - is discouraged line 130: == - is discouraged line 134: OC_DB - Static method of private class must not be called line 140: == - is discouraged line 165: == - is discouraged line 169: == - is discouraged line 170: != - is discouraged line 170: == - is discouraged line 172: == - is discouraged line 174: == - is discouraged line 176: == - is discouraged line 180: == - is discouraged line 190: != - is discouraged line 191: == - is discouraged line 191: == - is discouraged line 196: == - is discouraged line 201: OC_DB - Static method of private class must not be called line 208: == - is discouraged line 212: == - is discouraged line 216: OC_DB - Static method of private class must not be called line 231: == - is discouraged line 236: OC_DB - Static method of private class must not be called line 265: == - is discouraged line 324: == - is discouraged line 329: != - is discouraged line 330: != - is discouraged line 331: == - is discouraged line 335: == - is discouraged line 337: == - is discouraged line 341: OC_DB - Static method of private class must not be called line 377: == - is discouraged line 382: != - is discouraged line 383: != - is discouraged line 384: == - is discouraged line 388: == - is discouraged line 390: == - is discouraged line 394: OC_DB - Static method of private class must not be called line 435: == - is discouraged line 439: OC_DB - Static method of private class must not be called line 471: == - is discouraged line 475: OC_DB - Static method of private class must not be called line 518: == - is discouraged line 524: != - is discouraged line 525: != - is discouraged line 527: == - is discouraged line 531: != - is discouraged line 531: == - is discouraged line 535: == - is discouraged line 538: == - is discouraged line 543: OC_DB - Static method of private class must not be called line 585: == - is discouraged line 588: != - is discouraged line 589: != - is discouraged line 590: == - is discouraged line 593: == - is discouraged line 596: == - is discouraged line 601: OC_DB - Static method of private class must not be called line 643: == - is discouraged line 648: == - is discouraged line 650: == - is discouraged line 657: == - is discouraged line 661: OC_DB - Static method of private class must not be called line 694: == - is discouraged line 696: == - is discouraged line 698: == - is discouraged line 705: == - is discouraged line 709: OC_DB - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/btdownloader.php 10 errors line 49: == - is discouraged line 67: == - is discouraged line 76: == - is discouraged line 92: == - is discouraged line 120: OC_User - Static method of private class must not be called line 164: == - is discouraged line 169: OC_DB - Static method of private class must not be called line 180: == - is discouraged line 239: OC_User - Static method of private class must not be called line 266: OC_User - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/ytdownloader.php 9 errors line 49: == - is discouraged line 90: == - is discouraged line 95: == - is discouraged line 119: OC_User - Static method of private class must not be called line 129: == - is discouraged line 135: == - is discouraged line 181: == - is discouraged line 190: == - is discouraged line 196: OC_DB - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/personalsettings.php 3 errors line 62: == - is discouraged line 62: == - is discouraged line 93: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/aria2.php 1 errors line 31: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/settings.php 13 errors line 25: == - is discouraged line 55: == - is discouraged line 59: OC_DB - Static method of private class must not be called line 66: == - is discouraged line 76: == - is discouraged line 80: OC_DB - Static method of private class must not be called line 88: == - is discouraged line 98: == - is discouraged line 102: OC_DB - Static method of private class must not be called line 115: == - is discouraged line 119: OC_DB - Static method of private class must not be called line 132: == - is discouraged line 136: OC_DB - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/tools.php 10 errors line 136: == - is discouraged line 144: OC_DB - Static method of private class must not be called line 164: == - is discouraged line 167: OC_DB - Static method of private class must not be called line 173: != - is discouraged line 174: != - is discouraged line 180: == - is discouraged line 182: == - is discouraged line 185: OC_DB - Static method of private class must not be called line 192: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/api.php 37 errors line 50: == - is discouraged line 94: == - is discouraged line 95: OC_User - Static method of private class must not be called line 115: OC_User - Static method of private class must not be called line 118: OC_User - Static method of private class must not be called line 145: == - is discouraged line 154: == - is discouraged line 160: OC_DB - Static method of private class must not be called line 165: == - is discouraged line 217: == - is discouraged line 222: OC_DB - Static method of private class must not be called line 229: == - is discouraged line 253: == - is discouraged line 257: == - is discouraged line 258: == - is discouraged line 258: != - is discouraged line 260: == - is discouraged line 262: == - is discouraged line 264: == - is discouraged line 268: == - is discouraged line 277: != - is discouraged line 278: == - is discouraged line 278: == - is discouraged line 282: == - is discouraged line 287: OC_DB - Static method of private class must not be called line 294: == - is discouraged line 298: == - is discouraged line 302: OC_DB - Static method of private class must not be called line 317: == - is discouraged line 322: OC_DB - Static method of private class must not be called line 359: == - is discouraged line 399: == - is discouraged line 420: == - is discouraged line 424: == - is discouraged line 427: == - is discouraged line 430: == - is discouraged line 433: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/curl.php 2 errors line 63: == - is discouraged line 85: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/lib/youtube.php 1 errors line 87: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/httpdownloader.php 10 errors line 45: == - is discouraged line 62: == - is discouraged line 66: == - is discouraged line 71: == - is discouraged line 96: OC_User - Static method of private class must not be called line 142: == - is discouraged line 150: == - is discouraged line 155: OC_DB - Static method of private class must not be called line 167: == - is discouraged line 206: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/ftpdownloader.php 11 errors line 45: == - is discouraged line 63: == - is discouraged line 67: == - is discouraged line 72: == - is discouraged line 96: OC_User - Static method of private class must not be called line 125: == - is discouraged line 140: == - is discouraged line 148: == - is discouraged line 153: OC_DB - Static method of private class must not be called line 165: == - is discouraged line 204: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/index.php 11 errors line 45: == - is discouraged line 56: OC_User - Static method of private class must not be called line 57: == - is discouraged line 60: OC_User - Static method of private class must not be called line 61: == - is discouraged line 64: OC_User - Static method of private class must not be called line 65: == - is discouraged line 68: OC_User - Static method of private class must not be called line 69: == - is discouraged line 181: != - is discouraged line 205: != - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/controller/adminsettings.php 21 errors line 38: == - is discouraged line 67: == - is discouraged line 74: == - is discouraged line 75: == - is discouraged line 76: == - is discouraged line 82: == - is discouraged line 92: == - is discouraged line 94: == - is discouraged line 96: == - is discouraged line 100: == - is discouraged line 106: == - is discouraged line 116: == - is discouraged line 118: == - is discouraged line 121: != - is discouraged line 124: == - is discouraged line 128: == - is discouraged line 132: == - is discouraged line 136: == - is discouraged line 140: == - is discouraged line 144: == - is discouraged line 150: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/settings/personal.php 3 errors line 14: OCP\User - Static method of deprecated class must not be called line 14: OCP\User::checkLoggedIn - Method of deprecated class must not be called line 25: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/settings/admin.php 2 errors line 14: OC_User - Static method of private class must not be called line 14: OC_User - Static method of private class must not be calledAnalysing /var/www/nextcloud/apps/ocdownloader/templates/add.php 5 errors line 31: == - is discouraged line 44: == - is discouraged line 57: == - is discouraged line 59: == - is discouraged line 62: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/templates/settings/personal.php 19 errors line 17: == - is discouraged line 47: == - is discouraged line 48: == - is discouraged line 49: == - is discouraged line 50: == - is discouraged line 51: == - is discouraged line 52: == - is discouraged line 53: == - is discouraged line 54: == - is discouraged line 55: == - is discouraged line 56: == - is discouraged line 57: == - is discouraged line 66: == - is discouraged line 70: == - is discouraged line 71: == - is discouraged line 72: == - is discouraged line 73: == - is discouraged line 74: == - is discouraged line 75: == - is discouragedAnalysing /var/www/nextcloud/apps/ocdownloader/templates/settings/admin.php 11 errors line 57: == - is discouraged line 73: == - is discouraged line 77: == - is discouraged line 94: == - is discouraged line 94: == - is discouraged line 117: == - is discouraged line 124: == - is discouraged line 131: == - is discouraged line 136: == - is discouraged line 138: == - is discouraged line 140: == - is discouragedApp is not compliant

nikolafamit commented 3 years ago

Ok, it's working but you need manually clean all ocDownloader data from NextCloud [https://github.com/nextcloud/spreed/issues/772]

nikolafamit commented 3 years ago

Working, but unable to change settings... When it should save, circle is just spinning

`<!DOCTYPE html>

FamIT Solutions and Technologies

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: ***I removed because of privacy***
  • Request ID: h4Fn8UlGctLo9XaEl6f2
`