Secret Variables in PSU 5.0.5 are not working

Since upgrading to 5.0.5, none of the secret variables are being read by any of the scripts. I tried creating a new secret just to test with, and then made a script that does Write-Output $Secret:testvariablename to see what it would do, and there is no output at all. No error, either. I also noticed that when typing out $Secret: into a script, there is no longer a window showing possible names to choose from.

Product: PowerShell Universal
Version: 5.0.5

What vault are you using? I just tried with the DB vault and my secrets show up in scripts.

As for IntelliSense, I don’t think we ever had completion for secrets unless you had used them previously in the script.

Unless v5 doesn’t use the same default key that v4 used (because I never changed it to a custom key), I can’t see why secrets wouldn’t be working post-upgrade.

I thought I recalled IntelliSense, but I could be wrong.

The default key didn’t change. If you create a new secret does that one work? Did you have to do a DB conversion at all?

The secret variable in the screenshot I attached above is a new variable I made to test with, and it doesn’t work either.

Test.ps1 just has a single line in it:
Write-Output $Secret:JesseTestSecret

This is what I see when it runs:

No. We started on v4, so we were already using SQLite.

@adam I figured it out and fixed it.

In v4 and lower, in the custom appsettings.json file you would set your custom database path as:

  "Data": {
	"ConnectionString": "filename=%ProgramData%\\UniversalAutomation\\database.db"
}

In v5, this apparently needs to be changed to:

  "Data": {
	"ConnectionString": "Data Source=%ProgramData%\\UniversalAutomation\\database.db"

I don’t recall seeing anything about the value needing to be changed from filename= to Data Source= but maybe I overlooked it. Either way, changing it to that is now allowing PSU to access the DB properly and I can pull Secret variables.