syocNewLock is not a valid attribute (solved)

Hiya!

I’m trying to get the Mail app to work on Nextcloud 29. Even thoug the account settings are (checked okay and) saved, no mails are listed and NC logs:

BadFunctionCallException syocNewLock is not a valid attribute
Error while running background job OCA\Mail\BackgroundJob\PreviewEnhancementProcessingJob (id: 1376, arguments: {“accountId”:3})

There’s not much to be found on syocNewLock online, maybe somebody has seen this message?

Thanks for your help!

Can you post the entire raw log entry?

We have a field called syncNewLock.

Sure, here you go:

{
  "reqId": "HLbu30kJXMjmOkxBknLX",
  "level": 3,
  "time": "2024-07-08T18:10:00+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "mail",
  "method": "",
  "url": "--",
  "message": "Cron mail sync failed for account 3",
  "userAgent": "--",
  "version": "29.0.3.4",
  "exception": {
    "Exception": "BadFunctionCallException",
    "Message": "syocNewLock is not a valid attribute",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/public/AppFramework/Db/Entity.php",
        "line": 167,
        "function": "setter",
        "class": "OCP\\AppFramework\\Db\\Entity",
        "type": "->",
        "args": [
          "syocNewLock",
          [
            null
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/public/AppFramework/Db/Entity.php",
        "line": 75,
        "function": "__call",
        "class": "OCP\\AppFramework\\Db\\Entity",
        "type": "->",
        "args": [
          "setSyocNewLock",
          [
            null
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php",
        "line": 321,
        "function": "fromRow",
        "class": "OCP\\AppFramework\\Db\\Entity",
        "type": "::",
        "args": [
          [
            610,
            "Trash",
            3,
            "[\"\\\\subscribed\",\"\\\\unmarked\",\"\\\\trash\"]",
            ".",
            "And 14 more entries, set log level to debug to see all entries"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php",
        "line": 339,
        "function": "mapRowToEntity",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->",
        "args": [
          [
            610,
            "Trash",
            3,
            "[\"\\\\subscribed\",\"\\\\unmarked\",\"\\\\trash\"]",
            ".",
            "And 14 more entries, set log level to debug to see all entries"
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Db/MailboxMapper.php",
        "line": 66,
        "function": "findEntities",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->",
        "args": [
          [
            "OC\\DB\\QueryBuilder\\QueryBuilder"
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/IMAP/MailboxSync.php",
        "line": 134,
        "function": "findAll",
        "class": "OCA\\Mail\\Db\\MailboxMapper",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/public/AppFramework/Db/TTransactional.php",
        "line": 63,
        "function": "OCA\\Mail\\IMAP\\{closure}",
        "class": "OCA\\Mail\\IMAP\\MailboxSync",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/IMAP/MailboxSync.php",
        "line": 133,
        "function": "atomic",
        "class": "OCA\\Mail\\IMAP\\MailboxSync",
        "type": "->",
        "args": [
          [
            "Closure"
          ],
          [
            "OC\\DB\\ConnectionAdapter"
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/BackgroundJob/SyncJob.php",
        "line": 109,
        "function": "sync",
        "class": "OCA\\Mail\\IMAP\\MailboxSync",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
        "line": 80,
        "function": "run",
        "class": "OCA\\Mail\\BackgroundJob\\SyncJob",
        "type": "->",
        "args": [
          [
            3
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
        "line": 102,
        "function": "start",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
        "line": 92,
        "function": "start",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ]
        ]
      },
      {
        "file": "/var/www/html/cron.php",
        "line": 177,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ]
        ]
      }
    ],
    "File": "/var/www/html/lib/public/AppFramework/Db/Entity.php",
    "Line": 138,
    "message": "Cron mail sync failed for account {accountId}",
    "exception": {},
    "CustomMessage": "Cron mail sync failed for account 3"
  }
}

Also, this is a very small NC instance with only two users, file locking is therefore done on the Postgres right now.

Ah, could be a typo in the mail app source somewhere.

I agree it looks like a simple typo but I see no evidence there has ever been a typo in any published (or published) version.

What version of the Mail app is this?

Also, can you confirm the integrity of your installation?

occ integrity:check-app mail

What’s the history of this installation? Is this a brand-new install or one that was been updated a few times? Was the mail app newly installed? Ever previously installed? etc.

I grepped the source, but couldn’t find “syoc” anywhere. Maybe NC serializes code to the db, wouldn’t be particularly strange for async jobs.

The integrity check doesn’t return anything and exits with 0.

I had the Mail app installed before, but uninstalled it a few months ago, now reinstalled it. Version is 3.7.2, the version of NC 29.0.3 – all is up to date.

I’m not in the mood for a scalpel, so I used the hatchet instead:

  1. Uninstalled the Mail app
  2. Dropped all “oc_mail_*” tables
  3. Deleted all migrations for app “mail” from “oc_migrations”
  4. Reinstalled the Mail app

:tada: It works now!

1 Like