Answers.Body: <p>Did you already set CIVICRM_CRED_KEYS in civicrm.settings.php? If so it probably has the wrong &quot;type&quot;. <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/secret-keys/#civicrm_cred_keys" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/setup/secret-keys/#civicrm_cred_keys</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-19T18:01:55.620Z
Answers.Text: Thanks! That was it. The old key did not have any type.
Answers.UserDisplayName: Kimball
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-19T17:05:39.240Z
Answers.LastActivityDate: 2021-04-19T17:05:39.240Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>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 <code>CIVICRM_CRED_KEYS</code> value to whatever was in the old <code>civicrm.settings.php</code>.</p>
  <p>In practice, I found it much easier to delete the entry in the <code>civicrm_setting</code> database table that stored SMTP settings and re-enter them.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-21T13:08:48.303Z
Answers.LastActivityDate: 2021-04-21T13:08:48.303Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>After CiviCRM upgrading v5.29 to v5.36, when I run the database update get the following error. I googled &quot;CiviCRM Crypto key has unrecognized type&quot; but did not find anything. Any suggestions what to do next?</p>
  <blockquote>
  <p>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.</p>
  </blockquote>
  <p>This is what I get with Debugging on:</p>
  <pre><code>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-&gt;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-&gt;setPreUpgradeMessage('&lt;br /&gt;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-&gt;setPreUpgradeMessage('&lt;br /&gt;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-&gt;runIntro()    /home/customer/www/%%%%%%.org/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php:57
  5    CRM_Upgrade_Page_Upgrade-&gt;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-&gt;dispatch()    /home/customer/www/%%%%%%.org/public_html/libraries/src/Application/AdministratorApplication.php:159
  14    Joomla\CMS\Application\AdministratorApplication-&gt;doExecute()    /home/customer/www/%%%%%%.org/public_html/libraries/src/Application/CMSApplication.php:203
  15    Joomla\CMS\Application\CMSApplication-&gt;execute()    /home/customer/www/%%%%%%.org/public_html/administrator/index.php:51
  16    {main}
  </code></pre>
  
Tags: <joomla><upgrade><crypto>
Title: Crypto key has unrecognized type?
ThreadText: # Crypto key has unrecognized type?
  
  (Asked by: username_0 on 2021-04-19)
  
  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('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('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}
  
  **Tags:** joomla, upgrade, crypto
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-04-19. Score: 2 | Accepted answer
  
  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>
  
  > **Comments:**
  > **username_0**: Thanks! That was it. The old key did not have any type.  
  
  ---
  
  ### Answer by username_2 on 2021-04-21. Score: 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.
  
  
  ---
  
  