Giter Site home page Giter Site logo

Unable to load message about mail HOT 13 OPEN

Sjoerd001 avatar Sjoerd001 commented on July 24, 2024
Unable to load message

from mail.

Comments (13)

Sjoerd001 avatar Sjoerd001 commented on July 24, 2024

Some errors from nextcloud.log:

{
  "reqId": "Zmfm_SgM-8AZ_mvrWgCr9AAAAM0",
  "level": 3,
  "time": "2024-06-11T05:56:16+00:00",
  "remoteAddr": "10.10.254.1",
  "user": "kxxxxxx",
  "app": "mail",
  "method": "GET",
  "url": "/nextcloud/index.php/apps/mail/api/messages/5255/body",
  "message": "Could not load message",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0",
  "version": "28.0.5.1",
  "exception": {
    "Exception": "OCA\\Mail\\Exception\\ServiceException",
    "Message": "Could not load message",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/lib/nextcloud/apps/mail/lib/Controller/MessagesController.php",
        "line": 230,
        "function": "getImapMessage",
        "class": "OCA\\Mail\\Service\\MailManager",
        "type": "->"
      },
      {
        "file": "/usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "getBody",
        "class": "OCA\\Mail\\Controller\\MessagesController",
        "type": "->"
      },
      {
        "file": "/usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/usr/share/nextcloud/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/usr/share/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/usr/share/nextcloud/lib/base.php",
        "line": 1069,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/usr/share/nextcloud/index.php",
        "line": 39,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/lib/nextcloud/apps/mail/lib/Service/MailManager.php",
    "Line": 206,
    "Previous": {
      "Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
      "Message": "Message does not exist",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/lib/nextcloud/apps/mail/lib/Service/MailManager.php",
          "line": 198,
          "function": "find",
          "class": "OCA\\Mail\\IMAP\\MessageMapper",
          "type": "->"
        },
        {
          "file": "/var/lib/nextcloud/apps/mail/lib/Controller/MessagesController.php",
          "line": 230,
          "function": "getImapMessage",
          "class": "OCA\\Mail\\Service\\MailManager",
          "type": "->"
        },
        {
          "file": "/usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 230,
          "function": "getBody",
          "class": "OCA\\Mail\\Controller\\MessagesController",
          "type": "->"
        },
        {
          "file": "/usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 137,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/usr/share/nextcloud/lib/private/AppFramework/App.php",
          "line": 184,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/usr/share/nextcloud/lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "file": "/usr/share/nextcloud/lib/base.php",
          "line": 1069,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->"
        },
        {
          "file": "/usr/share/nextcloud/index.php",
          "line": 39,
          "function": "handleRequest",
          "class": "OC",
          "type": "::"
        }
      ],
      "File": "/var/lib/nextcloud/apps/mail/lib/IMAP/MessageMapper.php",
      "Line": 89
    },
    "message": "Could not load message",
    "exception": {},
    "CustomMessage": "Could not load message"
  }
}

from mail.

Sjoerd001 avatar Sjoerd001 commented on July 24, 2024

Data in mail export:

status | "error"
message | "OCA\\Mail\\Http\\AttachmentDownloadResponse::__construct(): Argument #1 ($content) must be of type string, null given, called in /var/lib/nextcloud/apps/mail/lib/Controller/MessagesController.php on line 549 in file '/var/lib/nextcloud/apps/mail/lib/Http/AttachmentDownloadResponse.php' line 45"
data |  
debug | true
type | "Exception"
message | "OCA\\Mail\\Http\\AttachmentDownloadResponse::__construct(): Argument #1 ($content) must be of type string, null given, called in /var/lib/nextcloud/apps/mail/lib/Controller/MessagesController.php on line 549 in file '/var/lib/nextcloud/apps/mail/lib/Http/AttachmentDownloadResponse.php' line 45"
code | 0
trace |  
0 |  
file | "/usr/share/nextcloud/lib/private/AppFramework/App.php"
line | 184
function | "dispatch"
class | "OC\\AppFramework\\Http\\Dispatcher"
1 |  
file | "/usr/share/nextcloud/lib/private/Route/Router.php"
line | 315
function | "main"
class | "OC\\AppFramework\\App"
2 |  
file | "/usr/share/nextcloud/lib/base.php"
line | 1069
function | "match"
class | "OC\\Route\\Router"
3 |  
file | "/usr/share/nextcloud/index.php"
line | 39
function | "handleRequest"
class | "OC"
previous |  
type | "TypeError"
message | "OCA\\Mail\\Http\\AttachmentDownloadResponse::__construct(): Argument #1 ($content) must be of type string, null given, called in /var/lib/nextcloud/apps/mail/lib/Controller/MessagesController.php on line 549"
code | 0
trace |  
0 |  
file | "/var/lib/nextcloud/apps/mail/lib/Controller/MessagesController.php"
line | 549
function | "__construct"
class | "OCA\\Mail\\Http\\AttachmentDownloadResponse"
1 |  
file | "/usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php"
line | 230
function | "export"
class | "OCA\\Mail\\Controller\\MessagesController"
2 |  
file | "/usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php"
line | 137
function | "executeController"
class | "OC\\AppFramework\\Http\\Dispatcher"
3 |  
file | "/usr/share/nextcloud/lib/private/AppFramework/App.php"
line | 184
function | "dispatch"
class | "OC\\AppFramework\\Http\\Dispatcher"
4 |  
file | "/usr/share/nextcloud/lib/private/Route/Router.php"
line | 315
function | "main"
class | "OC\\AppFramework\\App"
5 |  
file | "/usr/share/nextcloud/lib/base.php"
line | 1069
function | "match"
class | "OC\\Route\\Router"
6 |  
file | "/usr/share/nextcloud/index.php"
line | 39
function | "handleRequest"
class | "OC"
previous | null
code | 0

from mail.

Sjoerd001 avatar Sjoerd001 commented on July 24, 2024

Some headers:

Cache-Control: no-cache, no-store, must-revalidate
Connection: close
Content-Security-Policy: default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'
Content-Type: application/json; charset=utf-8
Date: Tue, 11 Jun 2024 06:26:27 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Feature-Policy: autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'
Pragma: no-cache
Referrer-Policy: no-referrer
Server: Apache/2.4.59 (Fedora Linux) OpenSSL/3.2.1 mod_auth_gssapi/1.6.5 mod_fcgid/2.3.9 SVN/1.14.3 mod_wsgi/5.0.0 Python/3.12 mod_perl/2.0.13 Perl/v5.38.2
Strict-Transport-Security: max-age=15552000; includeSubDomains
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Powered-By: PHP/8.3.7
X-Request-Id: ZmfuEzIpnJcAslS-5wgKnQAAAA4
X-Robots-Tag: noindex, nofollow
X-XSS-Protection: 1; mode=block
x-mail-response: true

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: nl,en-US;q=0.7,en;q=0.3
Connection: keep-alive
DNT: 1
Host: mydomain.tld
Priority: u=1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Sec-GPC: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0

from mail.

Cijay22 avatar Cijay22 commented on July 24, 2024

@Sjoerd001, can I ask you about your issue? The email body is displaying as white. Also, when you click on 'reply', is the content of the email loading? I'm experiencing a similar issue with some emails where the body does not load initially. When I check the source mail, I can see the content. When I check with a other mail client no issues. However, when I click 'reply' and scroll down, the email content becomes visible. But when I click on the original email, the body is empty and not visible.

I've installed the latest NC Mail 3.7.2.

Thanks!

from mail.

yockl avatar yockl commented on July 24, 2024

@Cijay22 I have the same issue that mails not fully loaded and the email is showing white instead of content. When I go to answer the mailcontent is loading. With all other webmail clients it is working without any issues! So it seems to be there is a bug in the mailclient
NC Mail
mail1

NC Mail after click on answer
mail2

Roundcube mailclient
mail3-roundcube

Is there any solution for that?

from mail.

ChristophWurst avatar ChristophWurst commented on July 24, 2024

Export the emails as .eml, rename to .txt and upload it here for an engineer to reproduce

from mail.

Sjoerd001 avatar Sjoerd001 commented on July 24, 2024

Your reply as .txt renamed .eml
Re- -nextcloud-mail- Unable to load message (Issue #9729)-ead1d195b83c1b96e31e8acc27dc1fe5.txt

Mail in Nextcloud/SnappyMail:

Screenshot at 2024-07-11 13-09-28

Same for Nexcloud/Mail (No body message):

Screenshot at 2024-07-11 13-29-57

from mail.

ChristophWurst avatar ChristophWurst commented on July 24, 2024

@Cijay22 I have the same issue that mails not fully loaded and the email is showing white instead of content.

Please open a new ticket for your problem. It's not the same that @Sjoerd001 is reporting. Export the problematic email so we can reproduce with the same message.

from mail.

ChristophWurst avatar ChristophWurst commented on July 24, 2024

@Sjoerd001 I think for you problem it would be best to temporarily enable debug mode via config.php and watch data/horde_imap.log for any IMAP errors.

from mail.

Sjoerd001 avatar Sjoerd001 commented on July 24, 2024

Debugging was already enabled:
'debug' => true,
'loglevel' => 0,
'loglevel_frontend' => 0,
'log.backtrace' => true,
'log_query' => false,
'logfile' => '/var/log/nextcloud/asus/nextcloud.log',
'log_rotate_size' => 1073741824,

This is my imap connection from horde_imap.log:

Thu, 11 Jul 2024 11:48:46 +0000
Connection to: imap://10.10.3.198:993/
Server connection took 0.0076 seconds.
S: * OK [CAPABILITY IMAP4rev1 AUTH=LOGIN AUTH=CRAM-MD5 STARTTLS ID LITERAL+] "IMAPS server ready"
C: 1 LOGIN sjxxxxx [PASSWORD]
S: 1 OK [CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE ID UIDPLUS WITHIN CONDSTORE LITERAL+ ENABLE QRESYNC] User
sjxxxxx authenticated
Command 1 took 0.0396 seconds.
CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 2 ENABLE QRESYNC
C: 3 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * ENABLED QRESYNC
S: 2 OK ENABLE completed
Command 2 took 0.0023 seconds.
S: * STATUS "INBOX" (MESSAGES 376 RECENT 0 UIDNEXT 822469 UIDVALIDITY 1 UNSEEN 137)
S: 3 OK STATUS completed
Command 3 took 0.0171 seconds.
S: * STATUS "INBOX" (MESSAGES 376 UIDNEXT 822469 UIDVALIDITY 1 HIGHESTMODSEQ 18415)
S: 3 OK STATUS completed
Command 3 took 0.0104 seconds.
C: 4 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY HIGHESTMODSEQ)
S: * STATUS "INBOX" (MESSAGES 376 UIDNEXT 822469 UIDVALIDITY 1 HIGHESTMODSEQ 18415)
S: 4 OK STATUS completed
Command 4 took 0.0145 seconds.
C: 5 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY HIGHESTMODSEQ)
S: * STATUS "INBOX" (MESSAGES 376 UIDNEXT 822469 UIDVALIDITY 1 HIGHESTMODSEQ 18415)
S: 5 OK STATUS completed
Command 5 took 0.0146 seconds.
C: 6 EXAMINE INBOX (QRESYNC (1 18415 822464,822466,822468))
S: * 376 EXISTS
S: * 0 RECENT
S: * FLAGS (\Seen \Answered \Deleted \Flagged \Draft $label1 NonJunk)
S: * OK [PERMANENTFLAGS (\Seen \Answered \Deleted \Flagged \Draft $label1 NonJunk *)] Flags allowed.
S: * OK [UIDNEXT 822469] Predicted next UID
S: * OK [UIDVALIDITY 1] UID value
S: * OK [HIGHESTMODSEQ 18415] Highest
S: 6 OK [READ-ONLY] EXAMINE completed, CONDSTORE is now enabled
Command 6 took 1.2283 seconds.
SEARCH: Retrieved search from cache (5fd24ddf2e6b52e01ce806e5030eed4e [INBOX])
CACHE: Retrieved messages (HICenv,HICflags,HICdate,HICdg [INBOX; 822466,822468])
C: 7 UID FETCH 822466,822468 (BODY.PEEK[HEADER])
S: 7 OK UID FETCH completed
Command 7 took 0.0019 seconds.
C: 8 SELECT INBOX (QRESYNC (1 18415 822464,822466,822468))
S: * OK [CLOSED]
S: * 376 EXISTS
S: * 0 RECENT
S: * FLAGS (\Seen \Answered \Deleted \Flagged \Draft $label1 NonJunk)
S: * OK [PERMANENTFLAGS (\Seen \Answered \Deleted \Flagged \Draft $label1 NonJunk *)] Flags allowed.
S: * OK [UIDNEXT 822469] Predicted next UID
S: * OK [UIDVALIDITY 1] UID value
S: * OK [HIGHESTMODSEQ 18415] Highest
S: 8 OK [READ-WRITE] SELECT completed, CONDSTORE is now enabled
Command 8 took 0.0087 seconds.
C: 9 UID FETCH 1:* UID (VANISHED CHANGEDSINCE 18412)
S: 9 OK UID FETCH completed
Command 9 took 0.0035 seconds.
C: 10 LOGOUT
S: * BYE
S: 10 OK LOGOUT completed
Command 10 took 0.0016 seconds.

from mail.

ChristophWurst avatar ChristophWurst commented on July 24, 2024

That looks ok

from mail.

Sjoerd001 avatar Sjoerd001 commented on July 24, 2024

Is this not a clue about __construct() message or has this to do with nextcloud core itself.

{"status":"error","message":"OCA\\Mail\\Http\\AttachmentDownloadResponse::__construct(): Argument #1 ($content) must be of type string, null given, called in \/var\/lib\/nextcloud\/apps\/mail\/lib\/Controller\/MessagesController.php on line 549 in file '\/var\/lib\/nextcloud\/apps\/mail\/lib\/Http\/AttachmentDownloadResponse.php' line 45"

--
Now running nextcloud 29.0.3.4
Mail 3.7.4

from mail.

ChristophWurst avatar ChristophWurst commented on July 24, 2024

The handling happens in

public function getFullText(Horde_Imap_Client_Socket $client,
string $mailbox,
int $uid,
string $userId,
bool $decrypt = true): ?string {
$query = new Horde_Imap_Client_Fetch_Query();
if ($decrypt) {
$this->smimeService->addDecryptQueries($query);
} else {
$query->fullText([ 'peek' => true ]);
}
try {
$result = $client->fetch($mailbox, $query, [
'ids' => new Horde_Imap_Client_Ids($uid),
]);
} catch (Horde_Imap_Client_Exception $e) {
throw new ServiceException(
"Could not fetch message source: " . $e->getMessage(),
$e->getCode(),
$e
);
}
if (($message = $result->first()) === null) {
return null;
}
if ($decrypt) {
return $this->smimeService->decryptDataFetch($message, $userId)->getDecryptedMessage();
}
return $message->getFullMsg();
.
if (($message = $result->first()) === null) {
return null;
}
seems to be the only path that returns null. This can only happen if Horde does not find the message by UID, or there is more than one.

from mail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.