Closed hr1232 closed 1 year ago
Hi, thanks for your report.
Can you patch your instance like
Index: lib/private/L10N/L10NString.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/private/L10N/L10NString.php b/lib/private/L10N/L10NString.php
--- a/lib/private/L10N/L10NString.php (revision 0e41530b807244e213e3e2566c0ffe30ed809a32)
+++ b/lib/private/L10N/L10NString.php (date 1664286507964)
@@ -85,7 +85,11 @@
// $count as %count% as per \Symfony\Contracts\Translation\TranslatorInterface
$text = $identityTranslator->trans($identity, $parameters);
- return vsprintf($text, $this->parameters);
+ try {
+ return vsprintf($text, $this->parameters);
+ } catch (\ValueError $e) {
+ throw new \LogicException('The arguments array must contain 2 items, 1 given for ' . $text, 0, $e);
+ }
}
public function jsonSerialize(): string {
to figure out which string is causing this issue?
OK. As the issue is not blocking any functionality, I'll do that tonight when users are off work.
Maybe, future versions should create log entries with a bit more useful information instead of all that useless, nerdy verbousness...
Maybe, future versions should create log entries with a bit more useful information instead of all that useless, nerdy verbousness...
Brilliant idea! Please send a pull request: https://github.com/nextcloud/server#join-the-team-
Here you go. Seems to trace back to Google integration
{"reqId":"yJCB3Tidg8FmtDofrxSk","level":3,"time":"2022-09-27T16:14:27+00:00","remoteAddr":"172.70.242.28","user":"heikorichter","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"The arguments array must contain 2 items, 1 given for %s Foto wurde von Google importiert.|%s Fotos wurden von Google importiert.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36","version":"24.0.5.1","exception":{"Exception":"LogicException","Message":"The arguments array must contain 2 items, 1 given for %s Foto wurde von Google importiert.|%s Fotos wurden von Google importiert.","Code":0,"Trace":[{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/L10N.php","line":127,"function":"__toString","class":"OC\\L10N\\L10NString","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/LazyL10N.php","line":56,"function":"n","class":"OC\\L10N\\L10N","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/apps/integration_google/lib/Notification/Notifier.php","line":92,"function":"n","class":"OC\\L10N\\LazyL10N","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/Notification/Manager.php","line":376,"function":"prepare","class":"OCA\\Google\\Notification\\Notifier","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/apps/notifications/lib/Controller/EndpointController.php","line":111,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/ocs/v1.php","line":62,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/ocs/v2.php","line":23,"args":["/usr/www/users/heikorm/cloud.heikorichter.name/ocs/v1.php"],"function":"require_once"}],"File":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/L10NString.php","Line":91,"Previous":{"Exception":"ValueError","Message":"The arguments array must contain 2 items, 1 given","Code":0,"Trace":[{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/L10NString.php","line":89,"function":"vsprintf"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/L10N.php","line":127,"function":"__toString","class":"OC\\L10N\\L10NString","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/LazyL10N.php","line":56,"function":"n","class":"OC\\L10N\\L10N","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/apps/integration_google/lib/Notification/Notifier.php","line":92,"function":"n","class":"OC\\L10N\\LazyL10N","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/Notification/Manager.php","line":376,"function":"prepare","class":"OCA\\Google\\Notification\\Notifier","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/apps/notifications/lib/Controller/EndpointController.php","line":111,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/ocs/v1.php","line":62,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/www/users/heikorm/cloud.heikorichter.name/ocs/v2.php","line":23,"args":["/usr/www/users/heikorm/cloud.heikorichter.name/ocs/v1.php"],"function":"require_once"}],"File":"/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/L10NString.php","Line":89},"CustomMessage":"--"},"id":"6333216381931"}
`[no app in context] Fehler: LogicException: The arguments array must contain 2 items, 1 given for %s Foto wurde von Google importiert.|%s Fotos wurden von Google importiert. at <
GET /ocs/v2.php/apps/notifications/api/v2/notifications from 172.70.247.63 by heikorichter at 2022-09-27T16:16:53+00:00`
cc @eneiluj
See https://github.com/nextcloud/server/pull/33639 for a similar problem and fix.
Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!
My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!
If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+
@szaimen I'm on 25.0.3 and I see this issue.
@szaimen I am on 25.0.3 and I am experiencing this is issue as well. It doesn't seem to affect functionality and I only noticed it when I went to check on my fail2ban
jail for nextcloud which depends on nextcloud.log
and didn't see any entries but my nextcloud.access
log had lots of entries for IPs I don't recognise so I went to check nextcloud.log
and it has stopped logging since December 25 last year. I will be glad to provide any further information you require.
I'm on 25.0.3 and i've the same problem: Seems to trace back to Google integration too
An error appears in the log every five minutes:
{"reqId":"0Z7DqfMq9gom5LxFzNIx","level":3,"time":"2023-02-28T19:55:24+00:00","remoteAddr":"192.168.1.1","user":"s0lo","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"The arguments array must contain 4 items, 1 given in file '/snap/nextcloud/33730/htdocs/lib/private/L10N/L10NString.php' line 88","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36","version":"25.0.3.2","exception":{"Exception":"Exception","Message":"The arguments array must contain 4 items, 1 given in file '/snap/nextcloud/33730/htdocs/lib/private/L10N/L10NString.php' line 88","Code":0,"Trace":[{"file":"/snap/nextcloud/33730/htdocs/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/snap/nextcloud/33730/htdocs/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/ocs/v2.php","line":23,"args":["/snap/nextcloud/33730/htdocs/ocs/v1.php"],"function":"require_once"}],"File":"/snap/nextcloud/33730/htdocs/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"ValueError","Message":"The arguments array must contain 4 items, 1 given","Code":0,"Trace":[{"file":"/snap/nextcloud/33730/htdocs/lib/private/L10N/L10NString.php","line":88,"function":"vsprintf"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/L10N/L10N.php","line":127,"function":"__toString","class":"OC\\L10N\\L10NString","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/L10N/LazyL10N.php","line":56,"function":"n","class":"OC\\L10N\\L10N","type":"->"},{"file":"/var/snap/nextcloud/33730/nextcloud/extra-apps/integration_google/lib/Notification/Notifier.php","line":92,"function":"n","class":"OC\\L10N\\LazyL10N","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/Notification/Manager.php","line":368,"function":"prepare","class":"OCA\\Google\\Notification\\Notifier","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/apps/notifications/lib/Controller/EndpointController.php","line":111,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/snap/nextcloud/33730/htdocs/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/snap/nextcloud/33730/htdocs/ocs/v2.php","line":23,"args":["/snap/nextcloud/33730/htdocs/ocs/v1.php"],"function":"require_once"}],"File":"/snap/nextcloud/33730/htdocs/lib/private/L10N/L10NString.php","Line":88},"CustomMessage":"--"},"id":"63fe5c2d0b940"}
[no app in context] Error: Exception: The arguments array must contain 4 items, 1 given in file '/snap/nextcloud/33730/htdocs/lib/private/L10N/L10NString.php' line 88 at <
GET /ocs/v2.php/apps/notifications/api/v2/notifications from 192.168.1.1 by s0lo at 2023-02-28T19:55:24+00:00
Same issue persists on 25.0.5, although functionality seems unaffected I don't like the log spam.
App issue not a server
matter: nextcloud/integration_google#133
Sounds like it was fixed in 2.x released in May 2023 (so a few months after the last report in this thread here).
https://github.com/nextcloud/integration_google/issues/133#issuecomment-1573570316
Take further follow-up to that issue/repository. Closing here. Thanks for all your reports.
⚠️ This issue respects the following points: ⚠️
Bug description
Exception: The arguments array must contain 2 items, 1 given in file '/usr/www/users/heikorm/cloud.heikorichter.name/lib/private/L10N/L10NString.php' line 88
Syntax error in L10NString.php is crapping into my logs constantly. This is quite annoying....
Steps to reproduce
Expected behavior
Log entries should not be displayed
Installation method
Community Web installer on a VPS or web space
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response