Shadowsocks-windows: 4.0.4版本报错 - Shadowsocks.Util.SystemProxy.Sysproxy.SetIEProxy

Created on 12 Jun 2017  ·  16Comments  ·  Source: shadowsocks/shadowsocks-windows

1497262524 1

[2017-06-12 18:11:31] Shadowsocks started
[2017-06-12 18:11:40] Shadowsocks started
[2017-06-12 18:11:40] [E] System.NullReferenceException: 未将对象引用设置到对象的实例。
   在 Shadowsocks.Util.SystemProxy.Sysproxy.SetIEProxy(Boolean enable, Boolean global, String proxyServer, String pacURL)
   在 Shadowsocks.Controller.SystemProxy.Update(Configuration config, Boolean forceDisable, PACServer pacSrv)
   在 Shadowsocks.Controller.ShadowsocksController.Reload()
   在 Shadowsocks.Program.Main()
[2017-06-12 18:11:44] System.Reflection.TargetInvocationException: 操作过程中出现异常,结果无效。  有关异常的详细信息,请查看 InnerException。 ---> System.Net.WebException: 无法连接到远程服务器 ---> System.Net.Sockets.SocketException: 由于目标计算机积极拒绝,无法连接。 127.0.0.1:1080
   在 System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- 内部异常

堆栈跟踪的结尾 ---
   在 System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   在 System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   在 System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   在 Shadowsocks.Controller.UpdateChecker.http_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)
[2017-06-12 18:11:55] Shadowsocks started
[2017-06-12 18:11:55] [E] System.NullReferenceException: 未将对象引用设置到对象的实例。
   在 Shadowsocks.Util.SystemProxy.Sysproxy.SetIEProxy(Boolean enable, Boolean global, String proxyServer, String pacURL)
   在 Shadowsocks.Controller.SystemProxy.Update(Configuration config, Boolean forceDisable, PACServer pacSrv)
   在 Shadowsocks.Controller.ShadowsocksController.Reload()
   在 Shadowsocks.Program.Main()

但是我拷贝了一份,放在一个新的目录下,重新打开是可以正常运行的,怀疑是不是一些老的配置不兼容

Most helpful comment

请关闭SS,删除同文件夹下的user-wininet.json后,重试运行

All 16 comments

看上去和 #1178 类似

请关闭SS,删除同文件夹下的user-wininet.json后,重试运行

重新拷贝一份新的Shadowsocks.exe放在一个新的目录下,就可以运行了。

我也遇到了类似问题
[2017-06-20 00:32:22] [E] System.TypeInitializationException: “MS.Win32.Penimc.UnsafeNativeMethods”的类型初始值设定项引发异常。 ---> System.Runtime.InteropServices.COMException: DLL 中出错 (异常来自 HRESULT:0x800401F9 (CO_E_ERRORINDLL)) 在 MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) 在 MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager() 在 MS.Win32.Penimc.UnsafeNativeMethods..cctor() --- 内部异常堆栈跟踪的结尾 --- 在 MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle) 在 System.Windows.Input.PenThreadWorker..ctor() 在 System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext) 在 System.Windows.Input.PenThreadPool.GetPenThreadForPenContext(PenContext penContext) 在 System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl() 在 System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets() 在 System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor() 在 System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices() 在 System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(InputManager inputManager, PresentationSource inputSource) 在 System.Windows.Interop.HwndStylusInputProvider..ctor(HwndSource source) 在 System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters) 在 GlobalHotKey.HotKeyManager..ctor() 在 Shadowsocks.Controller.Hotkeys.HotKeys.Init(ShadowsocksController controller) 在 Shadowsocks.Program.Main()
尝试了重启,换目录,换版本,删除记录和配置文件等
请问如何解决?

请尝试升级到最新的 .Net 框架:
https://www.microsoft.com/zh-CN/download/details.aspx?id=55170

如果提示已经安装,请尝试修复。

已经更新了.net还有删除temp文件夹,问题如故。只能用回4.0.2

@yunooo 贴一下你的error log

shadowsocks已停止工作

@287257255 请尝试将 Shadowsocks.exe 所在目录下的 gui-config.json 更名再启动看看。

@chenshaoju 仍然不行,我准备降回3.32了,公司的破电脑不想升级net框架

@287257255 新版本要求最新 4.6.2 。。。

更新.net到4.7,我没效果。我把目录下的user-wininet.json删了就行了。
实在不行,你可以只复制一个exe到其他文件夹下试试~~~

删除这个文件user-wininet.json就可以了,相同错误已解决

我删除了除gui-config,Shadowsocks外所有文件(夹),重新运行正常

是不是装360了?

Pull Request #1232 is trying to fix this issue

Was this page helpful?
0 / 5 - 0 ratings