Closed michag86 closed 1 year ago
server log shows this, when opening the notifications in android app:
{"reqId":"kOCXRa96jZxZa2iuFrWK","level":3,"time":"2023-04-19T20:50:48+02:00","remoteAddr":"2001:16b8:abcd:f100:1234:23ce:4f7d:abcd","user":"USERNAME","app":"no app in context","method":"GET","url":"/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.24.2","version":"26.0.0.11","exception":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","Code":0,"Trace":[{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":162,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":110,"Previous":{"Exception":"OC\\AppFramework\\Utility\\QueryNotFoundException","Message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":97,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":162,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":131},"CustomMessage":"--"}}
{"reqId":"r1njnUBYPDzIAmXQ7hBJ","level":3,"time":"2023-04-19T20:50:49+02:00","remoteAddr":"92.1.1.1","user":"USERNAME","app":"no app in context","method":"GET","url":"/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.24.2","version":"26.0.0.11","exception":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","Code":0,"Trace":[{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":162,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":110,"Previous":{"Exception":"OC\\AppFramework\\Utility\\QueryNotFoundException","Message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":97,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":162,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":131},"CustomMessage":"--"}}
{"reqId":"HUXynBxR6ZCZC5TuQSp2","level":3,"time":"2023-04-19T20:50:51+02:00","remoteAddr":"92.1.1.1","user":"USERNAME","app":"no app in context","method":"GET","url":"/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.24.2","version":"26.0.0.11","exception":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","Code":0,"Trace":[{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":162,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":110,"Previous":{"Exception":"OC\\AppFramework\\Utility\\QueryNotFoundException","Message":"Could not resolve OCA\\Notifications\\Service\\ClientService! Class \"OCA\\Notifications\\Service\\ClientService\" does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":97,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":162,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":131},"CustomMessage":"--"}}
I'm unable to reproduce this (at least with v26.0.1).
Is the Notifications
app installed+enabled on the NC server? It almost sounds like it's been disabled.
I agree with @joshtrichards the posted log states that the server code that creates the notification isn't available.
Here is a system report
Server configuration detail
Operating system: Linux 5.15.0-60-generic nextcloud/android#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64
Webserver: Apache (fpm-fcgi)
Database: mysql 10.6.12
PHP version: 8.1.2-1ubuntu2.11
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, intl, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
Nextcloud version: 26.0.1 - 26.0.1.1
Updated from an older Nextcloud/ownCloud or fresh install:
Where did you install Nextcloud from: unknown
Cron Configuration: Array ( [backgroundjobs_mode] => cron [lastcron] => 1682693706 )
External storages: files_external is disabled
Encryption: no
User-backends:
OC\User\Database
Talk configuration:
STUN servers
stun.nextcloud.com:443
Signaling servers (mode: default):
no custom server configured
Browser: Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0
When I disable the App, I get the message "local file does not exist" in the App in notifications
There is no option to uninstall the App.
Transfered to server
Does the folder apps/notifications/
exist under your NC installation directory (I.e. /var/www/html)?
And specifically does the file apps/notifications/lib/Service/ClientService.php
exist?
The errors suggest that the folder is missing (or files in it are) or permissions on/in it are preventing the web server UID from accessing it properly.
file looks good $ ls apps/notifications/lib/Service/ClientService.php -la -rw-rw-r-- 1 www-data www-data 1831 Apr 19 15:38 apps/notifications/lib/Service/ClientService.php
I have two installations on this server. Both with the same errors. These installations were unattended upgraded since years by updater.phar
"Have you tried turning it off and on again?"
Oh man...
I noticed that I also got 500 on the desktop browser for GET /ocs/v2.php/apps/notifications/api/v2/notifications
I looked into the php-fpm log and saw this:
[28-Apr-2023 20:39:03] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
This occurs multiple times, but only up to three times a day. I raised max_children to 10.
After sudo systemctl restart php8.1-fpm.service
the error disappears and notifications work.
I tried to reduce max_children, but the error doesn't occur again.
Unless you are super confined on RAM you can probably boost it pretty high. For whatever reason PHP has kept the FPM default for pm.max_children set to 5 for... I couldn't even tell you how long off-hand. They compare it to Apache's MaxClients / MaxRequestWorkers which in currently defaults to 256 (and even other other server models never default to less than 16).
See what your current fpm processes are consuming each on average then see how many children you could multiply that by while still not taxing your system's memory (e.g. still leaving a still substantial buffer). That's a quick and dirty note so google around for better justification. :)
As for why the issue didn't come back immediately.... perhaps there were some syncs queued up that were getting bottlenecked and bumping it up to 10 cleared them out enough that the issue wasn't going to come back immediately even though you tried to bring max_children back down again. I think the mobile client defaults to at least 6 parallel connections or something like that. But any number of other scenarios might have triggered it. Glad it's work for you again!
⚠️ Before posting ⚠️
Steps to reproduce
Connect to a server that is running Nextcloud 26 and go to Notifications (Benachrichtigungen).
Expected behaviour
Notifications are shown
Actual behaviour
It show "Keine Benachrichtigungen" and "The Nextcloud server is not configured!"
Android version
13
Device brand and model
Mi 11 Lite 5G
Stock or custom OS?
Stock
Nextcloud android app version
3.24.2
Nextcloud server version
26.0.0
Using a reverse proxy?
No
Android logs
No response
Server error logs
No response
Additional information
No response