nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
841 stars 260 forks source link

Could not load message. #4514

Closed alam0rt closed 3 years ago

alam0rt commented 3 years ago

Steps to reproduce

  1. Host hydroxide (proton OSS bridge) on same host
  2. Configure Mail to use Proton Bridge
  3. Use it and most of the time there are time outs + general slowness. Works sometimes though

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Error

OCA\Mail\Exception\ServiceException: Could not load message
  at OCA\Mail\Service\MailManager::getMessage
     /var/www/html/custom_apps/mail/lib/Controller/MessagesController.php, line 219
  at OCA\Mail\Controller\MessagesController::getBody
     /var/www/html/lib/private/AppFramework/Http/Dispatcher.php, line 170
  at OC\AppFramework\Http\Dispatcher::executeController
     /var/www/html/lib/private/AppFramework/Http/Dispatcher.php, line 100
  at OC\AppFramework\Http\Dispatcher::dispatch
     /var/www/html/lib/private/AppFramework/App.php, line 137
  at OC\AppFramework\App::main
     /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php, line 47
  at OC\AppFramework\Routing\RouteActionHandler::__invoke
  at call_user_func
     /var/www/html/lib/private/Route/Router.php, line 297
  at OC\Route\Router::match
     /var/www/html/lib/base.php, line 1011
  at OC::handleRequest
     /var/www/html/index.php, line 37
ChristophWurst commented 3 years ago

hi @alam0rt,

do you possibly have the full error trace from your nextcloud.log?

alam0rt commented 3 years ago

I can't find the exact trace in question, but I have found a few other interesting exceptions

    "Line": 213,
    "Previous": {
      "Exception": "Error",
      "Message": "Call to a member function getEmail() on null",
      "Code": 0,
      "Trace": [
        {
          "function": "OCA\\Mail\\Service\\Classification\\FeatureExtraction\\{closure}",
          "class": "OCA\\Mail\\Service\\Classification\\FeatureExtraction\\ImportantMessagesExtractor",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/lib/Service/Classification/FeatureExtraction/ImportantMessagesExtractor.php",
          "line": 55,
          "function": "array_map",
          "args": [
            {
              "__class__": "Closure"
            },
            [
              {
                "id": null,
                "__class__": "OCA\\Mail\\Db\\Message"
              },
              {
                "id": null,
                "__class__": "OCA\\Mail\\Db\\Message"
              },

the id: null items repeat hundreds of times in a single exception.

Another instance where there are many null id messages

 {
          "file": "/var/www/html/custom_apps/mail/lib/Service/Classification/ImportanceRulesClassifier.php",
          "line": 74,
          "function": "prepare",
          "class": "OCA\\Mail\\Service\\Classification\\FeatureExtraction\\ImportantMessagesExtractor",
          "type": "->",
          "args": [
            {
              "__class__": "OCA\\Mail\\Account"
            },
            {
              "2": {
                "id": 3,
                "__class__": "OCA\\Mail\\Db\\Mailbox"
              },
              "3": {
                "id": 1,
                "__class__": "OCA\\Mail\\Db\\Mailbox"
              }
            },
            [
              {
                "id": 7,
                "__class__": "OCA\\Mail\\Db\\Mailbox"
              }
            ],
            [
              {
                "id": null,
                "__class__": "OCA\\Mail\\Db\\Message"
              },
              {
                "id": null,
                "__class__": "OCA\\Mail\\Db\\Message"
              },

Not sure what the music app has to do with mail

{
  "reqId": "vtw3jgbUbbN5J2877zOF",
  "level": 3,
  "time": "2021-02-12T16:32:35+00:00",
  "remoteAddr": "172.69.134.111",
  "user": "sam",
  "app": "music",
  "method": "GET",
  "url": "/apps/mail/api/accounts/1/folders/SU5CT1g%3D/messages?filter=is:important&limit=20",
  "message": {
    "Exception": "RuntimeException",
    "Message": "App class OCA\\Music\\App\\Music is not setup via query() but directly",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/custom_apps/music/lib/App/Music.php",
        "line": 73,
        "function": "__construct",
        "class": "OCP\\AppFramework\\App",
        "type": "->",
        "args": [
          "music",
          []
        ]
      },
{
  "reqId": "vUkf9QyZHVNqqDxghCgc",
  "level": 3,
  "time": "2021-02-12T16:33:28+00:00",
  "remoteAddr": "172.69.134.111",
  "user": "sam",
  "app": "mail",
  "method": "POST",
  "url": "/apps/mail/api/accounts/1/folders/QWxsIE1haWw%3D/sync",
  "message": {
    "Exception": "OCA\\Mail\\Exception\\ServiceException",
    "Message": "Sync failed for 1:All Mail: Call to a member function getEmail() on null",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/custom_apps/mail/lib/Service/Sync/SyncService.php",
        "line": 126,
        "function": "sync",
        "class": "OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Mail\\Account"
          },
          {
            "id": 2,
            "__class__": "OCA\\Mail\\Db\\Mailbox"
          },
          42,
          [
            368,
            367,
            366,
            365,
            364,
            363,
            362,
            361,
            360,
            359,
            358,
...
# lots more of the null id messages reference 
chookie commented 3 years ago

I have the same issue with the same setup using Proton bridge on ubuntu 20.04. The list of mail appears in the inbox but when I click one it just stays on the spinner due to the error in the attached log.

nextcloud.log System Information 2021-02-13.txt

Joachim1305 commented 3 years ago

I have the same issue. Please see issue 4400 (nextcoud.log and horde_imap.log included).

ChristophWurst commented 3 years ago
# lots more of the null id messages reference 

that is actually the trace that I asked for. Please don't truncate it.

alam0rt commented 3 years ago

I'll include them when I have the chance. Thanks

On Wed, Feb 24, 2021 at 3:17 AM Christoph Wurst notifications@github.com wrote:

lots more of the null id messages reference

that is actually the trace that I asked for. Please don't truncate it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nextcloud/mail/issues/4514#issuecomment-784319895, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILMHNX2GQH7AO7FQR2SVJTTAPIIRANCNFSM4XQCH5KA .

no-response[bot] commented 3 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.