Codespaces "Oh no, it looks like you are offline" and Other Connection Errors
Quick answer
Browser connection errors are usually an unstable network or a firewall blocking Codespaces domains. Clear storage and cookies, try another browser, and allow the domains from the GitHub meta API.
Most likely fix: Browser fixes
How to fix it
Try these in order — the most common fix is first.
1. Browser fixes
- Open github.com/codespaces and connect from there (you can only open codespaces you created)
- Try a different browser
- For "unable to authenticate", clear local storage and cookies
- For "trouble fetching", wait a few minutes and retry
Did this fix it?2. Network and firewall
- Run gh api meta --jq .domains.codespaces to list required domains and allow them
- Allow *.visualstudio.com on the firewall; exclude it from TLS inspection or install the firewall root CA
Did this fix it?3. VS Code extension
- Update the GitHub Codespaces extension
- Switch from VS Code Insiders to Stable
Did this fix it?4. Latency
- Set your Codespaces region manually in user preferences
Did this fix it?
Symptoms
Messages such as "Oh no, it looks like you are offline", "We are having trouble fetching your codespace information", "We were unable to authenticate your connection", or the VS Code extension failing to connect (connect EACCES, ECONNREFUSED, getaddrinfo ENOTFOUND, "Tunnel service HTTPS certificate is invalid").
Why it happens
- Unstable internet or a company network blocking connections
- Firewall blocking *.visualstudio.com or Codespaces domains
- TLS inspection injecting a self-signed certificate
- Authentication failure with stale local storage or cookies
- Codespace created in a region far from you (latency)
This guide also covers
- codespaces oh no it looks like you are offline
- codespaces unable to connect
- codespaces tunnel service https certificate invalid
- codespaces connection error
Still not working?
If GitHub Codespaces keeps failing, you're not alone. See every GitHub Codespaces problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
Other GitHub Codespaces errors
- Codespace Running in Recovery Mode: "This codespace is currently running in recovery mode due to a container error"
- GitHub Codespaces Creation Failed
- Can't Create a Codespace: No Option to Create on the Repository
- GitHub Codespaces "503 Service Unavailable" Error
- GitHub Codespaces Port Forwarding Not Working
- Codespace Out of Storage: How to Free Disk Space
- Codespaces Included Usage Used Up: Core Hours and Storage Quota
- Codespaces Prebuild Not Working: "Prebuild Ready" Label Missing