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

Error running background job: Argument #1 ($array) must be of type array, string given #3417

Closed
5 of 12 tasks
polhenarejos opened this issue Apr 5, 2024 · 3 comments · Fixed by #3419
Closed
5 of 12 tasks
Labels

Comments

@polhenarejos
Copy link

polhenarejos commented Apr 5, 2024

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • I agree to follow Nextcloud's Code of Conduct.

What went wrong, what did you observe?

I see lots of error messages in the logfile, every 5 minutes. Apparently, I no issues have been reported interacting with polls app, just the logfile. The error is at cron job with the message and log section raises the following message

<html>
<body>
<!--StartFragment-->
TypeErrorkey(): Argument #1 ($array) must be of type array, string givenError while running background job (class: OCA\Polls\Cron\AutoReminderCron, arguments: )
--


<br class="Apple-interchange-newline"><!--EndFragment-->
</body>
</html>

I paste the entire log below.

What did you expect, how polls should behave instead?

No errors in the logfile.

What steps does it need to replay this bug?

  1. Create a poll with autoreminder option enabled
  2. Share it with a group

Installation method

Installed/updated from the appstore (Apps section of your site)

Installation type

First time installation

Affected polls version

7.0.2

Which browser did you use, when experiencing the bug?

  • Firefox
  • Chrome
  • Chromium/Chromium based (i.e. Edge)
  • Safari
  • Other/Don't know

Other browser

No response

Add your browser log here

No response

Additional client environment information

No response

NC version

Nextcloud 28

Other Nextcloud version

No response

PHP engine version

PHP 8.1

Other PHP version

No response

Database engine

MariaDB

Database Engine version or other Database

No response

Which user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other/Don't know

Add your nextcloud server log here

{
  "reqId": "Pqdc5RULOZIhSer60OkL",
  "level": 3,
  "time": "2024-04-05T06:45:02+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "core",
  "method": "",
  "url": "--",
  "message": "Error while running background job (class: OCA\\Polls\\Cron\\AutoReminderCron, arguments: )",
  "userAgent": "--",
  "version": "28.0.4.1",
  "exception": {
    "Exception": "TypeError",
    "Message": "key(): Argument #1 ($array) must be of type array, string given",
    "Code": 0,
    "Trace": [
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/apps/polls/lib/Model/Group/Group.php",
        "line": 64,
        "function": "key"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/apps/polls/lib/Service/MailService.php",
        "line": 277,
        "function": "getMembers",
        "class": "OCA\\Polls\\Model\\Group\\Group",
        "type": "->"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/apps/polls/lib/Service/MailService.php",
        "line": 265,
        "function": "sendAutoReminderToRecipients",
        "class": "OCA\\Polls\\Service\\MailService",
        "type": "->"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/apps/polls/lib/Service/MailService.php",
        "line": 228,
        "function": "processSharesForAutoReminder",
        "class": "OCA\\Polls\\Service\\MailService",
        "type": "->"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/apps/polls/lib/Cron/AutoReminderCron.php",
        "line": 49,
        "function": "sendAutoReminder",
        "class": "OCA\\Polls\\Service\\MailService",
        "type": "->"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/lib/public/BackgroundJob/Job.php",
        "line": 81,
        "function": "run",
        "class": "OCA\\Polls\\Cron\\AutoReminderCron",
        "type": "->"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
        "line": 102,
        "function": "start",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
        "line": 92,
        "function": "start",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      },
      {
        "file": "/home/phenarejos/CASTLE/django/www/nextcloud/cron.php",
        "line": 152,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      }
    ],
    "File": "/home/phenarejos/CASTLE/django/www/nextcloud/apps/polls/lib/Model/Group/Group.php",
    "Line": 64,
    "message": "Error while running background job (class: OCA\\Polls\\Cron\\AutoReminderCron, arguments: )",
    "exception": {},
    "CustomMessage": "Error while running background job (class: OCA\\Polls\\Cron\\AutoReminderCron, arguments: )"
  }
}

Additional environment informations

No response

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            void
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.4.1",
        "overwrite.cli.url": void,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "app_install_overwrite": [
            "electronicsignatures"
        ],
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "default_phone_region": "ES",
        "allow_local_remote_servers": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "onlyoffice": {
            "verify_peer_off": true,
            "jwt_header": "AuthorizationJwt",
            "jwt_secret": "***REMOVED SENSITIVE VALUE***"
        },
        "maintenance_window_start": 1,
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.7
  - checksum: 1.2.3
  - cloud_federation_api: 1.11.0
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - encryption: 2.16.0
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_automatedtagging: 1.18.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
  - fileslibreofficeedit: 1.1.0
  - firstrunwizard: 2.17.0
  - forms: 4.1.1
  - groupfolders: 16.0.6
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - onlyoffice: 9.0.0
  - password_policy: 1.18.0
  - polls: 7.0.2
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - tasks: 0.15.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - viewer: 2.2.0
  - workflowengine: 2.10.0
Disabled:
  - circles: 28.0.0 (installed 25.0.0)
  - comments: 1.18.0 (installed 1.15.0)
  - files_accesscontrol: 1.18.0 (installed 1.18.0)
  - files_archive: 1.2.3 (installed 1.2.3)
  - files_external: 1.20.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - libresign: 7.1.1 (installed 7.1.1)
  - metadata: 0.19.0 (installed 0.19.0)
  - photos: 2.4.0 (installed 2.0.1)
  - related_resources: 1.3.0 (installed 1.3.0)
  - richdocuments: 8.3.3 (installed 8.3.3)
  - survey_client: 1.16.0 (installed 1.13.0)
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0
  - user_status: 1.8.1 (installed 1.5.0)
  - weather_status: 1.8.0 (installed 1.5.0)

Nextcloud Signing status

No errors have been found.

Additional Information

No response

@dartcafe
Copy link
Collaborator

dartcafe commented Apr 5, 2024

Nice. That was a wrong usage of the key() function. Should be fixed.

Thanks. Update will come soon

@dartcafe
Copy link
Collaborator

dartcafe commented Apr 5, 2024

The error also happens when tryiung to send out invitations for a group. The change fixed it.

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants