2

After CiviCRM upgrading v5.29 to v5.36, when I run the database update get the following error. I googled "CiviCRM Crypto key has unrecognized type" but did not find anything. Any suggestions what to do next?

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. Crypto key has unrecognized type Return to home page.

This is what I get with Debugging on:

Civi\Crypto\Exception\CryptoException: Crypto key has unrecognized type in /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/Civi/Crypto/CryptoRegistry.php on line 76

Exception trace
#    Function    Location
0    Civi\Crypto\CryptoRegistry->parseKey('%%%%%%%%%%%%%%%…')    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/Civi/Crypto/CryptoRegistry.php:76
1    Civi\Crypto\CryptoRegistry::createDefaultRegistry()    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Incremental/php/FiveThirtyFour.php:39
2    CRM_Upgrade_Incremental_php_FiveThirtyFour->setPreUpgradeMessage('<br />The defaul…', '5.34.alpha1', '5.29.0')    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php:823
3    CRM_Upgrade_Form->setPreUpgradeMessage('<br />The defaul…', '5.29.0', '5.36.0')    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php:108
4    CRM_Upgrade_Page_Upgrade->runIntro()    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php:57
5    CRM_Upgrade_Page_Upgrade->run(Array, null)    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:313
6    CRM_Core_Invoke::runItem(Array)    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:69
7    CRM_Core_Invoke::_invoke(Array)    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:36
8    CRM_Core_Invoke::invoke(Array)    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm.php:121
9    civicrm_invoke()    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm.php:40
10    require_once('/home/customer/w…')    /home/customer/www/%%%%%%.org/public_html/libraries/src/Component/ComponentHelper.php:402
11    Joomla\CMS\Component\ComponentHelper::executeComponent('/home/customer/w…')    /home/customer/www/%%%%%%.org/public_html/libraries/src/Component/ComponentHelper.php:377
12    Joomla\CMS\Component\ComponentHelper::renderComponent('com_civicrm')    /home/customer/www/%%%%%%.org/public_html/libraries/src/Application/AdministratorApplication.php:101
13    Joomla\CMS\Application\AdministratorApplication->dispatch()    /home/customer/www/%%%%%%.org/public_html/libraries/src/Application/AdministratorApplication.php:159
14    Joomla\CMS\Application\AdministratorApplication->doExecute()    /home/customer/www/%%%%%%.org/public_html/libraries/src/Application/CMSApplication.php:203
15    Joomla\CMS\Application\CMSApplication->execute()    /home/customer/www/%%%%%%.org/public_html/administrator/index.php:51
16    {main}

2 Answers 2

2

Did you already set CIVICRM_CRED_KEYS in civicrm.settings.php? If so it probably has the wrong "type". https://docs.civicrm.org/sysadmin/en/latest/setup/secret-keys/#civicrm_cred_keys

1
  • Thanks! That was it. The old key did not have any type.
    – Kimball
    Apr 19, 2021 at 18:01
1

While not the OP's issue, another cause for this error is copying a Civi database to a new site. Typically you'll install a fresh Civi, then load your backup. If you do this, in theory you need to match your CIVICRM_CRED_KEYS value to whatever was in the old civicrm.settings.php.

In practice, I found it much easier to delete the entry in the civicrm_setting database table that stored SMTP settings and re-enter them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.