nextcloud / files_antivirus

👾 Antivirus app for Nextcloud Files
https://apps.nextcloud.com/apps/files_antivirus
GNU Affero General Public License v3.0
81 stars 33 forks source link

[files_antivirus] Debug: /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead. #232

Closed JGG-Apps closed 1 year ago

JGG-Apps commented 2 years ago

Steps to reproduce

  1. Install and enable "Antivirus for files" application inside NextCloud
  2. Take a look to Web Administration Console -> Logs. Ensure Debug Level is activated like is recommended when Antivirus for Files application is enable.
  3. The log view is populated by this repetitive error at least 6-7 times per second
  4. If I disable the "Antivirus for files" application, the errors stop in the log viewer.
  5. If I uninstall, then reinstall + activate completely the "Antivirus for files" application, the problem come back again...

files_antivirus

NOTE: I upgraded from NextCloud 19.0.7 through 23.0.4 (following recommended steps). I don't know exactly at which moment the problem starts... but I didn't have this issue with NextCloud 19.0.7 in the past.

Many other NextCloud apps are reporting this same kind of issue. On the official NextCloud website, it tell something about was changing since NextCloud 20.x in the concept of appinfo vs bootstrap. Take a look to this link:

https://docs.nextcloud.com/server/latest/developer_manual/app_development/bootstrap.html

I can conclude this problem cannot be fixed just by modifying a setting somewhere, this need to be basically modified in the manner the application is working to use the NextCloud Bootstrap. Removing/Reinstalling the application with fresh config not fix the problem.

Expected behaviour

Just don't generate this Debug error message that fulling the logs, consume CPU and don't allow other task to be done properly.

Actual behaviour

The Log view is showing:

[files_antivirus] Debug: /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.

GET /index.php/apps/logreader/poll?lastReqId=myidthatIremovedhere from myIP by myUser at 2022-05-04T17:19:32+00:00

The content of ...\apps\files_antivirus\appinf\app.php file is:

appphp

Server configuration

Operating system: Debian 10 amd64 (fully updated) Web server: Apache2.4.x Database: MariaDB 10.x PHP version: 7.3 Nextcloud version: 23.0.4

List of activated apps:

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "mynexcloudinstance.mydomain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "23.0.4.1",
        "overwrite.cli.url": "http:\/\/myip\/mynextcloudinstance",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "xxxx",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "xxxx",
        "mail_smtpport": "xxxx",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "loglevel": 0
    }
}

Client configuration

Browser: Google Chrome 101 or Microsoft Edge 101

Operating system: Windows 10 (last build)

Logs

Nextcloud log (data/owncloud.log)

N/A

Browser log

N/A 
JGG-Apps commented 2 years ago

NOTE: If I delete files_antivirus\appinfo\app.php file, reload Apache2, enable DEBUG log level in NextCloud, the errors are no more there !

But the antivirus stop working fine when I test with EICAR file.

Basically, It should not expected that I need to remove a file included in your source package to fix these events that they are fulling my log... And this test also tell it's not possible to just bypass app.php file.

My temporary workaround is to disable Debug level in log. Then no event fot that.

level420 commented 2 years ago

Observed this as well running nextcloud image 23.0.4 from docker hub in a docker-compose stack container.

level420 commented 2 years ago

@JGG-Apps do you mean after deleting files_antivirus\appinfo\app.php the app is still working but does not log those debug message anymore?

JGG-Apps commented 2 years ago

No, I tell if I deleyr the file, the error is no more appearing in the log view but the app is also NOT working.

I also observed that some other apps could generate similar OCP error but randomly in INFO view may be 1-2 times per day. In antivirus apps, this is fulling the DEBUG view 6-7 times per seconds !!!

Obtenir Outlook pour Androidhttps://aka.ms/AAb9ysg


From: Dietrich Streifert @.> Sent: Thursday, May 12, 2022 10:12:44 AM To: nextcloud/files_antivirus @.> Cc: JGG-Apps @.>; Mention @.> Subject: Re: [nextcloud/files_antivirus] [files_antivirus] Debug: /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead. (Issue #232)

@JGG-Appshttps://github.com/JGG-Apps do you mean after deleting @files_antivirus\appinfo\app.php@ the app is still working but does not log those debug message anymore?

— Reply to this email directly, view it on GitHubhttps://github.com/nextcloud/files_antivirus/issues/232#issuecomment-1125046903, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATOEQ7F2BRWUETQYNMGHZBLVJUGVZANCNFSM5VCWUS2Q. You are receiving this because you were mentioned.Message ID: @.***>

level420 commented 2 years ago

It seems that this is already fixed via PR https://github.com/nextcloud/files_antivirus/pull/218 But it has not been released yet. @CarlSchwan would you mind releasing a new version? This will also bring us compatibility with nextcloud 24. Would be great!