nextcloud / nextcloud/mail

"quotaPercentage is not a valid attribute" after update to 3.3.0

Open
#8,791 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce

This is happening when I've upgraded Mail from 3.2.x to 3.3.0.

Expected behavior

Show the Mail App.

Actual behavior
{
  "reqId": "ZOPL7Jti41ebJ3lSjy5hCQAAAE4",
  "level": 3,
  "time": "2023-08-21T20:41:16+00:00",
  "remoteAddr": "10.0.0.1",
  "user": "********",
  "app": "index",
  "method": "GET",
  "url": "/index.php/apps/mail/",
  "message": "quotaPercentage is not a valid attribute",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
  "version": "27.0.2.1",
  "exception": {
    "Exception": "BadFunctionCallException",
    "Message": "quotaPercentage is not a valid attribute",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php",
        "line": 167,
        "function": "setter",
        "class": "OCP\\AppFramework\\Db\\Entity",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php",
        "line": 75,
        "function": "__call",
        "class": "OCP\\AppFramework\\Db\\Entity",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
        "line": 321,
        "function": "fromRow",
        "class": "OCP\\AppFramework\\Db\\Entity",
        "type": "::"
      },
      {
        "file": "/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
        "line": 339,
        "function": "mapRowToEntity",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/mail/lib/Db/MailAccountMapper.php",
        "line": 97,
        "function": "findEntities",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/mail/lib/Service/AccountService.php",
        "line": 72,
        "function": "findByUserId",
        "class": "OCA\\Mail\\Db\\MailAccountMapper",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/mail/lib/Controller/PageController.php",
        "line": 134,
        "function": "findByUserId",
        "class": "OCA\\Mail\\Service\\AccountService",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "index",
        "class": "OCA\\Mail\\Controller\\PageController",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/html/nextcloud/lib/base.php",
        "line": 1071,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php",
    "Line": 138,
    "CustomMessage": "--"
  }
}
Mail app version

3.3.0

Mailserver or service

IRedMail 1.6.2

Operating system

Centos 7.9

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database

MySQL

Additional info
{"reqId":"ZOPFUrC5JvotrsphErQqoAAAAIg","level":3,"time":"2023-08-21T20:13:13+00:00","remoteAddr":"**************","user":"***********","app":"no app in context","method":"GET","url":"/index.php/settings/apps/update/mail","message":"Exception while executing repair step Restore default tags that are missing","userAge
nt":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0","version":"27.0.2.1","exception":{"Exception":"BadFunctionCallException","Message":"quotaPercentage is not a valid attribute","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php","line":167,"fu
nction":"setter","class":"OCP\\AppFramework\\Db\\Entity","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php","line":75,"function":"__call","class":"OCP\\AppFramework\\Db\\Entity","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":321,"functi
on":"fromRow","class":"OCP\\AppFramework\\Db\\Entity","type":"::"},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":339,"function":"mapRowToEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/Db/MailAccountMapper.php","line":16
0,"function":"findEntities","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/Migration/AddMissingDefaultTags.php","line":60,"function":"getAllAccounts","class":"OCA\\Mail\\Db\\MailAccountMapper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Repair.php"
,"line":126,"function":"run","class":"OCA\\Mail\\Migration\\AddMissingDefaultTags","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_App.php","line":905,"function":"run","class":"OC\\Repair","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_App.php","line":846,"function":"executeR
epairSteps","class":"OC_App","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/Installer.php","line":200,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":535,"f
unction":"updateAppstoreApp","class":"OC\\Installer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"updateApp","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":["*** sensi
tive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class
":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1071,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"
/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php","Line":138,"message":"Exception while executing repair step Restore default tags that are missing","exception":{},"CustomMessage":"Exception while
executing repair step Restore default tags that are missing"}}

{"reqId":"ZOPFUrC5JvotrsphErQqoAAAAIg","level":3,"time":"2023-08-21T20:13:13+00:00","remoteAddr":"**************","user":"***********","app":"no app in context","method":"GET","url":"/index.php/settings/apps/update/mail","message":"Exception while executing repair step Insert background jobs for all accounts","userA
gent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0","version":"27.0.2.1","exception":{"Exception":"BadFunctionCallException","Message":"quotaPercentage is not a valid attribute","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php","line":167,"
function":"setter","class":"OCP\\AppFramework\\Db\\Entity","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php","line":75,"function":"__call","class":"OCP\\AppFramework\\Db\\Entity","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":321,"func
tion":"fromRow","class":"OCP\\AppFramework\\Db\\Entity","type":"::"},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":339,"function":"mapRowToEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/Db/MailAccountMapper.php","line":
160,"function":"findEntities","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/Migration/FixBackgroundJobs.php","line":58,"function":"getAllAccounts","class":"OCA\\Mail\\Db\\MailAccountMapper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Repair.php","
line":126,"function":"run","class":"OCA\\Mail\\Migration\\FixBackgroundJobs","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_App.php","line":905,"function":"run","class":"OC\\Repair","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_App.php","line":846,"function":"executeRepairS
teps","class":"OC_App","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/Installer.php","line":200,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":535,"functio
n":"updateAppstoreApp","class":"OC\\Installer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"updateApp","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":["*** sensitive p
arameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\
\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1071,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/w
ww/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/public/AppFramework/Db/Entity.php","Line":138,"message":"Exception while executing repair step Insert background jobs for all accounts","exception":{},"CustomMessage":"Exception while exec
uting repair step Insert background jobs for all accounts"}}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/mail/lib/Db/MailAccountMapper.php and the Entity.php stack frames to trace how account rows are mapped after the 3.3.0 update. Read the AddMissingDefaultTags and FixBackgroundJobs migration paths, then reproduce the upgrade or repair steps. Done means the Mail app loads and both repair steps complete without the quotaPercentage exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.