I am trying to test out the Secrets service, and I followed the examples precisely, but no matter how many encryption keys I add to my app, I keep getting this error in my server module: anvil.secrets.SecretError: No such secret 'my_key' <running on the server> called from /downlink/anvil/secrets.py, line 9
I am trying to use the encrypt_with_key and decrypt_with_key functions.
For the sake of testing, can you click the âreset keyâ button to generate a new value, then see if that key works? Bear in mind you will lose anything already encrypted with that old key.
Ahaaa! This could be a saving issue. Try pressing Ctrl+S after editing your keys (to force a save of the whole app, not just the parts Anvil thinks have changed), and running it then. If that sorts it, I know where to look for the fix
Can confirm it is a saving issue! I created a brand new key, renamed it without saving, and got the same error. Then I went back and saved the page and it worked just fine.