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
Nextcloud Log: ArgumentCountError: Too few arguments #643
Comments
Could anyone please post what the following statement outputs for a working News instance?
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
@onkeljuergen I have the same problem after upgrading NextCloud and News to the newest stable version today. News stopped downloading.
|
Hi, |
FYI: This is my complete log message(s) from the current cron job (linux cron job every 5 mins; Debian Stretch; PHP 7.4.4). {
"reqId": "4CRzolL7zAp39dWvkuvG",
"level": 3,
"time": "2020-04-10T12:45:01+02:00",
"remoteAddr": "",
"user": "--",
"app": "PHP",
"method": "",
"url": "--",
"message": "call_user_func() expects parameter 1 to be a valid callback, non-static method OCA\\News\\Cron\\Updater::run() should not be called statically at /lib/private/BackgroundJob/Legacy/RegularJob.php#32",
"userAgent": "--",
"version": "18.0.3.0"
}
{
"reqId": "4CRzolL7zAp39dWvkuvG",
"level": 3,
"time": "2020-04-10T12:45:01+02:00",
"remoteAddr": "",
"user": "--",
"app": "core",
"method": "",
"url": "--",
"message": {
"Exception": "ArgumentCountError",
"Message": "Too few arguments to function OCA\\News\\Cron\\Updater::run(), 0 passed and exactly 1 expected",
"Code": 0,
"Trace": [
{
"function": "run",
"class": "OCA\\News\\Cron\\Updater",
"type": "::"
},
{
"file": "/lib/private/BackgroundJob/Legacy/RegularJob.php",
"line": 32,
"function": "call_user_func"
},
{
"file": "/lib/private/BackgroundJob/Job.php",
"line": 61,
"function": "run",
"class": "OC\\BackgroundJob\\Legacy\\RegularJob",
"type": "->"
},
{
"file": "/cron.php",
"line": 125,
"function": "execute",
"class": "OC\\BackgroundJob\\Job",
"type": "->"
}
],
"File": "/apps/news/lib/Cron/Updater.php",
"Line": 46,
"CustomMessage": "Error while running background job (class: OC\\BackgroundJob\\Legacy\\RegularJob, arguments: Array\n(\n [0] => OCA\\News\\Cron\\Updater\n [1] => run\n)\n)"
},
"userAgent": "--",
"version": "18.0.3.0"
} #thx4fixing |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I checked the log of my instance today and saw the same error, it doesn't seem to have any effect on news. |
So I checked https://docs.nextcloud.com/server/18/developer_manual/app/backgroundjobs.html Then in the info.xml is a job definition without an argument which will then pass an empty array according to the docs |
This should be fixed in 14.2.0+ |
Error still occurs, in 14.2.0 I think after we are now using exactly what I could find in the documentation, it could be an issue in the server itself or we are doing something wrong. |
I think the issue is with dependency injection failing sometimes. That would also explain some of the issues I've been having with the service migration. |
Am seeing this error after upgrading php to 7.4. |
Same for me, just updated php to 7.4 and got hit by that same issue, news is currently unusable for me as it's not updating any feeds from cron. It works though if I'll run '/usr/bin/php -f /var/www/nextcloud/cron.php' manually on server, then feeds are being updated. With php 7.3 there were no issues with that.
|
In
That appears to resolve the issue. I can submit a PR to the NC server project, but I'd like confirmation from someone familiar with the server and/or News app that it is the correct resolution. I also noticed in the README that |
You can make a PR to the server, but I'm not sure if they'll accept changes to legacy components. In the meantime news switched away from the legacy job for the version that supports NC 20, so this issue should resolve itself eventually. |
Fair enough. I won't bother to submit it then. Anyone who stumbles across this issue can make the change manually if they're not ready/able to upgrade to NC 20. |
There's now an update of the app and @chriswells0 has a fix for people who can't update, closing |
IMPORTANT
Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)
Explain the Problem
I see the following in the Nextcloud Log: ArgumentCountError: Too few arguments to function
Steps to Reproduce
Explain what you did to encounter the issue
System Information
Contents of nextcloud/data/nextcloud.log
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: