Nextcloud version: 20.0.2.2
Operating system and version: Ubuntu 20.04
Apache or nginx version : nginx/1.14.0 (Ubuntu)
PHP version: PHP 7.4.13
The issue you are facing: Mail messages don’t load in the interface. The /apps/mail/api/messages?mailboxId=7&limit=20 XHR returns 500 error code but I can’t find it anywhere in the FPM or Nginx error.log
Is this the first time you’ve seen this error? Yes
Steps to replicate it:
- Clean Install
- Add email account manual TLS IMAP port 143 and STARTTLS SMTP on 587 (getting 500 error code as well but the mail account is added).
- Go to apps/mail. Folders are present but can’t see messages list
The output of your Nextcloud log in Admin > Logging:
nextcloud log
TypeError: Argument 1 passed to InterfaSys\LogNormalizer\Normalizer::normalizeException() must be an instance of Exception, instance of TypeError given, called in /var/www/clients/client2/web2/cloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php on line 294
0. /var/www/clients/client2/web2/cloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php - line 294:InterfaSys\LogNormalizer\Normalizer->normalizeException()
1. /var/www/clients/client2/web2/cloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php - line 256:InterfaSys\LogNormalizer\Normalizer->normalizeException()
2. <<closure>>InterfaSys\LogNormalizer\Normalizer->normalizeObject()
3. /var/www/clients/client2/web2/cloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php - line 100:call_user_func_array()
4. /var/www/clients/client2/web2/cloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php - line 68:InterfaSys\LogNormalizer\Normalizer->normalize()
5. <<closure>>InterfaSys\LogNormalizer\Normalizer->format()
6. /var/www/clients/client2/web2/cloud/lib/private/Log.php - line 324:array_walk()
7. /var/www/clients/client2/web2/cloud/lib/private/Log/PsrLoggerAdapter.php - line 136:OC\Log->logException()
8. /var/www/clients/client2/web2/cloud/lib/private/AppFramework/ScopedPsrLogger.php - line 89:OC\Log\PsrLoggerAdapter->error()
9. /var/www/clients/client2/web2/cloud/apps/mail/lib/Http/Middleware/ErrorMiddleware.php - line 101:OC\AppFramework\ScopedPsrLogger->error()
10. /var/www/clients/client2/web2/cloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php - line 122:OCA\Mail\Http\Middleware\ErrorMiddleware->afterException()
11. /var/www/clients/client2/web2/cloud/lib/private/AppFramework/Http/Dispatcher.php - line 112:OC\AppFramework\Middleware\MiddlewareDispatcher->afterException()
12. /var/www/clients/client2/web2/cloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()
13. /var/www/clients/client2/web2/cloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()
14. /var/www/clients/client2/web2/cloud/lib/base.php - line 1008:OC\Route\Router->match()
15. /var/www/clients/client2/web2/cloud/index.php - line 37:OC::handleRequest()
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
config
$CONFIG = array (
'instanceid' => 'xxxxxxxxxxxx',
'passwordsalt' => 'xxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'xxxxxxxxxxxx'
),
'datadirectory' => 'xxxxxxxxxxxx/data',
'dbtype' => 'mysql',
'version' => '20.0.2.2',
'overwrite.cli.url' => 'https://xxxxxxxxxxxx',
'dbname' => 'xxxxxxxxxxxx',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'xxxxxxxxxxxx',
'dbpassword' => 'xxxxxxxxxxxx',
'installed' => true,
'debug' => true,
'loglevel' => 1
);
The output of your Apache/nginx/system log in /var/log/____
:
No error logs from nginx or upstream.
Just the one line in access log with 500 response code
"GET /apps/mail/api/messages?mailboxId=7&limit=20 HTTP/2.0" 500 1852 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36"
Horde IMAP log doesn’t catch anything for that 500 error code but here are some outputs of other actions.
Horde IMAP log - Folder list
>> Connection to: imap://localhost/
>> Server connection took 0.0002 seconds.
S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready.
C: 1 STARTTLS
S: 1 OK Begin TLS negotiation now.
>> Command 1 took 0.0001 seconds.
>> Successfully completed TLS negotiation.
C: 2 CAPABILITY
S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN
S: 2 OK Pre-login capabilities listed, post-login capabilities have more.
>> Command 2 took 0.0003 seconds.
C: 3 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: xxxxxxxxx)]
S: 3 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE QUOTA] Logged in
>> Command 3 took 0.0098 seconds.
C: 4 NAMESPACE
S: * NAMESPACE (("" ".")) NIL NIL
S: 4 OK Namespace completed (0.001 + 0.000 secs).
>> Command 4 took 0.0037 seconds.
C: 5 LIST () "" (*) RETURN (SUBSCRIBED)
S: * LIST (\Subscribed) "." Junk
S: * LIST (\Subscribed) "." Archives
S: * LIST (\Subscribed) "." Trash
S: * LIST (\Subscribed) "." Sent
S: * LIST (\Subscribed) "." Drafts
S: * LIST () "." INBOX
S: 5 OK List completed (0.001 + 0.000 secs).
>> Command 5 took 0.0009 seconds.
C: 6 LIST () "" (Junk Archives Trash Sent Drafts INBOX) RETURN (STATUS (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN))
S: * LIST () "." Junk
S: * STATUS Junk (MESSAGES 77 RECENT 7 UIDNEXT 1124 UIDVALIDITY 1581522430 UNSEEN 77)
S: * LIST () "." Archives
S: * STATUS Archives (MESSAGES 0 RECENT 0 UIDNEXT 1 UIDVALIDITY 1581522433 UNSEEN 0)
S: * LIST () "." Trash
S: * STATUS Trash (MESSAGES 3 RECENT 0 UIDNEXT 2645 UIDVALIDITY 1581522429 UNSEEN 0)
S: * LIST () "." Sent
S: * STATUS Sent (MESSAGES 25 RECENT 0 UIDNEXT 26 UIDVALIDITY 1581522427 UNSEEN 0)
S: * LIST () "." Drafts
S: * STATUS Drafts (MESSAGES 1 RECENT 0 UIDNEXT 7 UIDVALIDITY 1606510806 UNSEEN 0)
S: * LIST () "." INBOX
S: * STATUS INBOX (MESSAGES 1161 RECENT 0 UIDNEXT 3629 UIDVALIDITY 1581522426 UNSEEN 1)
S: 6 OK List completed (0.002 + 0.000 + 0.001 secs).
>> Command 6 took 0.0047 seconds.
C: 7 LOGOUT
S: * BYE Logging out
S: 7 OK Logout completed (0.001 + 0.000 secs).
>> Command 7 took 0.0007 seconds.
Horde IMAP log - STATUS command
>> Connection to: imap://localhost/
>> Server connection took 0.0002 seconds.
S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready.
C: 1 STARTTLS
S: 1 OK Begin TLS negotiation now.
>> Command 1 took 0.0002 seconds.
>> Successfully completed TLS negotiation.
C: 2 CAPABILITY
S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN
S: 2 OK Pre-login capabilities listed, post-login capabilities have more.
>> Command 2 took 0.0005 seconds.
C: 3 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: xxxxxxxxx)]
S: 3 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE QUOTA] Logged in
>> Command 3 took 0.0107 seconds.
C: 4 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * STATUS INBOX (MESSAGES 1162 RECENT 0 UIDNEXT 3630 UIDVALIDITY 1581522426 UNSEEN 2)
S: 4 OK Status completed (0.001 + 0.000 secs).
>> Command 4 took 0.0009 seconds.
C: 5 LOGOUT
S: * BYE Logging out
S: 5 OK Logout completed (0.001 + 0.000 secs).
>> Command 5 took 0.0003 seconds.
Browser console log has only 1 error repeating in Apps -> Mail
Browser console log
GET https://xxxxxxxxxx/apps/mail/api/messages?mailboxId=7&limit=20 500
[ERROR] mail: Could not fetch envelopes
Error: Request failed with status code 500
at e.exports (https://xxxxxxxxxx/apps/mail/js/mail.js:76:84208)
at e.exports (https://xxxxxxxxxx/apps/mail/js/mail.js:326:5161)
at XMLHttpRequest.f.onreadystatechange (https://xxxxxxxxxx/apps/mail/js/mail.js:76:83073)
Mail sending works
Horde SMTP log
>> Connection to: smtp://localhost:587
S: 220 xxxxxxxxxxxx ESMTP Postfix (Ubuntu)
C: EHLO xxxxxxxxxxxx
S: 250-xxxxxxxxxxxx
S: 250-PIPELINING
S: 250-SIZE
S: 250-VRFY
S: 250-ETRN
S: 250-STARTTLS
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
S: 250-DSN
S: 250 SMTPUTF8
C: STARTTLS
S: 220 2.0.0 Ready to start TLS
>> Successfully completed TLS negotiation.
C: EHLO xxxxxxxxxxxx
S: 250-xxxxxxxxxxxx
S: 250-PIPELINING
S: 250-SIZE
S: 250-VRFY
S: 250-ETRN
S: 250-AUTH PLAIN LOGIN
S: 250-AUTH=PLAIN LOGIN
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
S: 250-DSN
S: 250 SMTPUTF8
[AUTH Command - method: PLAIN; username: xxxxxxxxxxxx]
S: 235 2.7.0 Authentication successful
C: MAIL FROM:<xxxxxxxxxxxx> SIZE=711 BODY=7BIT
C: RCPT TO:<xxxxxxxxxxxx>
S: 250 2.1.0 Ok
S: 250 2.1.5 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: Alexandru Podaru <xxxxxxxxxxxx>
To: xxxxxxxxxxxx
Cc:
Subject: Test
Message-ID: <20201129221139.Horde.Lvc9DLj2K1r9ccKdzbfwv_F@xxxxxxxxxxxx>
User-Agent: Horde Application Framework 5
Date: Sun, 29 Nov 2020 22:11:39 +0000
Content-Type: multipart/alternative; boundary="=_DGKZPq9UHERtsfvrtBPncWv"
MIME-Version: 1.0
This message is in MIME format.
--=_DGKZPq9UHERtsfvrtBPncWv
Content-Type: text/plain; charset=utf-8
Content-Description: Plaintext Version of Message
test nextcloud
--=_DGKZPq9UHERtsfvrtBPncWv
Content-Type: text/html; charset=utf-8
Content-Description: HTML Version of Message
<p style="margin:0;">test nextcloud</p>
--=_DGKZPq9UHERtsfvrtBPncWv--
C: .
S: 250 2.0.0 Ok: queued as 9EDCC60E3B
C: QUIT
S: 221 2.0.0 Bye