"secrets.toml" not found error after trying everything (re-repo, re-deploy)

Hello. I’m getting a “secrets not found” error, and I have tried everything. I would appreciate any help.

What I have already done:

  • My app works perfectly on my local PC.
  • My GitHub repository has the correct file structure: .streamlit/secrets.toml. I have checked the file path and content many times.
  • I have already tried “Reboot app”.
  • I have even deleted the app AND the GitHub repository, created a new clean repository, and redeployed the app from scratch. But the error still persists.

This seems like a platform issue beyond my control. Can anyone help?

My GitHub repo URL is: GitHub - Oshika0829/Watch-The-Stars-Right-Now

Hi @oshika0829zan,

Are you supposed to see this only right?(I have English Translation ON).
I dont see any secrets issues. Code looks good

Best practice is to not commit secrets.toml at all, and instead use community cloud’s secret management: Secrets management for your Community Cloud app - Streamlit Docs

By committing secrets.toml into the repo, you are exposing your keys to the world. I would recommend deleting that file from git, and disabling the api key you already have in the repo.

1 Like