Espo.ERROR EmailAccount (Select Folder) cannot change folder, maybe it does not exist

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manosingh
    Member
    • Apr 2019
    • 62

    Espo.ERROR EmailAccount (Select Folder) cannot change folder, maybe it does not exist

    Often i get the above error , not sure why this happens only in my server , in localhost everything workds fine ,

    I have cleared cache and did rebuild still i get the above issue in my log file.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hi.
    Do you have some Personal or Group Email Account? Maybe you have set a folder for fetching emails into EspoCRM that might not exist.

    Comment

    • nurfz
      Junior Member
      • Feb 2017
      • 12

      #3
      May I hook in here? I got the same error for *all* group and personal e-mail accounts.

      1136 [2020-06-07 08:30:02] Espo.ERROR: EmailAccount 5b7c7110669673cd8 (Select Folder) [0] cannot change folder, maybe it does not exist [] []

      Since begin of February 2020, the mail fetching does not work anymore.

      I have multiple different e-mail providers, so the reason is probably *not* a change in the provider's folder structure.

      I tried:
      1. mysqlcheck -r DATABASE -> storage engine doesn't support repair (InnoDB)
      2. I set up a new mail account for a different mail provider (Gmail)
      3. Checked the folders to fetch in mail account settings (see screenshot) -> for *all* mail accounts, the "folder options" are only "false"
      Click image for larger version

Name:	screenshot-2020-06-07-10-57-31.png
Views:	639
Size:	70.7 KB
ID:	59188

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Hi there.
        Please change the log level to 'DEBUG' as it explained here https://docs.espocrm.com/administrat...e-for-a-logger. After, reproduce the error and check a log file in the /data/logs directory. Hope you will get more info about this error.
        Also, check whether all parameters are ok (imap server, username, password, port, protocol, etc.). Sometimes the email host may change the parameters for the connection.
        Check on the IMAP side whether there are no some limitation settings that may restrict you a scope of the monitored folders.

        Comment

        • nurfz
          Junior Member
          • Feb 2017
          • 12

          #5
          Thank you for the answer and sorry for the late reply (I expected to get notified by mail...).

          Originally posted by Maximus
          Please change the log level to 'DEBUG' as it explained here https://docs.espocrm.com/administrat...e-for-a-logger. After, reproduce the error and check a log file in the /data/logs directory. Hope you will get more info about this error.
          OK, now I get a NOTICE before every ERROR:
          Code:
          [2020-06-10 17:15:03] Espo.NOTICE: E_NOTICE: iconv(): Wrong charset, conversion from `UTF-8' to `UTF7-IMAP//IGNORE' is not allowed {"code":8,"message":"iconv(): Wrong charset, conversion from `UTF-8' to `UTF7-IMAP//IGNORE' is not allowed","file":"/var/www/espo/vendor/symfony/polyfill-mbstring/Mbstring.php","line":115,"context":{"s":"INBOX.Sent","toEncoding":"UTF7-IMAP","fromEncoding":"UTF-8"}} []
          [2020-06-10 17:15:03] Espo.ERROR: EmailAccount 5b8e4b61bb3b69c04 (Select Folder) [0] cannot change folder, maybe it does not exist [] []
          I have the latest version of EspoCRM (5.9.2) and just upgraded the CentOS server (PHP 7.3.19). Someone said , an upgrade of the php extension mbstring might help. I reinstalled that one, no success. I also restarted php-fpm service (which sits behind nginx). No success.

          Any ideas? Or should I try to use a newer version of PHP?

          Originally posted by Maximus
          Also, check whether all parameters are ok (imap server, username, password, port, protocol, etc.). Sometimes the email host may change the parameters for the connection.
          Check on the IMAP side whether there are no some limitation settings that may restrict you a scope of the monitored folders.
          I double checked the settings, they are correct. The "Test connection" button shows "success". The currently set folder names match the real IMAP folders.

          Comment

          • nurfz
            Junior Member
            • Feb 2017
            • 12

            #6
            I just noticed that I now also have problems with sending mails:
            Code:
            [2020-06-10 17:20:17] Espo.ERROR: Uncaught Exception Error: "Call to undefined function Espo\Entities\mb_ereg_replace()" at /var/www/espo/application/Espo/Entities/Email.php line 173 {"exception":"[object] (Error (code: 0): Call to undefined function Espo\\Entities\\mb_ereg_replace() at /var/www/espo/application/Espo/Entities/Email.php:173)"} []
            This error message also points to mbstring (mb_ereg_replace()).
            Last edited by nurfz; 06-10-2020, 06:02 PM.

            Comment

            • Maximus
              Senior Member
              • Nov 2018
              • 2731

              #7
              > I just noticed that I now also have problems with sending mails:

              This issue applies to the PHP 'mbstring' module. Probably when you did its reinstall something went wrong. Please open Administration -> System Requirements and check whether all parameters are 'Success'.

              In the terminal run command `php -v` to get a list of the installed PHP modules and check whether all needed modules exist https://docs.espocrm.com/administrat...p-requirements.

              Is it your own IMAP server or something like Gmail, Outlook, etc.? Check the settings on the IMAP server side.

              Comment

              • nurfz
                Junior Member
                • Feb 2017
                • 12

                #8
                Thank you Maximus! It's all working again. The e-mail settings were all correct but my PHP setup on CentOS 7 was totally broken.

                Apparently, some updates a while ago broke the e-mail fetching. And by trying to fix php modules by reinstalling them, I broke even more.

                Steps that fixed it for me:

                1. removed every php-related package on CentOS
                2. did a clean reinstall of PHP 7.4 (https://www.linuxtechi.com/install-p...rhel-7-server/)
                3. followed the installation instruction (the link you posted)
                4. checked under Administration -> System Requirements

                Comment

                • Maximus
                  Senior Member
                  • Nov 2018
                  • 2731

                  #9
                  So the SMTP and IMAP are working again?

                  Comment

                  • nurfz
                    Junior Member
                    • Feb 2017
                    • 12

                    #10
                    Originally posted by Maximus
                    So the SMTP and IMAP are working again?
                    Yes, both is working again.

                    Comment

                    Working...