-
Notifications
You must be signed in to change notification settings - Fork 952
Open
Labels
s2Broken use cases or features (with a workaround). Only humans may set this.Broken use cases or features (with a workaround). Only humans may set this.
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Occasionally when running a git command in workspace a user is prompted to re-authenticate with GitHub, but when they try, they get Failed to validate oauth access token
error. From the logs it seems that token refresh request times out. The issue fixes itself after about 10-15 minutes, but clicking login or unlinking and reenabling external auth does not seem to help. Only small number of users are affected.
Additionally, when they go to Account settings in Coder they see a similar token failed to validate
error:
Relevant Log Output
2025-03-24 09:43:35.035 [warn] coderd: GET host=coder.example.org path=/api/v2/workspaceagents/me/external-auth proto=HTTP/1.1 remote_addr=X.X.X.X start="2025-03-24T09:43:34.876944956Z" took=158.437119ms status_code=500 latency_ms=158 response_body="{\"message\":\"Fail
ed to refresh external auth token.\",\"detail\":\"validate external auth token: Get \\\"https://api.github.com/user\\\": context canceled\"}\n" request_id=f0f95513-5235-4f20-ba1e-b301dd87794a
Expected Behavior
No response
Steps to Reproduce
We have not found what causes the issue initially. But after it happens any of the below commands stop returning access token for the next 10-15 minutes:
GIT_PREFIX= coder "Username for https://github.com/:"
curl -X GET "$CODER_AGENT_URL"'/api/v2/workspaceagents/me/external-auth?match=github.com' -H 'Accept: application/json' -H "Coder-Session-Token: $CODER_AGENT_TOKEN"
Environment
- Host OS: Ubuntu 24.04.2 LTS
- Coder version: v2.19.0+2f32b11
Additional Context
No response
lupu60
Metadata
Metadata
Assignees
Labels
s2Broken use cases or features (with a workaround). Only humans may set this.Broken use cases or features (with a workaround). Only humans may set this.