atlassian / atlassian/atlascode
Bitbucket OAuth Login Fails – Localhost (127.0.0.1:31415) Connection Refused
- Dominant language
- TypeScript
- Stars
- 129
- Forks
- 82
- Avg merge
- 3h 3m
- Merged PRs (30d)
- 6
Description
## **Describe the bug**
When trying to log in to Bitbucket through the Atlassian VS Code plugin (Atlascode), the OAuth flow starts correctly, but after authorizing access and being redirected back to localhost, the connection is refused and the login fails.
After confirming access on the OAuth screen, the browser redirects to:
```
http://127.0.0.1:31415/bbcloud?code=...&state=...
```
However, the page shows:
```
This site can’t be reached
127.0.0.1 refused to connect.
ERR_CONNECTION_REFUSED
```
As a result, authentication is not completed and Bitbucket is not connected in VS Code.
---
## **To Reproduce**
1. Open Visual Studio Code
2. Click to log in to Bitbucket using the Atlassian plugin (Atlascode)
3. The browser opens the Bitbucket OAuth authorization screen
4. Click “Confirm” to grant access
5. After redirection to `http://127.0.0.1:31415/bbcloud?...`
6. See error: `ERR_CONNECTION_REFUSED`
---
## **Expected behavior**
After confirming access in the OAuth screen, the browser should redirect to localhost and successfully complete the authentication process, logging the user into Bitbucket inside VS Code.
Instead, the localhost connection is refused and authentication fails.
---
## **Screenshots**
### OAuth Authorization Screen
```
Confirm access to your account
Atlascode Integration (http://127.0.0.1) is requesting access to the following:
- Read your account information
- Read and modify your repositories' issues
- Access your repositories' build pipelines
- Read your workspace's project settings and read repositories contained within your workspace's projects
- Read and modify your repositories and their pull requests
- Read and modify your snippets
- Read your team membership information
```
### Redirected URL
```
http://127.0.0.1:31415/bbcloud?code=GwEweEUgUevs7ZVapY&state=e5b05adf-1a10-4faf-a640-366f6b7cfb53
```
### Browser Error
```
This site can’t be reached
127.0.0.1 refused to connect.
ERR_CONNECTION_REFUSED
```
---
## **Environment and Version**
* Atlassian Plugin Version: 4.0.21
* Visual Studio Code Version: 1.109.5
* Environment: Local
* OS: Windows 10
* Browser: Chrome
---
## **Additional context**
The OAuth flow appears to work correctly until the redirection to localhost. It seems that nothing is listening on port `31415`, which causes the connection to be refused.
There is no custom proxy configuration enabled.
Firewall and local network settings appear to be normal.
The issue consistently happens every time the login flow is attempted.
Contributor guide
Assessment
This issue has not been assessed yet.