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

Deprecated event type for OCP\IDBConnection::* #24380

Closed
BenS89 opened this issue Nov 25, 2020 · 43 comments
Closed

Deprecated event type for OCP\IDBConnection::* #24380

BenS89 opened this issue Nov 25, 2020 · 43 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: logging needs info technical debt

Comments

@BenS89
Copy link

BenS89 commented Nov 25, 2020

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Upgrade from Nexcloud 19.0.5 to 20.0.2
  2. Take a look into the logs

Expected behavior: no deprecation logs on info level

Current behavior: Multiple deprecation logs on info level

Deprecated event type for OCA\Files::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used

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

Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used

Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used

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

@BenS89 BenS89 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 25, 2020
@kesselb
Copy link
Contributor

kesselb commented Nov 26, 2020

cc @ChristophWurst

That's on purpose right? (#18966 (comment))

@ChristophWurst
Copy link
Member

yes

@ChristophWurst
Copy link
Member

the updater switches to debug level logs, hence this shows.

@kesselb
Copy link
Contributor

kesselb commented Nov 26, 2020

Log level for Deprecated event type for {name}: {class} is used is info.

@kesselb
Copy link
Contributor

kesselb commented Nov 26, 2020

I guess we are not done with migrating everything yet. Shall we lower the log level to debug for now? (as we already did for 18).

@ChristophWurst
Copy link
Member

ah. yeah, maybe. but also finally migrate those things 😉

@BenS89
Copy link
Author

BenS89 commented Nov 28, 2020

What´s the plan now? The log flooding on info level is indeed not optimal. Thanks for your feedback.

@stefanbenten
Copy link

I would also like to push this further. This is quite distracting from actual interesting log lines.

@ChristophWurst
Copy link
Member

we have to migrate the code that uses the old events

I would also like to push this further.

I can give you pointers on where to look. But just open your IDE and see where the constant is used. Then you can replace the emitting and listening parts with a new event.

@User65481
Copy link

Any news on this? We're on 20.0.5.2 and have the same issue.

@ChristophWurst
Copy link
Member

It's not fixed yet.

@User65481

This comment has been minimized.

@b-pfl

This comment has been minimized.

@User65481

This comment has been minimized.

@User65481
Copy link

User65481 commented Mar 1, 2021

Just saw that a lot of comments got hidden. Usually comments get hidden because they are "off-topic, outdated, or resolved" - is there anything we can do to provide you with required help or additional details (logfiles, config) for this issue?

@kesselb
Copy link
Contributor

kesselb commented Mar 1, 2021

is there anything we can do to provide you with required help or additional details (logfiles, config) for this issue?

No. I marked some comments as duplicate. Also added how to use GitHub to the first post.

Just a quick update, we're on 20.0.8.1 now and unfortunately the problem still exists.

The problem is still there and the status of this issue is open. I think there could be a connection.

I agree, monitoring the log file is quite annoying at the moment, given that these messages bloat the log file.

True. Still the comment does not add any value to this issue. It only sends a notification to everyone subscribed. Your best option is to write a filter for your log management. And send a pull request of course ;)

@LordSimal
Copy link

As far as I have debugged this log entry it comes down to the following:

So now I looked for all occurrences where a new GenericEvent( is present in the code and oh boy, there are many.
https://github.com/nextcloud/server/search?q=new+GenericEvent%28

And this is just the the nextcloud core, not to mention all the apps that also need to adjust to the new event system.

@GAS85
Copy link

GAS85 commented Apr 22, 2021

Meanwhile my Log is full of similar entries and I "move" them to debug by command (from Stackoverflow) in cron:

sed -i '/Deprecated event type/{s/"level":1/"level":0/}' nextcloud.log

@TheColin21

This comment has been minimized.

@kokotko1337

This comment has been minimized.

@idjmic

This comment has been minimized.

@szaimen

This comment has been minimized.

@haghighi

This comment has been minimized.

@ChristophWurst

This comment has been minimized.

@ChristophWurst

This comment has been minimized.

@bkyceh

This comment has been minimized.

@ChristophWurst

This comment has been minimized.

@elgorro
Copy link

elgorro commented Dec 16, 2021

Workaround is to set 'loglevel' => 2, in the config.php, which is default-value. (With previous setting "0"=Debug it slowed down like crazy!) #18331

@LordSimal
Copy link

Indeed "old" installations of nextcloud have a default loglevel of 0 set in their auto-generated config/config.php (at least mine had)
Maybe setting this to 2 helps to mitigate that problem but I can also say that Nextcloud 23 doesn't have that issue anymore.

@Hudratronium
Copy link

@LordSimal

This is something i can not confirm at all. Was takeing a look into my setup here regarding audit logging. As soon as i lowered the loglevel to "1" - as advised in the docs - for usage of the admin audit log i got these in my logs....

@brianjmurrell
Copy link

IMHO deprecation messages are completely inappropriate at INFO level. These are developer targeted messages, not end-user targeted messages. INFO is for end-users.

@johanvandegriff
Copy link

As a quick hack to filter your logs, you can use some javascript in the browser console to remove elements you aren't interested in and/or only see the ones you care about.
Hit F12, select Console, and paste this in (after reviewing the code - never paste in unknown code from strangers on the internet, except me of course 😇):

window.setInterval(() => {
  Array.from(document.getElementsByTagName("tr"))
    .filter(log => log.innerText.includes("Deprecated"))
    .forEach(log => log.parentElement.removeChild(log));
}, 1000);

Every second, it finds all the "tr" elements (table rows) and deletes the ones that contain "Deprecated" in the row's text. Modify as you please to filter in different ways, for example you can search for only logs that contain "http" by changing the "filter" condition:

...
    .filter(log => !log.innerText.includes("http"))
...

You will have to reload the page to get the removed items back and turn off the filter. (clearInterval could be helpful here, but that's beyond the scope of this hacky script.)

@arnowelzel

This comment was marked as resolved.

@alireza-salehi

This comment was marked as resolved.

@rschoene

This comment was marked as resolved.

@szaimen szaimen changed the title Nextcloud 20.0.2: Deprecated event type for OCP\IDBConnection::* Deprecated event type for OCP\IDBConnection::* Dec 7, 2022
@szaimen szaimen added 0. Needs triage Pending check for reproducibility or if it fits our roadmap 24-feedback and removed 1. to develop Accepted and waiting to be taken care of labels Dec 7, 2022
@b-pfl
Copy link

b-pfl commented Apr 17, 2023

@ChristophWurst this is what I mean with my remark that new features seem to be more relevant than fixing old bugs. This one exists for almost 3 years now and still fills the log files of users...

@ChristophWurst
Copy link
Member

This is not even a bug.

@remidebette
Copy link

Hi, this is flooding the admin logs and complicating investigations when issues occur
It did not exist previously, it was a regression.

@LordSimal
Copy link

As said in #24380 (comment) I haven't had this issue since upgrading to version 23+ (currently on 26 with PHP 8.1 and this is not a problem)
@remidebette can you specify which regression you detected? Which version did you use previously? What are you using now?

@remidebette
Copy link

I will upgrade and check again

@ChristophWurst
Copy link
Member

Please test and review #37816

@joshtrichards
Copy link
Member

I think we can safely close this Issue out, no?

With the merging of #37816 (and its release in NC27) and the quietness of this issue thread since...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: logging needs info technical debt
Projects
None yet
Development

No branches or pull requests