Sourcetree not starting, log gives error about non-existing config file
Asked by Jan Timmerman:

Logfile states:

```
ERROR [2017-01-09 09:06:21,535] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...
System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---> System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.
```

Actions taken:

* Removing /AppData/Local/Atlassian/Sourcetree config folder (currently looking as attached)
* Removing ProgramData/Atlassian/Sourcetree folder
* Rebooting
* Reinstalling Sourcetree

image2017-1-9 9:21:22.png

Environment: "Windows 10, English, Locale: Dutch, US-int

Full log:

```
ERROR [2017-01-09 09:06:21,535] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---&gt; System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.at System.Xml.XmlTextReaderImpl.Throw(Exception e)at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)at System.Xml.XmlTextReaderImpl.ParseText()at System.Xml.XmlTextReaderImpl.ParseElementContent()at System.Xml.XmlTextReaderImpl.Skip()at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()--- End of inner exception stack trace ---at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)at SourceTree.App.SetStartupJIT()ERROR [2017-01-09 09:06:27,601] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---&gt; System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.at System.Xml.XmlTextReaderImpl.Throw(Exception e)at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)at System.Xml.XmlTextReaderImpl.ParseText()at System.Xml.XmlTextReaderImpl.ParseElementContent()at System.Xml.XmlTextReaderImpl.Skip()at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()--- End of inner exception stack trace ---at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)at SourceTree.App.SetStartupJIT()ERROR [2017-01-09 09:06:39,294] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---&gt; System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.at System.Xml.XmlTextReaderImpl.Throw(Exception e)at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)at System.Xml.XmlTextReaderImpl.ParseText()at System.Xml.XmlTextReaderImpl.ParseElementContent()at System.Xml.XmlTextReaderImpl.Skip()at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()--- End of inner exception stack trace ---at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)at SourceTree.App.SetStartupJIT()ERROR [2017-01-09 09:07:14,031] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---&gt; System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.at System.Xml.XmlTextReaderImpl.Throw(Exception e)at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)at System.Xml.XmlTextReaderImpl.ParseText()at System.Xml.XmlTextReaderImpl.ParseElementContent()at System.Xml.XmlTextReaderImpl.Skip()at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()--- End of inner exception stack trace ---at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)at SourceTree.App.SetStartupJIT()ERROR [2017-01-09 09:07:47,486] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---&gt; System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.at System.Xml.XmlTextReaderImpl.Throw(Exception e)at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)at System.Xml.XmlTextReaderImpl.ParseText()at System.Xml.XmlTextReaderImpl.ParseElementContent()at System.Xml.XmlTextReaderImpl.Skip()at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()--- End of inner exception stack trace ---at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)at SourceTree.App.SetStartupJIT()ERROR [2017-01-09 09:08:51,346] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---&gt; System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.at System.Xml.XmlTextReaderImpl.Throw(Exception e)at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)at System.Xml.XmlTextReaderImpl.ParseText()at System.Xml.XmlTextReaderImpl.ParseElementContent()at System.Xml.XmlTextReaderImpl.Skip()at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()--- End of inner exception stack trace ---at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)at SourceTree.App.SetStartupJIT()ERROR [2017-01-09 09:09:44,484] [1] [SourceTree.App] [SetStartupJIT] - Startup JIT encountered an error...System.Configuration.ConfigurationErrorsException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1. (C:\Users\jtimmerman\AppData\Local\Atlassian\SourceTree.exe_Url_yjhzxxhcu2ommegrdorjf3q1oqllqxiq\1.9.10.0\user.config line 15) ---&gt; System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 15, position 1.at System.Xml.XmlTextReaderImpl.Throw(Exception e)at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)at System.Xml.XmlTextReaderImpl.ParseText()at System.Xml.XmlTextReaderImpl.ParseElementContent()at System.Xml.XmlTextReaderImpl.Skip()at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()--- End of inner exception stack trace ---at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath, Boolean preLoad)at SourceTree.App.SetStartupJIT()
```

user.config  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/2134/1/user.config){#display_117248438f06df_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-not-starting-log-gives-error-about-non-existing/qaq-p/75439?attachment-id=9533){#link_117248438f06df}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/2134/2/image2017-1-9%209%3A21%3A22.png){#display_117248438f06df_2}


Answers:
author: GarethYR
body: I'm guessing it's something to do with the recent update - when I looked in my user.config file it's pretty clearly messed up (I've attached it in case it's useful to someone). I replaced it with my user.config from the previous version of sourcetree and it seems to be working fine.

I'm not sure if this happened to anyone else having this problem, but I had the invalid dictionaries problem (mentioned [here](https://answers.atlassian.com/questions/44898447/after-updating-to-1.9.9.20-i-get-an-invalid-dictionary-notification-every-time-i-start-up-but-it-doesnt-list-any-invalid-files)), which I solved at the time using Isaac Goh's solution to that issue. After resetting my user.config to a previous version, that problem showed up again, but everything seems to work fine after repeating Isaac Goh's solution to it.


author: John Kosinski
body: I fixed the problem for my machine; the answer I found here:

<https://community.atlassian.com/t5/SourceTree-questions/Source-Tree-for-Windows-does-not-start/qaq-p/26688>

What worked for me was to delete everything in

C:\\Users\\%USERNAME%\\AppData\\Local\\Atlassian\\SourceTree,

and also delete all of the

C:\\Users\\%USERNAME%\\AppData\\Local\\Atlassian\\Sourcetree\[long hash\] directories

comments: author: Prakash Gudipati
body: this worked for me.


author: Jan Timmerman
body: I went back to an older version of sourcetree, which fixed my problem.

<https://community.atlassian.com/t5/SourceTree-questions/restore-older-version-of-SourceTree/qaq-p/292830>

Just applied the latest update again, let's see if it keeps working now :)

comments: author: Jan Timmerman
body: Nope. Back on 1.8.2.11


author: atwellpub
body: This is happening to me as well.

comments: author: John Kosinski
body: Same issue here; makes SOURCETREE COMPLETELY UNUSABLE