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 after upgrade to 4.1.0 - BadFunctionCallException mentionsMe is not a valid attribute #10519

Closed
roko74 opened this issue Dec 18, 2024 · 11 comments

Comments

@roko74
Copy link

roko74 commented Dec 18, 2024

Steps to reproduce

  1. Use Nextcloud Hub 9 (30.0.4)
  2. Have two mail accounts in use in Mail App below version 4.1.0
  3. Upgrade app to version 4.1.0
  4. Try to use the new mail app.

Expected behavior

I expect to see my mails from both accounts.

Actual behavior

I get the message "Could not open mailbox." and I've a lot of error entries inside the log:
mail: "BadFunctionCallException mentionsMe is not a valid attribute"

Mail app version

4.1.0

Nextcloud version

30.0.4

Mailserver or service

Gmail, GMX

Operating system

Raspberry Pi OS Bookworm with Apache2 - all updates installed.

PHP engine version

PHP 8.3

Nextcloud memory caching

No response

Web server

Apache (supported)

Database

PostgreSQL

Additional info

No response

@nigelharpur
Copy link

I have the exact same issue since the last update too - same version of the app and NC - runniing on Ubuntu Server 22.04 and Nginx.
The error message accumulates/repeats on it's own, I gues as the app attempts to open my two mailboxes.

@SebastianKrupinski
Copy link
Contributor

Hi, could you please post the full error from the nextcloud.log?

@nigelharpur
Copy link

Here's the raw data - the errors seem to alternate with one variable aside from unique IDs - the "url" is tagged either =mail read (or unread) - I think I've redacted the bits that would identify my instance to the CIA or whatever 😬

{
"reqId": "hh8WR4PTqRx2Nmj6XMag",
"level": 3,
"time": "2024-12-18T23:49:56+00:00",
"remoteAddr": "222.222.22.222",
"user": "xxxxxxxxx",
"app": "no app in context",
"method": "GET",
"url": "/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=mail-unread",
"message": "mentionsMe is not a valid attribute",
"userAgent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36",
"version": "30.0.4.1",
"exception": {
"Exception": "BadFunctionCallException",
"Message": "mentionsMe is not a valid attribute",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php",
"line": 56,
"function": "setter",
"class": "OCP\AppFramework\Db\Entity",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 299,
"function": "fromRow",
"class": "OCP\AppFramework\Db\Entity",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 317,
"function": "mapRowToEntity",
"class": "OCP\AppFramework\Db\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Db/MessageMapper.php",
"line": 1283,
"function": "findEntities",
"class": "OCP\AppFramework\Db\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Search/MailSearch.php",
"line": 144,
"function": "findByIds",
"class": "OCA\Mail\Db\MessageMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Dashboard/MailWidget.php",
"line": 114,
"function": "findMessagesGlobally",
"class": "OCA\Mail\Service\Search\MailSearch",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Dashboard/MailWidget.php",
"line": 130,
"function": "getEmails",
"class": "OCA\Mail\Dashboard\MailWidget",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Dashboard/MailWidget.php",
"line": 159,
"function": "getItems",
"class": "OCA\Mail\Dashboard\MailWidget",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/dashboard/lib/Controller/DashboardApiController.php",
"line": 119,
"function": "getItemsV2",
"class": "OCA\Mail\Dashboard\MailWidget",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 208,
"function": "getWidgetItemsV2",
"class": "OCA\Dashboard\Controller\DashboardApiController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 114,
"function": "executeController",
"class": "OC\AppFramework\Http\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 161,
"function": "dispatch",
"class": "OC\AppFramework\Http\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 302,
"function": "main",
"class": "OC\AppFramework\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/ocs/v1.php",
"line": 43,
"function": "match",
"class": "OC\Route\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/ocs/v2.php",
"line": 7,
"args": [
"/var/www/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php",
"Line": 119,
"message": "mentionsMe is not a valid attribute",
"exception": [],
"CustomMessage": "mentionsMe is not a valid attribute"
},
"id": "6763e856cb78e"

@roko74
Copy link
Author

roko74 commented Dec 19, 2024

Here the log from my nextcloud instance:
nextcloud.log

@SebastianKrupinski
Copy link
Contributor

Odd, looks like its related to a database column, "mentions_me" in the "mail_messages" table, can you confirm this column exists?

@otvoreno
Copy link

otvoreno commented Dec 20, 2024

same bug for me.

every entry for column "mentions_me" in table "oc_mail_messages" seems to be 0. the column exists.

Nextcloud Hub 9 (30.0.4)
PHP 8.2.26
Mail-App 4.1.0
Mariadb 15.1
Debian 12

@roko74
Copy link
Author

roko74 commented Dec 20, 2024

Here an excerpt of my table 'oc_mail_messages' - all datasets have the column "mentions_me" with the value "false":
Image

@otvoreno
Copy link

same bug for me.

every entry for column "mentions_me" in table "oc_mail_messages" seems to be 0. the column exists.

Nextcloud Hub 9 (30.0.4) PHP 8.2.26 Mail-App 4.1.0 Mariadb 15.1 Debian 12


MariaDB [nextcloud]> select distinct mentions_me from oc_mail_messages;
+-------------+
| mentions_me |
+-------------+
|           0 |
+-------------+
1 row in set (0,017 sec)

@SebastianKrupinski
Copy link
Contributor

okay, if the column exist then that means either the upgraded code is missing or its a opcache issue.

Restart php (php-fpm on most systems) this should recreate the opcache. If the error still exists can you confirm that the following line exists in your code.

* @method bool getMentionsMe()

And

protected $mentionsMe = false;

@otvoreno
Copy link

okay, if the column exist then that means either the upgraded code is missing or its a opcache issue.

Restart php (php-fpm on most systems) this should recreate the opcache. If the error still exists can you confirm that the following line exists in your code.

mail/lib/Db/Message.php

Line 71 in a959a81

And

mail/lib/Db/Message.php

Line 114 in a959a81
protected $mentionsMe = false;

Restarting php-fpm helped. For me it was done with:

systemctl restart php8.2-fpm.service

So restarting the Server would have helped, too. Thanks for your time. Have a nice end of the year

@roko74
Copy link
Author

roko74 commented Dec 21, 2024

Restart of the service helped also for me. Thank you!

@roko74 roko74 closed this as completed Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants