Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ImapToDbSynchronizer mb_convert_encoding #6907

Closed
6 of 9 tasks
roukmoute opened this issue Jul 20, 2022 · 1 comment
Closed
6 of 9 tasks

[Bug]: ImapToDbSynchronizer mb_convert_encoding #6907

roukmoute opened this issue Jul 20, 2022 · 1 comment
Labels

Comments

@roukmoute
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

I've added an account mail and I've searched why it does not show me the main inbox.

I tried this:

> occ mail:account:sync 3

In ImapToDbSynchronizer.php line 255:
                                                                                                                   
  Sync failed for 3:INBOX: mb_convert_encoding(): Argument nextcloud/server#3 ($from_encoding) contains invalid encoding "windows  
  -1256"                                                                                                           
                                                                                                                   

In String.php line 160:
                                                                                                
  mb_convert_encoding(): Argument nextcloud/server#3 ($from_encoding) contains invalid encoding "windows-1256"  
                                                                                                

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

Steps to reproduce

None

Expected behavior

occ mail:account:sync 3
XXMB of memory used

Installation method

Other

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Nginx

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

Enabled:
  - bruteforcesettings: 2.4.0
  - calendar: 3.4.2
  - cloud_federation_api: 1.7.0
  - dav: 1.22.0
  - federatedfilesharing: 1.14.0
  - files: 1.19.0
  - lookup_server_connector: 1.12.0
  - mail: 1.13.6
  - oauth2: 1.12.0
  - provisioning_api: 1.14.0
  - settings: 1.6.0
  - twofactor_backupcodes: 1.13.0
  - viewer: 1.8.0
  - workflowengine: 2.6.0
Disabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - admin_audit
  - circles: 24.0.0
  - comments: 1.14.0
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - encryption
  - federation: 1.14.0
  - files_external
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - logreader: 2.9.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - sharebymail: 1.14.0
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - updatenotification: 1.14.0
  - user_ldap
  - user_status: 1.4.0
  - weather_status: 1.4.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"W5cHWV0y3mHJeHaWyVwo","level":3,"time":"2022-07-20T22:31:06+00:00","remoteAddr":"82.65.158.75","user":"roukmoute","app":"mail","method":"POST","url":"/apps/mail/api/mailboxes/134/sync","message":"Sync failed for 3:INBOX: mb_convert_encoding(): Argument nextcloud/server#3 ($from_encoding) contains invalid encoding \"windows-1256\"","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0","version":"24.0.3.2","exception":{"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"Sync failed for 3:INBOX: mb_convert_encoding(): Argument nextcloud/server#3 ($from_encoding) contains invalid encoding \"windows-1256\"","Code":0,"Trace":[{"file":"/config/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php","line":127,"function":"sync","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->"},{"file":"/config/www/nextcloud/apps/mail/lib/Controller/MailboxesController.php","line":161,"function":"syncMailbox","class":"OCA\\Mail\\Service\\Sync\\SyncService","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"sync","class":"OCA\\Mail\\Controller\\MailboxesController","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/config/www/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/config/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/config/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","Line":255,"Previous":{"Exception":"ValueError","Message":"mb_convert_encoding(): Argument nextcloud/server#3 ($from_encoding) contains invalid encoding \"windows-1256\"","Code":0,"Trace":[{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-util/lib/Horde/String.php","line":160,"function":"mb_convert_encoding"},{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-util/lib/Horde/String.php","line":96,"function":"_convertCharset","class":"Horde_String","type":"::"},{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime.php","line":259,"function":"convertCharset","class":"Horde_String","type":"::"},{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Headers/Element/Multiple.php","line":53,"function":"decode","class":"Horde_Mime","type":"::"},{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Headers/Element.php","line":79,"function":"_setValue","class":"Horde_Mime_Headers_Element_Multiple","type":"->"},{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Headers/Element.php","line":56,"function":"setValue","class":"Horde_Mime_Headers_Element","type":"->"},{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Headers.php","line":201,"function":"__construct","class":"Horde_Mime_Headers_Element","type":"->"},{"file":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Headers.php","line":371,"function":"addHeader","class":"Horde_Mime_Headers","type":"->"},{"file":"/config/www/nextcloud/apps/mail/lib/Model/IMAPMessage.php","line":186,"function":"parseHeaders","class":"Horde_Mime_Headers","type":"::"},{"file":"/config/www/nextcloud/apps/mail/lib/Model/IMAPMessage.php","line":723,"function":"getRawReferences","class":"OCA\\Mail\\Model\\IMAPMessage","type":"->"},{"file":"/config/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","line":315,"function":"toDbMessage","class":"OCA\\Mail\\Model\\IMAPMessage","type":"->"},{"function":"OCA\\Mail\\Service\\Sync\\{closure}","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/config/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","line":316,"function":"array_map"},{"file":"/config/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","line":231,"function":"runInitialSync","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->"},{"file":"/config/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php","line":127,"function":"sync","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->"},{"file":"/config/www/nextcloud/apps/mail/lib/Controller/MailboxesController.php","line":161,"function":"syncMailbox","class":"OCA\\Mail\\Service\\Sync\\SyncService","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"sync","class":"OCA\\Mail\\Controller\\MailboxesController","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/config/www/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/config/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/config/www/nextcloud/apps/mail/vendor/bytestream/horde-util/lib/Horde/String.php","Line":160},"message":"Sync failed for 3:INBOX: mb_convert_encoding(): Argument nextcloud/server#3 ($from_encoding) contains invalid encoding \"windows-1256\"","exception":{},"CustomMessage":"Sync failed for 3:INBOX: mb_convert_encoding(): Argument nextcloud/server#3 ($from_encoding) contains invalid encoding \"windows-1256\""}}

Additional info

No response

@szaimen szaimen transferred this issue from nextcloud/server Jul 20, 2022
@miaulalala
Copy link
Contributor

miaulalala commented Jul 21, 2022

Duplicate of #5845, #1037

@miaulalala miaulalala marked this as a duplicate of #5845 Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants