# An Internal error occured while decrypting the password from passbolt

**URL:** <https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745>\
**Category:** Installation Issues\
**Created:** [January 6, 2022, 8:08pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745 "2022-01-06T20:08:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 6, 2022, 8:08pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/1 "2022-01-06T20:08:45Z")

</div>

I have migrated my passbolt old version to new version. But the new version is configured on the new server. All the data are restored perfectly but now when I try to decrypt, copy or export any password, it gives me the error: An internal error has occurred.

To solve the same I tried running below command which threw some errors:  
sudo -u www-data /bin/cake migrations migrate

**OUTPUT:**  
using migration paths

- /etc/passbolt/Migrations  
using seed paths
- /etc/passbolt/Seeds  
using environment default  
using adapter mysql  
using database passbolt  
ordering by creation time

== 20180503135810 V210InstallAccountSettingsPlugin: migrating  
PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘account\_settings’ already exists in /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:192  
Stack trace:  
#0 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(192): PDO-\>exec()  
#1 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php(339): Phinx\Db\Adapter\PdoAdapter-\>execute()  
#2 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(356): Phinx\Db\Adapter\MysqlAdapter-\>createTable()  
#3 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(113): Phinx\Db\Adapter\AdapterWrapper-\>createTable()  
#4 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(356): Phinx\Db\Adapter\TimedOutputAdapter-\>createTable()  
#5 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(146): Phinx\Db\Adapter\AdapterWrapper-\>createTable()  
#6 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(715): Phinx\Db\Plan\Plan-\>execute()  
#7 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(611): Phinx\Db\Table-\>executeActions()  
#8 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Table.php(140): Phinx\Db\Table-\>create()  
#9 /etc/passbolt/Migrations/20180503135810\_V210InstallAccountSettingsPlugin.php(56): Migrations\Table-\>create()  
#10 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): V210InstallAccountSettingsPlugin-\>up()  
#11 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(376): Phinx\Migration\Manager\Environment-\>executeMigration()  
#12 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(351): Phinx\Migration\Manager-\>executeMigration()  
#13 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager-\>migrate()  
#14 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Migrate-\>execute()  
#15 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php(85): Migrations\Command\Phinx\Migrate-\>parentExecute()  
#16 /usr/share/php/passbolt/vendor/symfony/console/Command/Command.php(299): Migrations\Command\Phinx\Migrate-\>execute()  
#17 /usr/share/php/passbolt/vendor/symfony/console/Application.php(978): Symfony\Component\Console\Command\Command-\>run()  
#18 /usr/share/php/passbolt/vendor/symfony/console/Application.php(295): Symfony\Component\Console\Application-\>doRunCommand()  
#19 /usr/share/php/passbolt/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application-\>doRun()  
#20 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application-\>run()  
#21 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(179): Migrations\Command\MigrationsCommand-\>execute()  
#22 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand-\>run()  
#23 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(336): Migrations\Command\MigrationsCommand-\>run()  
#24 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner-\>runCommand()  
#25 /usr/share/php/passbolt/bin/cake.php(13): Cake\Console\CommandRunner-\>run()  
#26 {main}

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [January 6, 2022, 10:50pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/2 "2022-01-06T22:50:42Z")

</div>

Hi @sayujya Welcome to the forum!

A recent post from another user - possibly related? [An Internal Error has occurred (Firefox)](https://community.passbolt.com/t/an-internal-error-has-occurred-firefox/4711)

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 10, 2022, 6:32am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/3 "2022-01-10T06:32:57Z")

</div>

Hello @garrett I tried the same steps but got the error as mentioned above.

Check this screenshot:

 ![Screenshot_3](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/4/4e7c3102a2361f69ea06467cc032a09ce0cc1dd7.png)

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [January 10, 2022, 11:50am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/4 "2022-01-10T11:50:49Z")

</div>

@sayujya We’ll need more info like old version, new version, which OS/install and what update method you are following, thanks.

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 10, 2022, 11:53am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/5 "2022-01-10T11:53:42Z")

</div>

I was before running with the 2.04 version on the Ubuntu 18.04 server. Then I changed it on new Ubuntu 20.04 server with the latest verison of passbolt and added the backups in there.

I uploaded the old database from the old server to the new server.

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [January 10, 2022, 12:00pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/6 "2022-01-10T12:00:55Z")

</div>

@sayujya Just to confirm, the upgrade process you followed is this one here correct? [Passbolt Help | Migrate passbolt CE from install scripts to Ubuntu package](https://help.passbolt.com/hosting/upgrade/ce/migrate-to-ubuntu.html)

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 10, 2022, 12:13pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/7 "2022-01-10T12:13:01Z")

</div>

Yes this is the correct one @garrett

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [January 10, 2022, 1:12pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/8 "2022-01-10T13:12:20Z")

</div>

@sayujya And there are no errors in the console?

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [January 10, 2022, 1:22pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/9 "2022-01-10T13:22:20Z")

</div>

Hi !

Can you share the output of these commands:

```auto
sudo -u www-data bin/cake migrations status
sudo -u www-data bin/cake passbolt healthcheck
sudo -u www-data bin/cake passbolt datacheck --hide-success-details

```

Thanks,

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 10, 2022, 1:28pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/11 "2022-01-10T13:28:51Z")

</div>

@_jc please check below outputs:

1.) sudo -u www-data bin/cake migrations status  
OUTPUT:

```auto
using migration paths
 - /etc/passbolt/Migrations
using seed paths
 - /etc/passbolt/Seeds
using environment default

 Status Migration ID Migration Name
-----------------------------------------
     up 20170830064410 V162InitialMigration
     up 20170830065037 V200ActiveMustBeBoolean
     up 20170830065038 V200DropUnusedProfileFields
     up 20170830065039 V200IncreaseEmailSize
     up 20170830065040 V200DropUnusedCreatedBy
     up 20170830065041 V200MigrateUUID
     up 20170830065042 V200MigrateKeyField
     up 20171002061834 V200DropUnusedResourceFields
     up 20171006141922 V200AddFavoriteModifiedField
     up 20171009093000 V200DropUnusedPermissionTypesTable
     up 20171009093001 V200MigrateEmailsTable
     up 20171009093002 V200MigrateFileStorageTable
     up 20171025154754 V200AddCommentsUserIdField
     up 20180102065042 V200MigrateForeignIdField
     up 20180102180000 V200DropUnusedTables
     up 20180102221500 V200AddMissingTablesIndexes
     up 20180413171600 V202ForceColumnsCharset
   **down 20180503135810 V210InstallAccountSettingsPlugin**
     up 20180930151500 V240AddAuthenticationTokenType
   **down 20181002171600 V240ExtendAccountSettingsPlugin**
     up 20181210170000 V270AddMissingIndexes
     up 20190106170300 V280AdditionalEmailMigration
     up 20190106170301 V280AdditionalFileStorageMigration
     up 20190106170302 V280FileDirectoryPathsMigrations
     up 20190112124290 V270AddActionsTable
     up 20190112124300 V270AddActionLogsTable
     up 20190121111100 V270AddEntitiesHistoryTable
     up 20190121121100 V270AddPermissionsHistoryTable
     up 20190211124300 V270AddSecretsHistoryTable
     up 20190221124300 V270AddSecretAccessesTable
     up 20190512115400 V2100AddOrganizationSettingsTable
     up 20190623143400 V2110ExtendKeyIdSizeField
     up 20190923103000 V2120UpdateEmailQueue
     up 20191119160000 V2120DropUnusedTables
   **down 20200108135000 V2130DropLegacyAnonymousUser**
 **down 20200319135000 V2130SoftDeleteGpgKeysForSoftDeletedUsers**
 **down 20200501182000 V2130ReconcileLoginHistory**
 **down 20200806110200 V300ExtendSecretsDataField**
 **down 20200806110201 V300AddResourceTypeIdField**
 **down 20200806110202 V300AddResourceTypesTable**
 **down 20200806110203 V300AddResourceTypesDefaultData**
 **down 20200806110204 V300AddResourceTypesToResources**
 **down 20200824191900 V2136CleanupUnusedActionLogs**
 **down 20200824191901 V2136AddActionLogsRelatedIndexes**
 **down 20201221093528 V300DeleteMetadataOfSoftDeletedResources**
 **down 20210111163200 V300AddActionLogsExtraIndex**
 **down 20210121141742 V320AddAvatarsTable**
 **down 20210125212543 V320TransferFileStorageToAvatars**
 **down 20210206521254 V320DropFileStorage**
 **down 20210329110000 V320FixResourceTypesDefaultData**
 **down 20210427124200 V330AddMobileTransferTable**
 **down 20211027202137 V331ConvertEmailVariablesToJson**
 **down 20211121231300 V340MigrateASCIIFieldsEncoding**

```

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [January 10, 2022, 2:52pm UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/12 "2022-01-10T14:52:48Z")

</div>

It is weird, as account\_settings table migrations didn’t pass, but the table seems to exists 🤔

If you have backups, I’d try to drop the **account\_settings** table, then run migration command again.

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 11, 2022, 5:41am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/13 "2022-01-11T05:41:05Z")

</div>

1. sudo -u www-data bin/cake passbolt healthcheck

```auto
 Database

 [PASS] The application is able to connect to the database
 [PASS] 27 tables found
 [PASS] Some default content is present
 [FAIL] The database schema is not up to date.
 [HELP] Run the migration scripts:
 [HELP] sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations migrate --no-lock" www-data
 [HELP] See. https://www.passbolt.com/help/tech/update

 GPG Configuration

 [PASS] PHP GPG Module is installed and loaded.
 [PASS] The environment variable GNUPGHOME is set to /var/lib/passbolt/.gnupg.
 [PASS] The directory /var/lib/passbolt/.gnupg containing the keyring is writable by the webserver user.
 [PASS] The server OpenPGP key is not the default one
 [PASS] The public key file is defined in config/passbolt.php and readable.
 [PASS] The private key file is defined in config/passbolt.php and readable.
 [PASS] The server key fingerprint matches the one defined in config/passbolt.php.
 [PASS] The server public key defined in the config/passbolt.php (or environment variables) is in the keyring.
 [PASS] There is a valid email id defined for the server key.
 [PASS] The public key can be used to encrypt a message.
 [PASS] The private key can be used to sign a message.
 [PASS] The public and private keys can be used to encrypt and sign a message.
 [PASS] The private key can be used to decrypt a message.
 [PASS] The private key can be used to decrypt and verify a message.
 [PASS] The public key can be used to verify a signature.

 Application configuration

 [PASS] Using latest passbolt version (3.4.0).
 [FAIL] Passbolt is not configured to force SSL use.
 [HELP] Set passbolt.ssl.force to true in config/passbolt.php.
 [FAIL] App.fullBaseUrl is not set to HTTPS.
 [HELP] Check App.fullBaseUrl url scheme in config/passbolt.php.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [WARN] Registration is open to everyone.
 [HELP] Make sure this instance is not publicly available on the internet.
 [HELP] Or set passbolt.registration.public to false in config/passbolt.php.
 [PASS] Serving the compiled version of the javascript app
 [PASS] All email notifications will be sent.

 JWT Authentication

 [PASS] The JWT Authentication plugin is enabled
 [FAIL] The /etc/passbolt/jwt/ directory should not be writable.
 [HELP] You can try:
 [HELP] sudo chown -R www-data:www-data /etc/passbolt/jwt/
 [HELP] sudo chmod 550 /etc/passbolt/jwt/
 [HELP] sudo chmod 440 $(find /etc/passbolt/jwt/ -type f)
 [FAIL] A valid JWT key pair is missing
 [HELP] Run the create JWT keys script to create a valid JWT secret and public key pair:
 [HELP] sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt create_jwt_keys" www-data

```

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 11, 2022, 5:42am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/14 "2022-01-11T05:42:07Z")

</div>

Will I loose any data?

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [January 11, 2022, 6:09am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/15 "2022-01-11T06:09:35Z")

</div>

I assume you have backups 🙂

On the other hand, the migration for the account\_settings table has not been run. I’m pretty sure this table is empty on your server, so you can delete this table and only this table.

To check its content:

```auto
SELECT * FROM account_settings;

```

It should return 0 rows.

Drop it:

```auto
DROP TABLE account_settings;

```

Then run migrations again:

```auto
sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations migrate --no-lock" www-data

```

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 11, 2022, 6:21am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/16 "2022-01-11T06:21:40Z")

</div>

> [@AnatomicJC](#):
>
> `SELECT * FROM account_settings;`

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/1/16995c1f27f8c450b2b4db8712eeef96c6ab0987.png)  
SHould I backup and delete?? Or it must be something else making the issue??

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 11, 2022, 6:39am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/17 "2022-01-11T06:39:45Z")

</div>

@AnatomicJC I backed up the data and dropped the account\_settings table.

Got the new error now.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/6/65a3d1941ded96cf8ecacdcf7a63366494727ac5.png)

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [January 11, 2022, 7:45am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/18 "2022-01-11T07:45:03Z")

</div>

Hi,

It is the same story, you have to drop the `resource_types` table. This happens because you have installed a new passbolt with its new tables, then you restored your old database who don’t contains the new tables. So all new tables have to be deleted.

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 11, 2022, 7:47am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/19 "2022-01-11T07:47:21Z")

</div>

@AnatomicJC Headed towards success!! Thanks to you! I cleared resource\_types, transfers and avatars table and boom!! I am able to copy passwords now… But there is a bit thing happening now.

When I try to decrpyt the password, I am getting little more information… something like this.

{“description”:“Password for gmail account is also same.”,“password”:“XXXXXXX”}

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [January 11, 2022, 7:54am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/20 "2022-01-11T07:54:22Z")

</div>

Great ! 👍

You are getting more information because description field is encrypted by default:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/7/78e541483a93bbdc142c370571eed75aef7e30d7.png)

---

<div class="post-metadata">

**Author:** ![sayujya](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sayujya](https://community.passbolt.com/u/sayujya)\
**Post date:** [January 11, 2022, 10:22am UTC](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745/21 "2022-01-11T10:22:42Z")

</div>

@AnatomicJC this is an abnormal behavior. It won’t autfill the correct password then and also it should copy only password not with description.

[Next page](https://community.passbolt.com/t/an-internal-error-occured-while-decrypting-the-password-from-passbolt/4745.md?page=2)
