Error when Encrypt module is enabled

Created on 5 September 2024, 3 months ago
Updated 12 September 2024, 2 months ago

Problem/Motivation

Hi, this morning, when I tried running cron, I received the following errors. We're not using Encryption profiles in connection with our AWS module, but I think it's looking for one and not finding a profile to work with.

Is there a way to enhance the logic of when AWS sees Encrypt enabled that it doesn't automatically assume there will be a profile for it?

Thank you for any help in resolving this bug. I don't think cron can run unless I disable the Encrypt or AWS modules. Ideally, I'd like to use both.

[error]  TypeError: Drupal\encrypt\EncryptService::decrypt(): Argument #2 ($encryption_profile) must be of type Drupal\encrypt\EncryptionProfileInterface, null given, called in /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php on line 284 in Drupal\encrypt\EncryptService->decrypt() (line 87 of /var/www/html/WEBSITE.COM/web/modules/contrib/encrypt/src/EncryptService.php) #0 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php(284): Drupal\encrypt\EncryptService->decrypt()                                                                                                               
#1 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php(218): Drupal\aws\Entity\Profile->decryptSecret()                                  
#2 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php(301): Drupal\aws\Entity\Profile->getSecretAccessKey()                             
#3 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/AwsClientFactory.php(50): Drupal\aws\Entity\Profile->getClientArgs()                                 
#4 /var/www/html/WEBSITE.COM/web/modules/contrib/amazon_ses/src/AmazonSesHandler.php(73): Drupal\aws\AwsClientFactory->getClient()                            
#5 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Component/DependencyInjection/Container.php(261): Drupal\amazon_ses\AmazonSesHandler->__construct()          
#6 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Component/DependencyInjection/Container.php(179): Drupal\Component\DependencyInjection\Container->createService()                                                                                                                                                        
#7 /var/www/html/WEBSITE.COM/web/modules/contrib/amazon_ses/src/Plugin/QueueWorker/AmazonSesMailQueue.php(32): Drupal\Component\DependencyInjection\Container->get()                                                                                                                                                      
#8 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\amazon_ses\Plugin\QueueWorker\AmazonSesMailQueue::create()                                                                                                                                                          
#9 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance()    
#10 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Queue/QueueWorkerManager.php(63): Drupal\Component\Plugin\PluginManagerBase->createInstance()          
#11 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Cron.php(206): Drupal\Core\Queue\QueueWorkerManager->createInstance()                                  
#12 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Cron.php(162): Drupal\Core\Cron->processQueues()                                                       
#13 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()                                                       
#14 /var/www/html/WEBSITE.COM/vendor/drush/drush/src/Commands/core/DrupalCommands.php(64): Drupal\Core\ProxyClass\Cron->run()                                 
#15 [internal function]: Drush\Commands\core\DrupalCommands->cron()                                                                                         
#16 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()                                    
#17 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()                                                                                                                                                 
#18 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()                                                                                                                                                
#19 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process()                                                                                                                                                            
#20 /var/www/html/WEBSITE.COM/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()                     
#21 /var/www/html/WEBSITE.COM/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()                                  
#22 /var/www/html/WEBSITE.COM/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()                              
#23 /var/www/html/WEBSITE.COM/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()                                     
#24 /var/www/html/WEBSITE.COM/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()                                   
#25 /var/www/html/WEBSITE.COM/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()                                                  
#26 /var/www/html/WEBSITE.COM/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()                                                                 
#27 /var/www/html/WEBSITE.COM/vendor/drush/drush/drush(4): require('...')                                                                                     
#28 {main}.  


TypeError: Drupal\encrypt\EncryptService::decrypt(): Argument #2 ($encryption_profile) must be of type Drupal\encrypt\EncryptionProfileInterface, null given, called in /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php on line 284 in /var/www/html/WEBSITE.COM/web/modules/contrib/encrypt/src/EncryptService.php on line 87 #0 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php(284): Drupal\encrypt\EncryptService->decrypt()        
#1 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php(218): Drupal\aws\Entity\Profile->decryptSecret()
#2 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php(301): Drupal\aws\Entity\Profile->getSecretAccessKey()
#3 /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/AwsClientFactory.php(50): Drupal\aws\Entity\Profile->getClientArgs()
#4 /var/www/html/WEBSITE.COM/web/modules/contrib/amazon_ses/src/AmazonSesHandler.php(73): Drupal\aws\AwsClientFactory->getClient()
#5 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Component/DependencyInjection/Container.php(261): Drupal\amazon_ses\AmazonSesHandler->__construct()
#6 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Component/DependencyInjection/Container.php(179): Drupal\Component\DependencyInjection\Container->createService()
#7 /var/www/html/WEBSITE.COM/web/modules/contrib/amazon_ses/src/Plugin/QueueWorker/AmazonSesMailQueue.php(32): Drupal\Component\DependencyInjection\Container->get()
#8 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\amazon_ses\Plugin\QueueWorker\AmazonSesMailQueue::create()
#9 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance()    
#10 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Queue/QueueWorkerManager.php(63): Drupal\Component\Plugin\PluginManagerBase->createInstance()
#11 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Cron.php(206): Drupal\Core\Queue\QueueWorkerManager->createInstance()
#12 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/Cron.php(162): Drupal\Core\Cron->processQueues()
#13 /var/www/html/WEBSITE.COM/web/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
#14 /var/www/html/WEBSITE.COM/vendor/drush/drush/src/Commands/core/DrupalCommands.php(64): Drupal\Core\ProxyClass\Cron->run()
#15 [internal function]: Drush\Commands\core\DrupalCommands->cron()
#16 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#17 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#18 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#19 /var/www/html/WEBSITE.COM/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process()
#20 /var/www/html/WEBSITE.COM/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#21 /var/www/html/WEBSITE.COM/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()
#22 /var/www/html/WEBSITE.COM/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#23 /var/www/html/WEBSITE.COM/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#24 /var/www/html/WEBSITE.COM/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#25 /var/www/html/WEBSITE.COM/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#26 /var/www/html/WEBSITE.COM/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()
#27 /var/www/html/WEBSITE.COM/vendor/drush/drush/drush(4): require('...')
#28 {main}


TypeError: Drupal\encrypt\EncryptService::decrypt(): Argument #2 ($encryption_profile) must be of type Drupal\encrypt\EncryptionProfileInterface, null given, called in /var/www/html/WEBSITE.COM/web/modules/contrib/aws/src/Entity/Profile.php on line 284 in Drupal\encrypt\EncryptService->decrypt() (line 87 of /var/www/html/WEBSITE.COM/web/modules/contrib/encrypt/src/EncryptService.php).
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rex.barkdoll

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024