Update 2.3.1 broke my setup. Error: failed to import extension sourcetree_auth Edited

I just allowed SourceTree to upgrade to 2.3.1 and my team's BitBucket repository immediately stopped working for me. I get this error as soon as I click Pull (Fetch is disabled):
[SCREENSHOT IN REPLY BELOW]  
Error
*** failed to import extension sourcetree_auth from C:\Users\...\AppData\Local\SourceTree\app-2.3.1\extras\hget\sourctree_hg_auth.py: [Errno 2] No such file or directory: ...
abort: http authorization required for https://bitbucket.org/...
Just to see, I tried copying that .py file over from app-2.1.11\extras\hgext (both with and without its .pyc file) and that yielded a different, very uninformative error:
[SCREENSHOT IN REPLY BELOW] 
Error
abort: authorization failed
SIDE NOTE: Please note that Ctrl+C does not work with SourceTree's messageboxes, so I had to either use Alt+PrtScr here or manually retype the whole message. This could make it harder for others to find information online about errors they encounter. (To avoid this issue, I've done both.)
SIDE NOTE 2: Pasting screenshots into your image uploader worked fine on my screen, but when I clicked Publish, I got many repeat copies of my first screenshot, and everything after it got blown away. (Fortunately, I had used Ctrl +A Ctrl+C to "back up" to clipboard first.) I tried editing the post, saving my screenshots to disk first, then using the visible controls on the image uploader. That didn't work either, so I moved the images into separate replies.
WORKAROUND: Fortunately, your website still had 2.1.11 as the downloadable version, so I uninstalled SourceTree and then reinstalled that older version. I'm back up and running now, but afraid to update.

5 answers

I solve it after reading the Release Notes: https://www.sourcetreeapp.com/update/windows/ga/ReleaseNotes_2.3.1.html

 

There is this note you need to follow:

 

Additional steps to Upgrade after installation.
  • In order to activate the new Mercurial Credential Manager extension it is necessary to switch to using embedded Mercurial and update to v4.3.1 in the Tools/Options/Mercurial tab

hope it helps.

forgot that also need to copy the python script from 2.1.11 (sourctree_hg_auth.py) referred in the first post, I did not copied the compiled one, just the source.

That fixed it.  Guess it pays to RTFM!  I had issues with the embedded version in launching kdiff previously.  Fingers crossed.

Maybe a warning could be added to inform users that they need to be using the embedded version.

After I tested it with the embebed I installed the full Mercurial 4.3.1 and worked fine too.

I was in the same boat.  Very frustrating for something that should be able to be considered commercial software.  I had to do the Update Embedded Mercurial which flashed download messages so quickly I did not have time to read them, then ponder where that got downloaded to when I did the Use Embedded Mercurial to select the hg.exe file.  If you don't automatically know, and are taken to the last folder Sourcetree opened, (for Win10 users) you can navigate to:

C:\Users\[USER]\AppData\Local\Atlassian\SourceTree\hg_local

to select the hg.exe.

of course the AppData folder is hidden by default.

I already was using Embedded Mercurial.  I ran the update.
I still got the error.  I tried to follow Kelly's instruction to find the hg.exe file but could not find hg.exe  However when I exited source tree and then reloaded I was able to pull my code successfully.

same applies to me, work come to a halt. cannot pull changesets. it can see the repo though and show history 

updating the embedded Mercurial and making sure it was chosen worked for me - but only after exiting and restarting Sourcetree. And it didn't even want to start from any of teh shortcuts - only from the actual .exe inside C:\Users\[username]\AppData\Local\SourceTree\app-2.3.1

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

30,469 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you