MANY apps with RuntimeException "is not set up via query() but directly" after 17.0.3 upgrade to 18.0.0

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 18.0.0
Operating system and version (eg, Ubuntu 17.04): Centos 7
Apache or nginx version (eg, Apache 2.4.25): 2.4.6
PHP version (eg, 7.1): 7.3.14

The issue you are facing: I am getting dozens of log errors multiple times per second that re

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

  1. Run nextcloud 17.0.3 with all health checks and everything clean.
  2. Upgrade to nextcloud 18 following the manual upgrade process to a tee
  3. Ensure apps are updated and support NC18 and enable them.
  4. Notice performance issues, find very high IO on disks, check logs, and find Nextcloud clobbering your system.

The output of your Nextcloud log in Admin > Logging:

Error	tasks	RuntimeException: App class OCA\Tasks\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	tasks	RuntimeException: App class OCA\Tasks\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	tasks	RuntimeException: App class OCA\Tasks\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	tasks	RuntimeException: App class OCA\Tasks\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	tasks	RuntimeException: App class OCA\Tasks\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	password_policy	RuntimeException: App class OCA\Password_Policy\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	password_policy	RuntimeException: App class OCA\Password_Policy\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	password_policy	RuntimeException: App class OCA\Password_Policy\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	password_policy	RuntimeException: App class OCA\Password_Policy\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	password_policy	RuntimeException: App class OCA\Password_Policy\AppInfo\Application is not setup via query() but directly	
seconds ago
Error	password_policy	RuntimeException: App class OCA\Password_Policy\AppInfo\Application is not setup via query() but directly	
seconds ago

It appears that every time the password_policy error occurs a query is sent to my LDAP server causing essentially a DoS attack. NextCloud gets throttled and then fails to bind. If I disable the app the issues are basically resolved. I expected this from the third part apps, but some like password_policy are built into NC so I can’t imagine those having these issues normally.

The apps I am seeing trigger these warnings are:

  • Terms of Service
  • Ransomware Protection
  • Quota Warning
  • Password Policy
  • Calendar
  • Bookmarks

Well you wrote you verified you updated the apps. Did you manually check the version number on your system and the app store (in case there would be a connection problem to the update server)?

Did you rerun the occ upgrade command? In case the upgrade didn’t finish properly, it perhaps does some more steps. It somehow looks like there is some not up-to-date code, that the system perhaps thinks for the apps it were still on NC 17 or something like that. The way you describe the upgrade steps, it looks you haven’t done it the first time and that it is correct. However, if there were such a problem, it’s strange that it didn’t pop up already (well, ldap is less used here in the community).

If you don’t find a smoking gun with something that is obviously wrong, I tend to recommend posting this on github.

I have the same issue, just without ldap.
deactivate+activate does not change anything, app versions are identical to appstore

have you found a solution yet?

Will be fixed by 18.0.1. It’s actually safe to ignore. Just the wrong log level used for this message. Should be debug but is info.

Yes, I have manually checked on versions directly in the app directories. I have also gone through and manually changed code on a significant number of apps to resolve part of the issue, but haven’t figured out what the cause is. I blew away all of nextcloud, manually installed, manually downloaded and placed the apps, then ran upgrade again along with db checks, fixes and such and still have the issue. Magical!

I did not find a solution aside from manual code changes for the apps. Just saw a response saying it will be fixed in 18.0.1, which is good!

I have upgraded to 18.0.1 - but I got the same Error-Messages for

  • Tasks
  • Password_Policy
  • NextcloudAnnouncements
  • Maps
  • Decks
  • calendar

I tried “sudo -u www-data php occ upgrade” again. But the error-messages come again.

It’s safe to ignore this log message.

maybe your log-level is still too high? logs seem clean now for me, after upgrade to 18.0.1

The log entries are evaluated as errors. Log-level includes errors.

Do you have the same log-level?

nope, nothing in the logs for me.
log-level is not set in config, and ‘debug’ => false.

before update to 18.0.1 it seems to be a level 3 message

{"reqId":"xxx","level":3,"time":"2020-01-30T13:00:40+01:00","remoteAddr":"<IPv6>","user":"<user>","app":"maps","method":"GET","url":"/ocs/v2.php/core/navigation/apps?absolute=true&format=json","message":{"Exception":"RuntimeException","Message":"App class OCA\\Maps\\AppInfo\\Application is not setup via query() but directly","Code":0,"Trace":>.....>,"userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.1legacy (build 20191104) (Nextcloud)","version":"18.0.0.10"

however, daniel512 said you can ignore it :wink:

Thank you.

‘debug’ => true

was enabled.

Now I set it to false - but I get still the error messages.

I Ignore it like daniel512 said.

Thank you!

I am also having this issue still after upgrading to 18.0.1, I cannot simply ignore these errors however because my log has exceeded 4GB in size. If I leave the log in live mode, I am getting a few of the same error every second… Is there a fix for this?

I have had to shut down the server because of the hard drive spending a lot of time writing to the log file…

Set 'debug' => false, in config.php and the warning is gone. Please make sure to not run your production instance in debug mode!

I have the exact same issue. And my config.php reads

‘debug’ => ‘false’,

Loglevel is set to 3. The logging shows “Error” so indeed it is clear why it is shown in the log however this looks like a bug to me…

php -r "var_dump((bool)'false', (bool)false);"
Command line code:1:
bool(true)
Command line code:1:
bool(false)

Use false, (without quotes).

1 Like

Works. Thanks!

Using 18.0.9, still these log notices. Currently I turned debug to true, because I have to debug a specific issue. It’s very hard to find the log notice belonging to the issue I’m trying to debug, because the log file is full of these Runtime Exception errors. When will this be removed?