How to fix an error that the 'MATLAB Vault is unavailable' when using the commands listSecrets or setSecret?
    36 views (last 30 days)
  
       Show older comments
    
I use the MATLAB vault functions to store secrets like logins, passwords, etc in MATLAB 2024a.
It had been working perfectly fine for several months, but suddenly whenever I call any functions like listSecrets, getSecret, setSecret I get this error: 
        Unable to call 'listSecrets'. The MATLAB Vault is unavailable.
I have tried the following with no luck:
- restarting MATLAB
- restarting my PC
- re-installing MATLAB
I got this error once before, but after restarting MATLAB it went away. But now, no amount of restarting MATLAB has been able to fix it.
Is there a way to fix this error?
3 Comments
  Steven Lord
    
      
 on 29 Jan 2025
				Did something change about your license (switched from one license to another?), your MATLAB installation (installed an update?), or your computer (installed or uninstalled an update, change of hardware, etc.?) between the last time that listSecrets worked and the first time that it indicated the vault was unavailable?
Accepted Answer
  Leepakshi
 on 31 Jan 2025
        Hi Brooke,
Same issue has happened with me once, and changing the version of MathworksServiceHost fixed the issue for me.
The reason for this error can be different depending on MATLAB, MathworksServiceHost or even the OS on your machine. 
Some quick workarounds are:
1. Are there mutiple instances of MathworksServiceHost processes running on user system? If so ensure only single process instance is being started. 
2. Is the running MathworksServiceHost process an older verion and not latest, if so uninstall it and install latest one.
You can refer the document below to correct your Mathworks Service Host:
If the issue is still not resolved, you can contact MATLAB Help desk using the link below:
 Hope this will work for you!
More Answers (0)
See Also
Categories
				Find more on Introduction to Installation and Licensing in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


