Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why The source tree redirects me to the localhost URL?

Acrologix
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 6, 2019

I have saw this bug several times during source tree installation. When the Source tree ask me to login with bitbucket and redirects me to the login page in the browser. After login the source tree redirects me to:

 http://localhost:34106/?state=authenticated&code=ZPHwBxSEsdNypFJ2Vs

 

Is it not error. I think the source tree developers have not updated this link while going from development into production.

 

 

Thanks

8 answers

6 votes
RakeMark
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

For me the Error is:

This site can’t provide a secure connection
ERR_SSL_PROTOCOL_ERROR

My Solution: 

1. Open an incognito Window
2. Change HTTPS to HTTP
3. Refresh page and I'm authenticated

I'm on SourceTree version 3.3.8

3 votes
Casper Nybroe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 12, 2019

I am seeing the same issue - redirected to localhost and nothing happens from there.
GJ Atlassian - also GJ with ignoring comments and tickets on this - moving on to another GUI.

Sergio July 14, 2019

Look at my "Solution" above this response. It worked for me.

Like 이범호 likes this
2 votes
Sergio June 11, 2019

I have managed to login uninstalling actual version(SourceTreeSetup-3.1.3) and downloading version 2.1.11.0 (https://www.sourcetreeapp.com/download-archives). After login just update and that's all.

Rajesh Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 7, 2020

I have followed this approach and It worked.

Thanks

Vlad Crisan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 29, 2020

Thanks Sergio, it did it for me.

I was unable to login through the webpage cookie or whatever which was trying to connect to localhost:34196...big misshap from Sourcetree devs

Like 今井真 likes this
kos811
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2020

it works for me too

thank you

 

reshu0408
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2020

Thanks @Sergio . You saved my day :)

Maxime Lepage July 12, 2024

The api used by this version don't work anymore

0 votes
Amit K
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 4, 2024

We are having same problem, it redirects to the localhost URL and do nothing. We are using the SourceTreeSetup-3.4.18.exe of the Source Tree. Appreciate if someone could share how to solve this isuse? 

Maxime Lepage July 12, 2024

Any solution ?

0 votes
lselden
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 6, 2022

For folks who can't get it to work in any browser - I finally managed to get in by using curl in a Git bash session (curl at windows command prompt still didn't work for some reason, but could be my particular environment):

1. open bash session

2. run curl against your localhost url, replacing https with http, i.e.:

$ curl -v "http://localhost:PORT/?code=CODE&state=authenticated"

 

FWIW:

* SourceTree (windows): 3.4.9

* curl (windows): 7.83.1

* curl (git bash): 7.73.0

Maxime Lepage July 12, 2024

Doesn't works for me...

0 votes
gilgen-zt May 8, 2020

I found another question about this topic.

https://community.atlassian.com/t5/Sourcetree-questions/Installation-problem-localhost-34106/qaq-p/984572

ali kamsari mentioned it could be an issue with chrome as default browser. So I changed temporarily my default browser to Edge and it work for me.

derentis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2020

Tried Firefox, Chrome and Edge (in that order), then thought perhaps it's not a browser issue so executed  netstat -ano | findstr "34106"  and there's nothing listening on that port.

Hey @Ana Retamal  and Atlassian team, *there's nothing listening on that port* so you definitely have a bug.

Perhaps the devs have a different local setup or the production build has a slightly different configuration or something, but whatever component is meant to be listening...isn't.

 

Steps to reproduce:
Download latest version (as of 3 August 2020) of SourceTree
Install
Try to connect account via OAuth

 

Log extract:
ERROR [2020-08-03 14:18:05,154] [1] [SourceTree.Exceptions.RemoteHostException] [Log] - Unable to receive callback from OAuth service provider
ERROR [2020-08-03 14:18:05,185] [1] [SourceTree.Exceptions.RemoteHostException] [Log] - Unable to get user secret
ERROR [2020-08-03 14:18:05,186] [1] [SourceTree.Exceptions.RemoteHostException] [Log] - Unable to get secret

 

Edit:
Found that even when uninstalling SourceTree, it leaves loads of garbage behind in your AppData folder.

Resolution:
Uninstall Sourcetree
Delete the following folders:
  C:\Users\{your username here}\AppData\Local\Atlassian
  C:\Users\{your username here}\AppData\Local\SourceTree
  C:\Users\{your username here}\AppData\Local\SquirrelTemp
Reboot (unsure if this helped or not but I rebooted so adding the step)
Reinstall SourceTree

Conclusion:
Atlassian needs to clean up their uninstall process.
This is likely a scenario that new users won't experience, but more specific to existing users upgrading to newer versions of SourceTree as was my case.

Richard Eastes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2020

I've just lost a day trying to fix this. Oauth is redirecting to an empty localhost page and then nothing happens in source tree.

Richard Eastes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2020

And for no apparent reason, it starts working again. I don't even get the satisfaction of knowing what I did to fix it.

0 votes
s_adnan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2020

Yes issue still exist in version 3.3.8. 

gilgen-zt May 8, 2020

I'm facing the same issue. Got a new notebook to set up.

I cannot install Bitbucket at all. I tried several versions (3.3.8, 3.3.6, 2.6.10 and 2.1.11.0) at the latest when updating to a newer version it all ends up in the above mentioned error.

 

I'm not able to use Bitbucket at the moment what is a very big problem...

Like Prabhu Mani likes this
0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2019

Hi, welcome to the Community!

I've asked the developers about this, and they replied that this is intended. That link is the callback used during OAuth flows, Sourcetree runs a local server to capture the OAuth tokens.

Hope that answers your question!

Ana

Anuem
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 21, 2019

But there is no local server running on my system, and the installation cannot proceed. Everytime I click on grant, nothing happens. This is definitely a bug.

Like # people like this
trucheromayor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 8, 2019

I´m in the same situation... :(

What to do ???

 

Thanks!!

Like # people like this
sk-pro-cloud
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2019

I seems very paltry that a that such a highly technical team would produce such a naive coding blunder.

Disappointed through out. 

Like # people like this
Seadna Smallwood June 5, 2019

This bug is happening for me too. I get this error:

Invalid redirect_uri

This integration is misconfigured. Contact the vendor for assistance.

Sergio June 11, 2019

There is some problem with that local server, i have created several accounts but after succesful login in my browser it's still waiting for login.

christianbohm
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 27, 2020

Almost a year has passed and this problem is still there! 

I cannot install latest version

Like Prabhu Mani likes this
Antonis Tsimourtos
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2020

Source tree Version 3.3.8 and problem still exist.

jwild_kingsbarn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 2, 2022

I'm not even using sourcetree, just trying to use the visual studio built in git support and it does this same thing to me... in 2022.

KiranKesarkar November 6, 2022

We are getting the same problem, it redirects to the localhost URL and does nothing. We are using the v3.8.10 of the source tree. Appreciate if someone could share how to solve this isuse ? 

Miroslav Stefan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 27, 2022

If you use windows, with Edge browser as default, try change your default browser from win settings, to Chrome.

Like Stepan.Len likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events