php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown

Open alexv96 opened this issue 3 years ago • 1 comments

Describe the bug I have been using this library for 2020 and since this week I have had the following error, it connects to the account but does not read the emails and always generates this error.

ErrorException: fwrite(): SSL operation failed with code 1. OpenSSL Error messages:
error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown in /srv/[projectname]/laravel/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php:308

Used config Please provide the used config, if you are not using the package default config.

Code to Reproduce The troubling code section which produces the reported bug.

ErrorException: fwrite(): SSL operation failed with code 1. OpenSSL Error messages:
error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown in /srv/fidelizaleads2/laravel/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php:308
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /srv/fidelizaleads2/laravel/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php(308): fwrite()
#2 /srv/fidelizaleads2/laravel/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php(557): Webklex\PHPIMAP\Connection\Protocols\ImapProtocol->sendRequest()
#3 /srv/fidelizaleads2/laravel/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php(678): Webklex\PHPIMAP\Connection\Protocols\ImapProtocol->fetch()
#4 /srv/fidelizaleads2/laravel/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php(1046): Webklex\PHPIMAP\Connection\Protocols\ImapProtocol->getUid()
#5 /srv/fidelizaleads2/laravel/vendor/webklex/php-imap/src/Folder.php(258): Webklex\PHPIMAP\Connection\Protocols\ImapProtocol->overview()
#6 /srv/fidelizaleads2/laravel/app/Console/Commands/MailParse.php(175): Webklex\PHPIMAP\Folder->overview()
#7 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\MailParse->handle()
#8 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#9 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#10 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#11 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\Container\BoundMethod::call()
#12 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\Container\Container->call()
#13 /srv/fidelizaleads2/laravel/vendor/symfony/console/Command/Command.php(298): Illuminate\Console\Command->execute()
#14 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#15 /srv/fidelizaleads2/laravel/vendor/symfony/console/Application.php(1005): Illuminate\Console\Command->run()
#16 /srv/fidelizaleads2/laravel/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#17 /srv/fidelizaleads2/laravel/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#18 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run()
#19 /srv/fidelizaleads2/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run()
#20 /srv/fidelizaleads2/laravel/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#21 {main}

Expected behavior It followed the normal process without throwing the error message, which is what happens in other cases. Since in local it works perfect and in the server it generates these errors.

Screenshots image

Desktop / Server (please complete the following information):

  • OS: Debian 10
  • PHP: 7.4
  • Version 2.4.0
  • Provider Gmail and Outlook

Additional context

alexv96 avatar Jul 10 '22 00:07 alexv96

Hi @alexv96 , many thanks for the detailed report. A similar issue has been reported as #141 . Given the error message and location itself, I don't think it's a software / lib issue.

Webklex avatar Jul 12 '22 13:07 Webklex