Hi team - we’ve started seeing intermittent 401 er...
# cloud
n
Hi team - we’ve started seeing intermittent 401 errors when deploying to Livekit Cloud.
Copy code
{"level":"debug","ts":1761787386.9974415,"logger":"cloud-agents-github-plugin","caller":"build/config.go:279","msg":"loading livekit.toml file"}
{"level":"error","ts":1761787387.3157005,"caller":"build/main.go:273","msg":"Failed to deploy agent","error":"twirp error unauthenticated: Error from intermediary with HTTP status code 401
Some deploys were failing this morning, then started succeeding, before starting to fail again. We first noticed it using the Github deploy action, but I’m seeing it using the
lk
CLI as well.
Commands for a different project are succeeding, it seems to be mostly isolated to this specific project.
e
the tokens depend on the local system clock, ensure that is set correctly. Also, if this issue persists, you could try to recreate the api key/secret for this project and update your local lk cli with these new values.
n
Recreating new tokens ended up doing the trick 👍 Definitely a bit weird since it started failing on multiple machines (in CI, on my laptop, and another developers laptop), but the API key had been working until recently.
b
I am getting these as well. I thought it might be related to whatever when wrong this morning
I created a new key in cloud, added it to my env.local file, and then I try to auth it says success. But when I try to deploy I get
Using secrets file [.env.local]
unable to get client settings: Error from intermediary with HTTP status code 401 "Unauthorized"
e
try to remove your lk project and then re-add it with the new key/secret. it will be ignored in your .env file
n
FWIW another developer on our team had their personal tokens seem to expire unexpectedly a few days ago as well. Creating new tokens resolved the issue.
👍 1
b
remove / re-add project didn't work. Tried several variations. There is something I am not quite understanding with the responses I get with `lk cloud auth`: I get authed then it says project name already exists. In any case Not sure what got out of sync locally. Deleting the project and starting over seems to have worked. I have to redo my telephony configs. Not a biggies since I automated it with n8n. All fine for now but I hope I don't end up here with a paid client one day 🤞. Part of it is me needing to understand the cli better
e
i've raised a note internally about this issue, we'll see if we can track it down. thanks for the report!
b
Thank you
I think I figured out my end of it. And a possible issue on the livekit end (or I am just using the cli wrong) When I remove a project
lk project remove
the message indicates I removed it, but it still shows up when I list projects, and it seems I get stuck selected on that project when I try and deploy or auth. That one no longer even exists remotely in cloud. It all started to click when I opened up
cli-config.yaml
. I removed the outdated project manually from in there, and then put the proper keys from
cli-config.yaml
into my local.env, and was able to connect.