Skip to content
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

[Bug]: cron.php Cannot call constructor in {...}/RemoteActivity.php:40 #49456

Closed
5 of 8 tasks
aligator opened this issue Nov 24, 2024 · 2 comments
Closed
5 of 8 tasks
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@aligator
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

since 5 days ago the cron job execution suddenly stopped working.
I updated Nextcloud patch version to v28.0.12 on the 16th Nov. and the problem seems to have started on the 19th Nov.
So not sure if that has something to do with it. (not sure if I updated an app at that time though...)

I get this error and couldn't find anything useful about it.

$ docker exec -u www-data nextcloud php cron.php
Error: Cannot call constructor in /var/www/html/apps/activity/lib/BackgroundJob/RemoteActivity.php:40
Stack trace:
#0 [internal function]: OCA\Activity\BackgroundJob\RemoteActivity->__construct(Object(OC\AppFramework\Utility\TimeFactory), Object(OC\Http\Client\ClientService), Object(OC\Federation\CloudIdManager))
#1 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(83): ReflectionClass->newInstanceArgs(Array)
#2 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(128): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#3 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(146): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Activity\\Ba...')
#4 /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php(470): OC\AppFramework\Utility\SimpleContainer->query('OCA\\Activity\\Ba...')
#5 /var/www/html/lib/private/ServerContainer.php(155): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\Activity\\Ba...')
#6 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query('OCA\\Activity\\Ba...')
#7 /var/www/html/lib/public/Server.php(55): OC\AppFramework\Utility\SimpleContainer->get('OCA\\Activity\\Ba...')
#8 /var/www/html/lib/private/BackgroundJob/JobList.php(325): OCP\Server::get('OCA\\Activity\\Ba...')
#9 /var/www/html/lib/private/BackgroundJob/JobList.php(234): OC\BackgroundJob\JobList->buildJob(Array)
#10 /var/www/html/cron.php(145): OC\BackgroundJob\JobList->getNext(true)
#11 {main}

Steps to reproduce

As I don't know yet what causes this, i can just say that I get the error above when executing:

docker exec -u www-data nextcloud php cron.php

I have that cronjob installed like this:

*/5 * * * * docker exec -u www-data nextcloud php cron.php

Expected behavior

The cronjob to just run without any error.

Nextcloud Server version

28

Operating system

Other

PHP engine version

PHP 8.2

Web server

Other

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwriteprotocol": "https",
        "overwritehost": "cloud.aligator.dev",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR"
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.aligator.dev"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.12.2",
        "overwrite.cli.url": "https:\/\/cloud.aligator.dev",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "maintenance": false,
        "default_phone_region": "DE",
        "loglevel": 0,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "upgrade.disable-web": true,
        "maintenance_window_start": 1
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - assistant: 1.1.0
  - audioplayer: 3.4.1
  - bookmarks: 14.2.6
  - bruteforcesettings: 2.8.0
  - calendar: 4.7.16
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.3
  - contactsinteraction: 1.9.0
  - cookbook: 0.11.2
  - cospend: 1.6.1
  - dashboard: 7.8.0
  - dav: 1.29.2
  - deck: 1.12.6
  - drawio: 3.0.3
  - external: 5.3.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - gpoddersync: 3.10.0
  - keeweb: 0.6.20
  - llm: 1.2.1
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - maps: 1.4.0
  - music: 2.0.1
  - nextcloud_announcements: 1.17.0
  - nextpod: 0.7.6
  - notes: 4.11.0
  - notifications: 2.16.0
  - oauth2: 1.16.4
  - password_policy: 1.18.0
  - photos: 2.4.0
  - polls: 7.2.5
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recognize: 6.1.1
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.12
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - spreed: 18.0.13
  - support: 1.11.1
  - survey_client: 1.16.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - tasks: 0.16.1
  - text: 3.9.2
  - theming: 2.3.0
  - timemanager: 0.3.16
  - twofactor_backupcodes: 1.17.0
  - twofactor_totp: 10.0.0-beta.2
  - twofactor_webauthn: 1.4.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - encryption: 2.16.0 (installed 2.16.0)
  - files_antivirus: 5.6.1 (installed 5.6.1)
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"nBBCoRz8nG6jVGPBh7sK","level":3,"time":"2024-11-24T03:50:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Exception thrown: Error","userAgent":"--","version":"28.0.12.2","exception":{"Exception":"Error","Message":"Cannot call constructor","Code":0,"Trace":[{"function":"__construct","class":"OCA\\Activity\\BackgroundJob\\RemoteActivity","type":"->","args":[{"__class__":"OC\\AppFramework\\Utility\\TimeFactory"},{"__class__":"OC\\Http\\Client\\ClientService"},{"__class__":"OC\\Federation\\CloudIdManager"}]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":83,"function":"newInstanceArgs","class":"ReflectionClass","type":"->","args":[[{"__class__":"OC\\AppFramework\\Utility\\TimeFactory"},{"__class__":"OC\\Http\\Client\\ClientService"},{"__class__":"OC\\Federation\\CloudIdManager"}]]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"__class__":"ReflectionClass","name":"OCA\\Activity\\BackgroundJob\\RemoteActivity"}]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Activity\\BackgroundJob\\RemoteActivity"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":470,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Activity\\BackgroundJob\\RemoteActivity"]},{"file":"/var/www/html/lib/private/ServerContainer.php","line":155,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Activity\\BackgroundJob\\RemoteActivity"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":64,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCA\\Activity\\BackgroundJob\\RemoteActivity"]},{"file":"/var/www/html/lib/public/Server.php","line":55,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Activity\\BackgroundJob\\RemoteActivity"]},{"file":"/var/www/html/lib/private/BackgroundJob/JobList.php","line":325,"function":"get","class":"OCP\\Server","type":"::","args":["OCA\\Activity\\BackgroundJob\\RemoteActivity"]},{"file":"/var/www/html/lib/private/BackgroundJob/JobList.php","line":234,"function":"buildJob","class":"OC\\BackgroundJob\\JobList","type":"->","args":[{"id":85985,"class":"OCA\\Activity\\BackgroundJob\\RemoteActivity","argument":"[\"[email protected]\",\"1PVDhdojrcbc5W1\",\"\\/5 Geschwister - Gef\\u00e4hrlich rieselt der Schnee\",\"file_deleted\",1732050490,\"[email protected]\"]","last_run":0,"last_checked":1732050490,"reserved_at":0,"execution_duration":0,"argument_hash":"ac76dff47c3675e66a8fec075a2adad6ecded406dc9ae8d77d30154c968957e0","time_sensitive":1}]},{"file":"/var/www/html/cron.php","line":145,"function":"getNext","class":"OC\\BackgroundJob\\JobList","type":"->","args":[false]}],"File":"/var/www/html/apps/activity/lib/BackgroundJob/RemoteActivity.php","Line":40,"CustomMessage":"Exception thrown: Error"},"id":"674306efa0f10"}

Additional info

I run this with the nextcloud:28.0.12 docker image.

@aligator aligator added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 24, 2024
@aligator
Copy link
Author

Update:
I disabled all apps and reenabled them one by one with always executing the cron.php.

Now it seems to work again...
So it seems to be a problem of an app, but I don't know which...

@joshtrichards
Copy link
Member

Fixed in nextcloud/activity#1842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

2 participants