nextcloud / mail

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

Type Error on Sync with IMAP Server #7056

Open GVLLIFESTYLE opened 2 years ago

GVLLIFESTYLE commented 2 years ago

Steps to reproduce

  1. Setup a Imap Server
  2. Connect
  3. Send Alot of E-mails
  4. Let it sync

Expected behavior

Successful Sync

Actual behavior

[mail] Fehler: OCA\Mail\Exception\ServiceException: Sync failed for 36:Trash: OCA\Mail\Db\MessageMapper::deleteByUid(): Argument #2 must be of type int, string given, called in /var/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php on line 453 at <<closure>>

0. /var/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php line 127
   OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync()
1. /var/www/nextcloud/apps/mail/lib/Controller/MailboxesController.php line 161
   OCA\Mail\Service\Sync\SyncService->syncMailbox()
2. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
   OCA\Mail\Controller\MailboxesController->sync()
3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
   OC\AppFramework\Http\Dispatcher->executeController()
4. /var/www/nextcloud/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch()
5. /var/www/nextcloud/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main()
6. /var/www/nextcloud/lib/base.php line 1023
   OC\Route\Router->match() 
7. /var/www/nextcloud/index.php line 36
   OC::handleRequest()

POST /nextcloud/index.php/apps/mail/api/mailboxes/161/sync
from IP by user at 2022-08-18T14:18:25+00:00

Mail app version

1.13.8

Mailserver or service

Linux Mailserver

Operating system

Ubuntu x64 LTS

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database

MariaDB

Additional info

Nextcloud Server: 24.0.4

davidpr78 commented 2 years ago

Same problem here with imap: the 'send' draft' and 'junk' folder from the Mailserver is missing.

GVLLIFESTYLE commented 2 years ago

Well me server has the junk, draft and send folders avialable and they where also full beforehand.

timreeves commented 1 year ago

I'm seeing exactly this error too - please fix, I keep getting nasty emails because the error log is too long:

[mail] Fehler: OCA\Mail\Exception\ServiceException: Sync failed for 24:INBOX: OCA\Mail\Db\MessageMapper::deleteByUid(): Argument #2 must be of type int, string given, called in /var/www/vhosts/sat-chit-ananda.org/owncloud.sat-chit-ananda.org/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php on line 453 at <>

  1. /var/www/vhosts/sat-chit-ananda.org/owncloud.sat-chit-ananda.org/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php line 137 OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync()
  2. /var/www/vhosts/sat-chit-ananda.org/owncloud.sat-chit-ananda.org/apps/mail/lib/BackgroundJob/SyncJob.php line 122 OCA\Mail\Service\Sync\ImapToDbSynchronizer->syncAccount()
  3. /var/www/vhosts/sat-chit-ananda.org/owncloud.sat-chit-ananda.org/lib/public/BackgroundJob/Job.php line 79 OCA\Mail\BackgroundJob\SyncJob->run()
  4. /var/www/vhosts/sat-chit-ananda.org/owncloud.sat-chit-ananda.org/lib/public/BackgroundJob/TimedJob.php line 95 OCP\BackgroundJob\Job->execute()
  5. /var/www/vhosts/sat-chit-ananda.org/owncloud.sat-chit-ananda.org/cron.php line 151 OCP\BackgroundJob\TimedJob->execute()

at 2022-09-27T08:00:16+00:00