sysPass Version
3.1 (310.19081801)
Describe the bug
I'm trying to change the master password but I get an error Error while updating the accounts' passwords in history.
To Reproduce
confirm changePerform button (play icon)Error while updating the accounts' passwords in historyExpected behavior
I expected the master password to be changed. After the above steps, I can still login without reentering master password, but it should ask me for a new master password. Master password also stays the same.
Screenshots

Event log
[2019-08-21 11:40:14] syspass.INFO: logger {"message":"Extensions checked","caller":"SP\Core\PhpExtensionChecker::checkMandatory"}
[2019-08-21 11:40:14] syspass.INFO: logger {"message":"Loaded icons cache","caller":"SP\Core\UI\Theme::initIcons"}
[2019-08-21 11:40:14] syspass.INFO: logger {"message":"Loaded actions cache","caller":"SP\Core\Acl\Actions::loadCache"}
[2019-08-21 11:40:15] syspass.DEBUG: update.masterPassword.start {"message":"N/A","user":"matejz","address":"10.10.10.11","caller":"SP\\Modules\\Web\\Controllers\\ConfigEncryptionController::saveAction"} []
[2019-08-21 11:40:15] syspass.DEBUG: update.masterPassword.start {"message":"N/A","user":"matejz","address":"10.10.10.11","caller":"SP\\Modules\\Web\\Controllers\\ConfigEncryptionController::saveAction"} []
[2019-08-21 11:40:15] syspass.DEBUG: update.masterPassword.start {"message":"N/A","user":"matejz","address":"10.10.10.11","caller":"SP\\Modules\\Web\\Controllers\\ConfigEncryptionController::saveAction"} []
[2019-08-21 11:40:15] syspass.DEBUG: update.masterPassword.accounts.start {"message":"Update Master Password","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateMasterPassword"} []
[2019-08-21 11:40:15] syspass.DEBUG: update.masterPassword.accounts.start {"message":"Update Master Password","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateMasterPassword"} []
[2019-08-21 11:40:15] syspass.DEBUG: update.masterPassword.accounts.start {"message":"Update Master Password","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateMasterPassword"} []
[2019-08-21 11:40:17] syspass.DEBUG: update.masterPassword.accounts.end {"message":"Accounts updated: 1,2 | Errors: 0","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateMasterPassword"} []
[2019-08-21 11:40:17] syspass.DEBUG: update.masterPassword.accounts.end {"message":"Accounts updated: 1,2 | Errors: 0","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateMasterPassword"} []
[2019-08-21 11:40:17] syspass.DEBUG: update.masterPassword.accounts.end {"message":"Accounts updated: 1,2 | Errors: 0","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateMasterPassword"} []
[2019-08-21 11:40:17] syspass.DEBUG: update.masterPassword.accountsHistory.start {"message":"Update Master Password (H)","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateHistoryMasterPassword"} []
[2019-08-21 11:40:17] syspass.DEBUG: update.masterPassword.accountsHistory.start {"message":"Update Master Password (H)","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateHistoryMasterPassword"} []
[2019-08-21 11:40:17] syspass.DEBUG: update.masterPassword.accountsHistory.start {"message":"Update Master Password (H)","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateHistoryMasterPassword"} []
[2019-08-21 11:40:17] syspass.ERROR: exception {"message":"Error while retrieving the accounts' passwords","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateHistoryMasterPassword"} []
[2019-08-21 11:40:17] syspass.ERROR: exception {"message":"Error while retrieving the accounts' passwords","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateHistoryMasterPassword"} []
[2019-08-21 11:40:17] syspass.ERROR: exception {"message":"Error while retrieving the accounts' passwords","user":"matejz","address":"10.10.10.11","caller":"SP\\Services\\Account\\AccountCryptService::updateHistoryMasterPassword"} []
[2019-08-21 11:40:17] syspass.EXCEPTION: logger {"message":"Error while updating the accounts' passwords in history
#0 /var/www/html/syspass/lib/SP/Services/Crypt/MasterPassService.php(98): SP\Services\Account\AccountCryptService->updateHistoryMasterPassword(Object(SP\Services\Crypt\UpdateMasterPassRequest))
#1 [internal function]: SP\Services\Crypt\MasterPassService->SP\Services\Crypt\{closure}()
#2 /var/www/html/syspass/lib/SP/Services/Service.php(99): Closure->call(Object(SP\Services\Crypt\MasterPassService))
#3 /var/www/html/syspass/lib/SP/Services/Crypt/MasterPassService.php(103): SP\Services\Service->transactionAware(Object(Closure))
#4 /var/www/html/syspass/app/modules/web/Controllers/ConfigEncryptionController.php(151): SP\Services\Crypt\MasterPassService->changeMasterPassword(Object(SP\Services\Crypt\UpdateMasterPassRequest))
#5 [internal function]: SP\Modules\Web\Controllers\ConfigEncryptionController->saveAction()
#6 /var/www/html/syspass/lib/SP/Bootstrap.php(240): call_user_func_array(Array,Array)
#7 [internal function]: SP\Bootstrap->SP\{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#8 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(886): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#9 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#10 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#11 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#12 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2019-08-21 11:40:17] syspass.EXCEPTION: logger {"message":"(P) Error while retrieving the accounts' passwords
#0 /var/www/html/syspass/lib/SP/Services/Account/AccountCryptService.php(233): SP\Services\Account\AccountCryptService->processAccounts(Array, Object(Closure))
#1 /var/www/html/syspass/lib/SP/Services/Crypt/MasterPassService.php(98): SP\Services\Account\AccountCryptService->updateHistoryMasterPassword(Object(SP\Services\Crypt\UpdateMasterPassRequest))
#2 [internal function]: SP\Services\Crypt\MasterPassService->SP\Services\Crypt\{closure}()
#3 /var/www/html/syspass/lib/SP/Services/Service.php(99): Closure->call(Object(SP\Services\Crypt\MasterPassService))
#4 /var/www/html/syspass/lib/SP/Services/Crypt/MasterPassService.php(103): SP\Services\Service->transactionAware(Object(Closure))
#5 /var/www/html/syspass/app/modules/web/Controllers/ConfigEncryptionController.php(151): SP\Services\Crypt\MasterPassService->changeMasterPassword(Object(SP\Services\Crypt\UpdateMasterPassRequest))
#6 [internal function]: SP\Modules\Web\Controllers\ConfigEncryptionController->saveAction()
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(240): call_user_func_array(Array, Array)
#8 [internal function]: SP\Bootstrap->SP\{closure}(Object(Klein\Request), Object(Klein\Response), Object(Klein\ServiceProvider), Object(Klein\App), Object(Klein\Klein), Object(Klein\DataCollection\RouteCollection), Array)
#9 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(886): call_user_func(Object(Closure), Object(Klein\Request), Object(Klein\Response), Object(Klein\ServiceProvider), Object(Klein\App), Object(Klein\Klein), Object(Klein\DataCollection\RouteCollection), Array)
#10 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route), Object(Klein\DataCollection\RouteCollection), Array)
#11 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#12 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap::run(Object(DI\Container))
#13 /var/www/html/syspass/index.php(28): require('/var/www/html/s...')
#14 {main}","caller":"N/A"}
[2019-08-21 11:40:17] syspass.ERROR: exception {"message":"Error while updating the accounts' passwords in history","user":"matejz","address":"10.10.10.11","caller":"SP\\Modules\\Web\\Controllers\\ConfigEncryptionController::saveAction"} []
[2019-08-21 11:40:17] syspass.ERROR: exception {"message":"Error while updating the accounts' passwords in history","user":"matejz","address":"10.10.10.11","caller":"SP\\Modules\\Web\\Controllers\\ConfigEncryptionController::saveAction"} []
[2019-08-21 11:40:17] syspass.ERROR: exception {"message":"Error while updating the accounts' passwords in history","user":"matejz","address":"10.10.10.11","caller":"SP\\Modules\\Web\\Controllers\\ConfigEncryptionController::saveAction"} []
Platform (please complete the following information):
Hello, is there any accounts in history?
Regards
Noup, empty (it's a fresh install and AccountHistory is empty).
I edited an account to create history and now my master password successfully changed. I know my case is a corner case but I think Syspass should not fail in this case.
Sure!... I'll fix it shortly.
Thanks for the feedback!
Thank you for a great app!
You're welcome. I'll keep this opened for tracking.