问题描述
- fork版本管理工具用的好好的,突然有一天早上就用不了!
- 卸载fork,重新安装,往复多次无果,且找不到任何错误日志。
- 转战SourceTree版本管理工具,安装的时候报同样的错误。
- 找到SourceTree的错误日志,网络上大多回复都是卸载重装及其相关教程。
- 按照网络相关教程重试无果。
以下是相关错误日志
-
fork
-
安装完后弹窗报错,点击查看错误日志没有反应
There was an error while installing the application. Check the setup log for more information and contact the author.
-
以下路径日志并无异常
- C:\Users\Administrator\AppData\Local\SquirrelTemp\Squirrel-Install.log
- C:\Users\Administrator\AppData\Local\Fork\logs\fork.log
-
-
sourcetree
-
安装日志报错
C:\Users\Administrator\AppData\Local\SquirrelTemp\SquirrelSetup.log
CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: 未能找到路径“C:\Users\Administrator\AppData\Local\SourceTree\packages\.betaId”的一部分。 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 在 System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) 在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) 在 System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) 在 System.IO.File.WriteAllText(String path, String contents, Encoding encoding) 在 Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId() 2023-10-11 11:03:31> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: 未能找到路径“C:\Users\Administrator\AppData\Local\SourceTree\packages\RELEASES”的一部分。 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 在 Squirrel.Utility.LoadLocalReleases(String localReleaseFile) 在 Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
-
执行日志文件报错
C:\Users\Administrator\AppData\Local\Atlassian\SourceTree\sourcetree.log
ERROR [2023-10-11 11:00:25,169] [1] [SourceTree.App] [Log] - “System.Windows.Automation.Peers.AutomationPeer”的类型初始值设定项引发异常。 System.TypeInitializationException: “System.Windows.Automation.Peers.AutomationPeer”的类型初始值设定项引发异常。 ---> System.TypeLoadException: 程序集“PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”中的类型“MS.Internal.Automation.SelectionProviderWrapper”的方法“GetSelection”没有实现。 在 System.Windows.Automation.Peers.AutomationPeer.Initialize() 在 System.Windows.Automation.Peers.AutomationPeer..cctor() --- 内部异常堆栈跟踪的结尾 --- 在 System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus) 在 System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp) 在 System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) 在 System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) 在 System.Windows.Input.KeyboardDevice.Focus(IInputElement element) 在 System.Windows.Interop.HwndKeyboardInputProvider.OnSetFocus(IntPtr hwnd) 在 System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) ERROR [2023-10-11 11:00:25,186] [1] [SourceTree.App] [Log] - “System.Windows.Automation.Peers.AutomationPeer”的类型初始值设定项引发异常。 System.TypeInitializationException: “System.Windows.Automation.Peers.AutomationPeer”的类型初始值设定项引发异常。 ---> System.TypeLoadException: 程序集“PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”中的类型“MS.Internal.Automation.SelectionProviderWrapper”的方法“GetSelection”没有实现。 在 System.Windows.Automation.Peers.AutomationPeer.Initialize() 在 System.Windows.Automation.Peers.AutomationPeer..cctor()
-
解决方案
-
就在精神崩溃神魂迷离之际~~~偶然间看到了这篇文章 [一道光](https://getquicker.net/KC/Kb/Article/1092)
-
想起来昨天晚上有个window系统补丁更新【我的手贱点击了更新并关机】
-
依照文中所描述卸载昨天晚上的更新,fork和SourceTree都可以正常使用了!
-
windows10卸载更新说明
-
按一下windows键,在搜索栏中输入:更新设置
-
点击:查看更新历史记录
-
点击卸载更新
-
通过安装时间判断哪些是最近系统更新的文件。
-
右键卸载后,重启系统就可以正常使用了!
-