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

[18.0.0 Beta1] Deprecated event type for OCP\IPreview:PreviewRequested #18331

Closed
MichaIng opened this issue Dec 10, 2019 · 15 comments · Fixed by #19118
Closed

[18.0.0 Beta1] Deprecated event type for OCP\IPreview:PreviewRequested #18331

MichaIng opened this issue Dec 10, 2019 · 15 comments · Fixed by #19118
Labels
3. to review Waiting for reviews bug

Comments

@MichaIng
Copy link
Member

Steps to reproduce

  1. Update from 17.0.1.1 to 18.0.0 Beta1 via web-based updater
  2. Check logs

Expected behaviour

  • No log flood

Actual behaviour

  • Secondly the following info log is generated
[no app in context] Info: Deprecated event type for OCP\IPreview:PreviewRequested: Symfony\Component\EventDispatcher\GenericEvent

GET /nextcloud/core/preview?fileId=676196&c=064f1cdb27c480fc2ad58354a4250a5c&x=250&y=250&forceIcon=0
from 95.81.18.51 by Micha at 2019-12-10T13:55:48+01:00
  • Clearly related to preview generation jobs, probably in combination with the new Photos app replacing Gallery?

But I cannot see further issues that seem to be related.

Server configuration

Operating system: Raspbian Bullseye

Web server: Apache/2.4.41

Database: MariaDB 10.3.20

PHP version: 7.3.12-1

Nextcloud version: 18.0.0 Beta1

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

Where did you install Nextcloud from: download.nextcloud.com + web-based updater

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.11.0
  - apporder: 0.8.0
  - calendar: 2.0.0-beta3
  - cloud_federation_api: 1.1.0
  - contacts: 3.1.6
  - dav: 1.14.0
  - federatedfilesharing: 1.8.0
  - files: 1.13.1
  - files_rightclick: 0.15.1
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - impersonate: 1.4.0
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - nextcloud_announcements: 1.7.0
  - notes: 3.0.3
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - photos: 19.0.0
  - previewgenerator: 2.2.0
  - provisioning_api: 1.8.0
  - ransomware_protection: 1.5.1
  - settings: 1.0.0
  - survey_client: 1.6.0
  - tasks: 0.11.3
  - twofactor_backupcodes: 1.7.0
  - updatenotification: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0
Disabled:
  - accessibility
  - admin_audit
  - comments
  - encryption
  - federation
  - files_external
  - files_pdfviewer
  - files_sharing
  - files_videoplayer
  - firstrunwizard
  - password_policy
  - privacy
  - recommendations
  - serverinfo
  - sharebymail
  - support
  - systemtags
  - text
  - theming
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "my.domain.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "18.0.0.3",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 1,
        "logtimezone": "Europe\/Berlin",
        "trashbin_retention_obligation": "disabled",
        "versions_retention_obligation": "disabled",
        "skeletondirectory": "",
        "defaultapp": "apporder",
        "maintenance": false,
        "overwrite.cli.url": "https:\/\/my.domain.org\/nextcloud",
        "htaccess.RewriteBase": "\/nextcloud",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "mysql.utf8mb4": true,
        "updater.release.channel": "beta",
        "tempdirectory": "\/mnt\/sda\/ncdata\/tmp",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "app_install_overwrite": [
            "apporder",
            "calendar",
            "impersonate",
            "ransomware_protection",
            "contacts"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

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

Client configuration

Browser: Opera developer 67.0.3523.0

Operating system: Windows 10 Pro N 1909 build 18363.476

Logs

Web server error log

Web server error log
nothing related

Nextcloud log (data/nextcloud.log)

Nextcloud log
see above

Browser log

Browser log
nothing related
@MichaIng MichaIng added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 10, 2019
@MichaIng
Copy link
Member Author

Actually such logs show up when accessing several other apps/pages as well. Is this intended, e.g. during Beta phase?

Accessing logs:

[no app in context] Info: Deprecated event type for OCP\AppFramework\Http\TemplateResponse::loadAdditionalScripts: null

GET /nextcloud/settings/admin/logging
from 95.81.18.51 by Micha at 2019-12-10T14:03:03+01:00
...
[no app in context] Info: Deprecated event type for OCP\AppFramework\Http\TemplateResponse::loadAdditionalScriptsLoggedIn: null

GET /nextcloud/settings/admin/logging
from 95.81.18.51 by Micha at 2019-12-10T14:03:03+01:00

Accessing Activity:

[no app in context] Info: Deprecated event type for OCP\AppFramework\Http\TemplateResponse::loadAdditionalScripts: null

GET /nextcloud/apps/activity/
from 95.81.18.51 by Micha at 2019-12-10T13:55:49+01:00

On Tasks and users page as well...

@MichaIng
Copy link
Member Author

MichaIng commented Dec 10, 2019

Ah just found the PR which most likely resolves this? #18225
EDIT: Nope!

Probably it is best to omit those logs, so they do not flood the log file?

@twinkybot
Copy link

twinkybot commented Jan 14, 2020

Hi there, I am affected by this Log.info flood as well

{"reqId":"plymVIQqkJ08Y914rcg4","level":1,"time":"2020-01-14T13:23:15+00:00",
"remoteAddr":"IP","user":"twinkybot","app":"no app in context",
"method":"GET","url":"/index.php/apps/logreader/poll?lastReqId=sKmjNtrkt8O67wefDQm1",
"message": "Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null",
"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) 
Gecko/20100101 Firefox/72.0","version":"18.0.0.9","id":"5e1dc0c38fd21"}

Nextcloud version: 18.0.0 RC2
and LDAP user and group backend version: 1.8.0

@MichaIng
Copy link
Member Author

@twinkybot
Jep, everyone is affected, expectedly. Not a state which should be released IMO, especially since currently there are still Nextcloud-internal/core apps affected, but not my decision...

@kesselb
Copy link
Contributor

kesselb commented Jan 14, 2020

Feel free to open a pull request and suggest to use $this->logger->debug ;)

MichaIng added a commit that referenced this issue Jan 18, 2020
This is to reduce log flooding on info log level, which is currently expected tue to deprecated event use in many apps and core: #18331
This information is helpful for developers only, hence should be sufficient as debug log. Especially due to the extremely high frequency this log can happen, this currently practically forces admins to disable info logs, which conflicts with other needs.

Signed-off-by: MichaIng <micha@dietpi.com>
@MichaIng
Copy link
Member Author

PR is up: #18966

@MichaIng MichaIng added 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jan 18, 2020
MichaIng added a commit that referenced this issue Jan 18, 2020
This is to reduce log flooding on info log level, which is currently expected tue to deprecated event use in many apps and core: #18331
This information is helpful for developers only, hence should be sufficient as debug log. Especially due to the extremely high frequency this log can happen, this currently practically forces admins to disable info logs, which conflicts with other needs.

Signed-off-by: MichaIng <micha@dietpi.com>
@MichaIng MichaIng linked a pull request Feb 20, 2020 that will close this issue
@MichaIng
Copy link
Member Author

PR merged, log level for those kind of messages reduced to debug. This is no solution but the issue is known and it is task of app devs to migrate used event types. I mark this hence as closed.

@ghost
Copy link

ghost commented Oct 15, 2020

The same issue again on Nextcloud 20.0

Info | Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used

Info | Deprecated event type for {"[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{"tree":"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/remote.php/webdav/","httpResponse":"[object] (Sabre\HTTP\Response)","httpRequest":"[object] (Sabre\HTTP\Request)","sapi":"[object] (Sabre\HTTP\Sapi)","*plugins":[],"transactionType":null,"protectedProperties":{"...":"Over 20 items, aborting normalization"},"debugExceptions":false,"resourceTypeMapping":[],"enablePropfindDepthInfinity":true,"xml":"[object] (Sabre\DAV\Xml\Service)","*listeners":{"...":"Over 20 items, aborting normalization"},"*wildcardListeners":[],"*listenerIndex":[],"*logger":null}},"Symfony\Contracts\EventDispatcher\EventpropagationStopped":false}}: null

@puntorosso
Copy link

puntorosso commented Nov 11, 2020

Anyone with a solution to stop this flood of errors in log?

Deprecated event type for \OCP\Files::postCreate: Symfony\Component\EventDispatcher\GenericEvent
Deprecated event type for \OCP\Files::postWrite: Symfony\Component\EventDispatcher\GenericEvent
Deprecated event type for \OCP\Files::preCreate: Symfony\Component\EventDispatcher\GenericEvent
Deprecated event type for \OCP\Files::preWrite: Symfony\Component\EventDispatcher\GenericEvent

@tomsozolins
Copy link

Same here.

@rybaha
Copy link

rybaha commented Feb 3, 2021

20.0.7 and a lot of at Log Level of "Info"
[no app in context] Info: Deprecated event type for OCP\IPreview:PreviewRequested: Symfony\Component\EventDispatcher\GenericEvent is used

@MichaIng
Copy link
Member Author

MichaIng commented Feb 3, 2021

Please update to Beta 8, at least it helped in my case.

@rybaha
Copy link

rybaha commented Feb 3, 2021

Well, I disabled previews and found that this is generic error for other things:
OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent is used" OCA\\Files_Sharing::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent is used" OCP\\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\\Component\\EventDispatcher\\GenericEvent is used" OCP\\IDBConnection::CHECK_MISSING_INDEXES: Symfony\\Component\\EventDispatcher\\GenericEvent is used" OCP\\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\\Component\\EventDispatcher\\GenericEvent is used" OCP\\IPreview:PreviewRequested: Symfony\\Component\\EventDispatcher\\GenericEvent is used" OCP\\IUser::changeUser: Symfony\\Component\\EventDispatcher\\GenericEvent is used" OC\\AccountManager::userUpdated: Symfony\\Component\\EventDispatcher\\GenericEvent is used" \\OCA\\DAV\\CalDAV\\CalDavBackend::createCalendarObject: Symfony\\Component\\EventDispatcher\\GenericEvent is used" \\OCA\\DAV\\CalDAV\\CalDavBackend::updateCalendar: Symfony\\Component\\EventDispatcher\\GenericEvent is used" \\OCA\\DAV\\CalDAV\\CalDavBackend::updateCalendarObject: Symfony\\Component\\EventDispatcher\\GenericEvent is used" \\OCA\\DAV\\CardDAV\\CardDavBackend::updateCard: Symfony\\Component\\EventDispatcher\\GenericEvent is used" {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200

@rybaha
Copy link

rybaha commented Feb 3, 2021

Setting
'loglevel' => 2,
helped in my case.

@MichaIng
Copy link
Member Author

MichaIng commented Feb 3, 2021

Ah I totally forgot that I did the same on my system. I can verify the massive deprecation logs (debug and info level) of various types and across various apps.

Could you please open a new issue about those? If related to a specific app, at best at the individual apps repository. On a closed issue this will not get attention, when not being subscribed to it already (like me).

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

Successfully merging a pull request may close this issue.

7 participants