Closed oldnomad closed 1 year ago
Having the same issue after upgrading to NC24
Same here: NC 24.0.3. running on K8s Cluster (official nextcloud-fpm docker image), php 8 Furthermore the apps files and deck arent accessible anymore after setting loglevel in combination with logtype=errorlog
Updating from 23.0.x to 24.0.4 via console
have this error and some array on console.
me@belar:~$ php -d apc.enable=1 -d apc.enable_cli=1 /basedirectory/www/updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4
Current version is 23.0.8.
Update to Nextcloud 24.0.4 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-24.0.4.zip
Open changelog ↗
Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done
Start update? [y/N] y
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done
Update of code successful.
Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
[owncloud][PHP][3] {"Exception":"Error","Message":"Array to string conversion at /basedirectory/www/lib/private/Log/Errorlog.php#46","Code":0,"Trace":[{"file":"/basedirectory/www/lib/private/Log/Errorlog.php","line":46,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/basedirectory/www/lib/private/Log.php","line":375,"function":"write","class":"OC\\Log\\Errorlog","type":"->"},{"file":"/basedirectory/www/lib/private/Log.php","line":215,"function":"writeLog","class":"OC\\Log","type":"->"},{"file":"/basedirectory/www/lib/private/Log.php","line":193,"function":"log","class":"OC\\Log","type":"->"},{"file":"/basedirectory/www/lib/private/Log/PsrLoggerAdapter.php","line":233,"function":"debug","class":"OC\\Log","type":"->"},{"file":"/basedirectory/www/lib/private/Updater.php","line":129,"function":"debug","class":"OC\\Log\\PsrLoggerAdapter","type":"->"},{"file":"/basedirectory/www/core/Command/Upgrade.php","line":235,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/basedirectory/www/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/basedirectory/www/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/basedirectory/www/occ","line":11,"args":["/basedirectory/www/console.php"],"function":"require_once"}],"File":"/basedirectory/www/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}
[owncloud][core][0] Array
[…]
[owncloud][PHP][3] {"Exception":"Error","Message":"Array to string conversion at /basedirectory/www/lib/private/Log/Errorlog.php#46","Code":0,"Trace":[{"file":"/basedirectory/www/lib/private/Log/Errorlog.php","line":46,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/basedirectory/www/lib/private/Log.php","line":375,"function":"write","class":"OC\\Log\\Errorlog","type":"->"},{"file":"/basedirectory/www/lib/private/Log.php","line":215,"function":"writeLog","class":"OC\\Log","type":"->"},{"file":"/basedirectory/www/lib/private/Log.php","line":182,"function":"log","class":"OC\\Log","type":"->"},{"file":"/basedirectory/www/lib/private/Log/PsrLoggerAdapter.php","line":211,"function":"info","class":"OC\\Log","type":"->"},{"file":"/basedirectory/www/lib/private/Updater.php","line":572,"function":"info","class":"OC\\Log\\PsrLoggerAdapter","type":"->"},{"function":"OC\\{closure}","class":"OC\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/basedirectory/www/lib/private/Hooks/EmitterTrait.php","line":106,"function":"call_user_func_array"},{"file":"/basedirectory/www/lib/private/Updater.php","line":157,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"/basedirectory/www/core/Command/Upgrade.php","line":235,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/basedirectory/www/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/basedirectory/www/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/basedirectory/www/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/basedirectory/www/occ","line":11,"args":["/basedirectory/www/console.php"],"function":"require_once"}],"File":"/basedirectory/www/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}
[owncloud][updater][1] Array
After update log to file : access seems OK
Upgraded from 24.0.1
to 24.0.5
and noticed this issue too.
I don't know how to implement a proper patch for this issue but here is a workaround to at least get logs text: Update https://github.com/nextcloud/server/blob/bc142f41ad643905ae48b8ea909ccb28752a4f00/lib/private/Log/Errorlog.php#L46 with:
error_log('[' . $this->tag . ']['.$app.']['.$level.'] '. implode(',', $message));
With this workaround the line in log looks like NOTICE: PHP message: [owncloud][<app_name>][0] <app_name>,<message>
Filed #34256.
I believe I just fixed the same bug: https://github.com/nextcloud/server/pull/35614
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+
Version 24.0.9 doesn't fix this. Backport pull request to stable24 (https://github.com/nextcloud/server/pull/35824) is still open, Psalm failure (seems to be erroneous to me). Backport to stable25 (https://github.com/nextcloud/server/pull/35821) is also open.
25.0.3 doesn't fix it either.
That is not too surprising. https://github.com/nextcloud/server/pull/35821 will come with 25.0.4 at the earliest.
Fixed for everyone?
Fixed in 25.0.8 or earlier. At least I could remove the above workaround when upgraded to 25.0.8.
⚠️ This issue respects the following points: ⚠️
Bug description
Recently, after I've upgraded from 23.0.x to 24.0.3, errors from the cron jobs started coming as "Array to string conversion at /srv/www/html/lib/private/Log/Errorlog.php#46" instead. For example, I get following:
instead of expected:
or something like that.
As far as I can see, the problem is that
errorlog
logger (OC\Log\Errorlog
), unlike other loggers, is not ready for the message inwrite(...)
method being an array. All other loggers extendLogDetails
and do the proper thing, but notErrorlog
. I think that some behavior changed in 08035833cf25c203fba4ba52dbd692df8fba09fb, but it's likely that the problem existed earlier too.Steps to reproduce
1.Set
log_type
in the configuration toerrorlog
. 2.Perform an action that produces an error message. 3.Observe that "Array to string conversion" notice is reported, and that the error message is "Array" instead of the expected text.Expected behavior
Expected error message should be logged.
Installation method
Manual installation
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
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
No response
Additional info
No response