How can I resolve an internal or vault integrity error when using secret management functions in MATLAB?

When I try to run any secret management functions for MATLAB vault (e.g. "getSecret", "setSecret", "listSecret"), I get one of the following errors:
An internal error has occurred. Please contact MathWorks technical support for a resolution.
Vault integrity check failed
Why does this happen, and how can I restore functionality?

 Accepted Answer

This error can occur when a user's secret store is corrupted, so MATLAB cannot validate the secrets anymore.
To get them back into a good state, try the following steps:
  1. Shut down all MATLAB, MATLABConnector and MathWorksServiceHost processes and make sure that none of them are running.
  2. Delete the credentials folder found in:
    • Windows:   %APPDATA%\MathWorks\credentials
    • Linux:  ~/.matlab/credentials
    • Mac:   ~/Library/Application\ Support/MathWorks/credentials
  3. Start MATLAB again. You may be prompted to sign in.
After this, the error should resolve. If it does not, please contact MathWorks Technical Support.

More Answers (0)

Products

Release

R2025b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!