Mail: Mail body displays Nextcloud banner instead of body content

Created on 13 Nov 2020  ·  21Comments  ·  Source: nextcloud/mail

Expected behavior

  • When I click an email under one of my accounts, I expect it to show the email, with all the body's contents.

Actual behavior

  • When I click an email under one of my accounts, Mail app only shows a Nextcloud banner with most (but not all) emails. See attached screenshots.

Mail app

Mail app version: (see apps admin page, e.g. 0.5.3)
1.7.0

Mailserver or service: (e.g. Outlook, Yahoo, Gmail, Exchange,...)
Generic IMAP provider

Server configuration

Operating system: (e.g. Debian 8)
Ubuntu 18.04

Web server: (e.g. Apache, Nginx,...)

Database: (e.g. MariaDB, SQLite or PostgreSQL)
PostgreSQL

PHP version: (e.g. 7.0)
7.2.24-0ubuntu0.18.04.7

Nextcloud Version: (see admin page, e.g. 13.0.2)
20.0.1

Client configuration

Browser: (e.g. Firefox 48)
Chrome 86.0.4240.193

Operating system: (e.g. Arch Linux)
Ubuntu 20.10

Screenshot from 2020-11-12 23-50-32
Screenshot from 2020-11-12 23-59-17

0. to triage bug needs info

Most helpful comment

Found it. It's a syntax error because the v1.7.0 release requires php7.3 and we use a trailing comma in the HTMLResponse class.

All 21 comments

open the browser console and switch to the network tab. then check requests that end with /html. Those are the requests for the iframe. I suspect an error there. What HTTP status code does it return? Does the response HTML say anything about an error? Anything logged to nextcloud.log?

I'm getting the same error since the latest update (1.7.0). The response seems the typical "Internal server error" one. The logs are silent on this.
I'm running Nextcloud on Debian 10 with Nginx 1.18 and Postgres.

image
image

Enable debug mode and lower the log level.

I'm sorry but I can't look at debug logs since they spam "/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead." endlessly (known and accepted issue, nextcloud/server#23046)

Use grep -v to filter those out

I do have the same issue since upgrading to 1.7.0 from 1.6.0. May I help somehow?

Provide the requested logs

Looking at .../nextcloud/settings/admin/logging, I see these:

Argument 1 passed to InterfaSys\LogNormalizer\Normalizer::normalizeException() must be an instance of Exception, instance of ParseError given, called in /var/www/nextcloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php on line 294 |   | 2020-11-15T16:22:23+0100
-- | -- | --
Error | index | TypeError: Argument 1 passed to InterfaSys\LogNormalizer\Normalizer::normalizeException() must be an instance of Exception, instance of ParseError given, called in /var/www/nextcloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php on line 294 |   | 2020-11-15T16:22:21+0100
Error | index | TypeError: Argument 1 passed to InterfaSys\LogNormalizer\Normalizer::normalizeException() must be an instance of Exception, instance of ParseError given, called in /var/www/nextcloud/3rdparty/interfasys/lognormalizer/src/Normalizer.php on line 294 |   | 2020-11-15T16:22:14+0100
Error | mail | InvalidArgumentException: Dataset must contain samples with exactly 4 dimensions, 3 given./var/www/nextcloud/apps-local/mail/vendor/rubix/ml/src/Classifiers/GaussianNB.php - line 298:Rubix\ML\Specifications\DatasetHasDimensionality->check()/var/www/nextcloud/apps-local/mail/lib/Service/Classification/ImportanceClassifier.php - line 327:Rubix\ML\Classifiers\GaussianNB->predict(Rubix\ML\Datasets\Unlabeled {})/var/www/nextcloud/apps-local/mail/lib/Listener/NewMessageClassificationListener.php - line 74:OCA\Mail\Service\Classification\ImportanceClassifier->classifyImportance(OCA\Mail\Account {}, OCA\Mail\Db\Mailbox { id: 147}, [ OCA\Mail\D ... }])/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php - line 76:OCA\Mail\Listener\NewMessageClassificationListener->handle(OCA\Mail\Eve ... {})/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 251:OC\EventDispatcher\ServiceEventListener->__invoke(OCA\Mail\Eve ... {}, "OCA\\Mail\\ ... d", Symfony\Comp ... {})/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 73:Symfony\Component\EventDispatcher\EventDispatcher->callListeners([ Closure {}], "OCA\\Mail\\ ... d", OCA\Mail\Eve ... {})/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php - line 86:Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCA\Mail\Eve ... {}, "OCA\\Mail\\ ... d")/var/www/nextcloud/apps-local/mail/lib/Service/Sync/ImapToDbSynchronizer.php - line 348:OC\EventDispatcher\EventDispatcher->dispatch("OCA\\Mail\\ ... d", OCA\Mail\Eve ... {})/var/www/nextcloud/apps-local/mail/lib/Service/Sync/ImapToDbSynchronizer.php - line 218:OCA\Mail\Service\Sync\ImapToDbSynchronizer->runPartialSync(OCA\Mail\Account {}, OCA\Mail\Db\Mailbox { id: 147}, OC\AppFramew ... {}, 42, [ 100862,100 ... 5])/var/www/nextcloud/apps-local/mail/lib/Service/Sync/SyncService.php - line 121:OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync(OCA\Mail\Account {}, OCA\Mail\Db\Mailbox { id: 147}, OC\AppFramew ... {}, 42, [ 100862,100 ... 5], false)/var/www/nextcloud/apps-local/mail/lib/Controller/MailboxesController.php - line 168:OCA\Mail\Service\Sync\SyncService->syncMailbox(OCA\Mail\Account {}, OCA\Mail\Db\Mailbox { id: 147}, 42, [ 255430,255 ... 6], true, null)/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Mail\Controller\MailboxesController->sync(147, [ 255430,255 ... 6], false, null)/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con ... {}, "sync")/var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "sync")/var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Mail\\ ... r", "sync", OC\AppFramew ... {}, { action: nu ... "})/var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match("/apps/mail/ ... c")/var/www/nextcloud/index.php - line 37:OC::handleRequest() |   | 2020-11-15T16:22:11+0100

I'm gonna enable debug mode and lower the log level next...

I activated debug mode and set loglevel => 0. Unfortunately, the message lists don't show up now. The "loading" indicator (spinning circle) shows up all of the time so I cannot select any message to display...

I'll create a separate issue for this.

Log with loglevel=0 and debug=true:
mail-issue.log

Argument 1 passed to InterfaSys\LogNormalizer\Normalizer::normalizeException() must be an instance of Exception, instance of ParseError given

Could you please run the Sync from the CLI and see how far it gets? https://github.com/nextcloud/mail/blob/master/doc/admin.md#troubleshooting will guide you.

root@nextcloud18:/var/www/nextcloud# sudo -u www-data php -f occ mail:account:export uli
Account 19:
- E-Mail: uli.heller@xxx
- Name: Uli Heller
- IMAP user: uli
- IMAP host: mail.xxx:143, security: tls
- SMTP user: uli
- SMTP host: mail.xxx:587, security: tls
root@nextcloud18:/var/www/nextcloud# sudo -u www-data php -f occ mail:account:sync uli

In QBMapper.php line 270:

  Did expect one result but found none when executing: query "SELECT * FROM `  
  *PREFIX*mail_accounts` WHERE `id` = :dcValue1";                              


mail:account:sync [-f|--force] [--] <account-id>

Try occ mail:account:sync 19

root@nextcloud18:/var/www/nextcloud# sudo -u www-data php -f occ mail:account:sync 19
[debug] account is up to date, skipping mailbox sync
[debug] Skipping mailbox sync for Archives
[debug] Skipping mailbox sync for Aufgaben
[debug] Skipping mailbox sync for Drafts
[debug] Skipping mailbox sync for Entwürfe
[debug] Skipping mailbox sync for Gesendet
[debug] partial sync 19:INBOX - get all known UIDs took 0s
[debug] partial sync 19:INBOX - get new messages via Horde took 0s
[debug] partial sync 19:INBOX - persist new messages took 0s
[debug] partial sync 19:INBOX - get changed messages via Horde took 2s
[debug] partial sync 19:INBOX - persist changed messages took 2s
[debug] partial sync 19:INBOX - get vanished messages via Horde took 0s
[debug] partial sync 19:INBOX - persist new messages took 0s
[debug] partial sync 19:INBOX took 4s
[debug] Skipping mailbox sync for Jobs
[debug] Skipping mailbox sync for Junk
[debug] Skipping mailbox sync for Mitarbeiter
...
[debug] Skipping mailbox sync for Sent
[debug] Skipping mailbox sync for Spam
[debug] Skipping mailbox sync for Templates
[debug] Skipping mailbox sync for Trash
[debug] Skipping mailbox sync for Uninteressant
[debug] Skipping mailbox sync for WebappBetrieb
[debug] Skipping mailbox sync for mail
[debug] Skipping mailbox sync for mail/Drafts
[debug] Skipping mailbox sync for rc-shared
[debug] Skipping mailbox sync for rc-shared/pag-rfs
[debug] Skipping mailbox sync for rc-shared/pag-rfs/Drafts
[debug] Skipping mailbox sync for rc-shared/pag-rfs/Sent
[debug] Skipping mailbox sync for rc-shared/pag-rfs/Spam
[debug] Skipping mailbox sync for rc-shared/pag-rfs/Trash
[debug] Skipping mailbox sync for shared
...
[debug] Skipping mailbox sync for shared/servicemanager
[debug] Skipping mailbox sync for shared/servicemanager/ToDo_Annette
[debug] Skipping mailbox sync for shared/servicemanager/ToDo_Jasmin
[debug] Skipping mailbox sync for shared/servicemanager/Zammad
[debug] Skipping mailbox sync for shared/servicemanager/erledigt
[debug] Account 19 has 107427 messages for threading
[debug] Threading 107427 messages - build ID table took 0s
[debug] Threading 107427 messages - build root container took 1s
[debug] Threading 107427 messages - free ID table took 0s
[debug] Threading 107427 messages - prune containers took 0s
[debug] Threading 107427 messages - group by subject took 2s
[debug] Threading 107427 messages took 3s
[debug] Account 19 has 101989 threads
[debug] Account 19 has 0 messages with a new thread IDs
234MB of memory used

I deleted some lines since they contain names. No error message showed up. Everything looks similar.

That sync was clean. Thanks for providing it.

Looking at .../nextcloud/settings/admin/logging, I see these:

Do you still get these? If so, please give us the URL. It should contain the mailbox ID via which we can find the faulty account.

Unfortunately, the nextcloud instance is quite busy at the moment and I cannot search within the window.
I'll try in the evening.

Within nextcloud.log, no errors show up with this command: grep '"app":"mail"' nextcloud.log

From .../admin/logging:

PHP Error: iconv(): Detected an illegal character in input string at /var/www/nextcloud/apps-local/mail/vendor/pear-pear.horde.org/Horde_Util/Horde/String.php#150      November 17, 2020 13:35:03
Debug   mail    partial sync 19:INBOX - persist new messages took 0s        November 17, 2020 13:35:03
Debug   mail    partial sync 19:INBOX - get new messages via Horde took 0s      November 17, 2020 13:35:03
Debug   mail    partial sync 19:INBOX - get all known UIDs took 0s      November 17, 2020 13:35:03
Debug   mail    Skipping mailbox sync for Gesendet      November 17, 2020 13:35:02
Debug   mail    Skipping mailbox sync for Entwürfe      November 17, 2020 13:35:02
Debug   mail    Skipping mailbox sync for Drafts        November 17, 2020 13:35:02
Debug   mail    Skipping mailbox sync for Aufgaben      November 17, 2020 13:35:02
Debug   mail    Skipping mailbox sync for Archives      November 17, 2020 13:35:02

Looks similar to nextcloud.log. Maybe the iconv message is bad?
The exception from above doesn't show up

Yes, see https://github.com/nextcloud/mail/issues/3999 and linked tickets.

Does it make sense to test again with the latest from master?

No because if your iconv is erroneous it will be with any version of Mail.

Found it. It's a syntax error because the v1.7.0 release requires php7.3 and we use a trailing comma in the HTMLResponse class.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cheesewizz picture cheesewizz  ·  5Comments

jancborchardt picture jancborchardt  ·  4Comments

stevleibelt picture stevleibelt  ·  3Comments

jancborchardt picture jancborchardt  ·  5Comments

sscherfke picture sscherfke  ·  5Comments