How to fix an error that the 'MATLAB Vault is unavailable' when using the commands listSecrets or setSecret?

36 views (last 30 days)
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
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?
Brooke
Brooke on 29 Jan 2025
MATLAB Version: 24.1.0.2689473 (R2024a) Update 6 currently, but previously it did not work on update 5 either
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 19045).
Nothing changed about my license or installation when this happened the first time. No hardware changes as well. This is a site license and my coworkers with similar laptops, windows versions, and matlab versions all do not have this issue.
Exact Sequence of Events:
  • I had MATLAB open and tried to run some working code that uses getSecret.This was on Update 5
  • I get the error that the vault is unavailable.
  • I try listSecrets, setSecret, etc. All basically show the same error.
  • I reopen MATLAB and everything works fine - no updates of any sort in between working and not working
  • A few weeks later I get the same issue, but restarting matlab is not able to recover the error. Still on Update 5
  • I restart my pc
  • I restart matlab some more
  • I reinstall matlab 2024a - Update 6
  • I'm sure some updates were pushed to my laptop from my work, but I wouldn't know which ones.
  • Error is still not recoverable
So the first time this happened nothing about my hardware/software had changed.

Sign in to comment.

Accepted Answer

Leepakshi
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)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!