Cloudflare DevelopersCD
Cloudflare Developers9mo ago
6 replies
ashish

Unable to access secret-store in local dev

I have defined a couple of secrets in the Cloudflare secrets-store. I have created bindings in the wrangler.jsonc file. But when running the worker locally, I get an error that the secret is "not found".

I have tried defining these in the .dev.vars file but to no avail.

When running wrangler dev it does say:
- Secrets Store Secrets:
  - instanceUrl: a0d7fd5ae3af4aad8c87bccb41323cac/TS_INSTANCE_URL [simulated locally]
  - accessToken: a0d7fd5ae3af4aad8c87bccb41323cac/TS_ACCESS_TOKEN [simulated locally]

But, when running the worker it says:
✘ [ERROR] Error: Secret "TS_ACCESS_TOKEN" not found
Was this page helpful?