Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Startup #381

Closed
etraff opened this issue Jun 27, 2017 · 19 comments
Closed

Crash on Startup #381

etraff opened this issue Jun 27, 2017 · 19 comments

Comments

@etraff
Copy link

etraff commented Jun 27, 2017

OS: Win 10

Version: 1.1.16.0; Variant: Portable; Arch: X86
Path: C:\Users\artist\Desktop\SyncTrayzorPortable-x86\SyncTrayzor.exe
System.Exception: Unable to find Syncthing at path 
   bei SyncTrayzor.Syncthing.SyncthingProcessRunner.Start() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingProcessRunner.cs:Zeile 104.
   bei SyncTrayzor.Syncthing.SyncthingManager.<StartAsync>d__120.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 193.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Utils.SafeSyncthingExtensions.<StartWithErrorDialogAsync>d__0.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Utils\SafeSyncthingExtensions.cs:Zeile 17.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Pages.ShellViewModel.<Start>d__42.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\ShellViewModel.cs:Zeile 92.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@etraff
Copy link
Author

etraff commented Jun 27, 2017

Found the Error, two instances of SyncTrayzor Running with syncthign using the same port for GUI
please mark es solved

@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

Is that the actual message, or does the third line actually say "System.Exception: Unable to find Syncthing at path C:\Users<You>\Whatever"?

@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

No, two instances of SyncTrayzor running together will not cause that error. It was more likely your AntiVirus removing syncthing after SyncTrayzor started, but I can't be sure from the information I've got so far.

@etraff
Copy link
Author

etraff commented Jun 27, 2017

This is the actual messege which I copy & pasted

@etraff
Copy link
Author

etraff commented Jun 27, 2017

So in Settings under Listen Adress for the GUI I changes the default port from 8384 to 8380 on one and to 8381 on the other instance, now it works

@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

Again, multiple instances won't cause that error. It's looking for syncthing.exe, but it hasn't been told where to look, for some reason.

Can you post (or email me) your entire log file? Go to Settings -> Logging + STTRACE -> Show SyncTrayzor Log File.

@etraff
Copy link
Author

etraff commented Jun 27, 2017

Here is the complete Log:

2017-06-27 17:07:36.5994 #9408 [Debug] SyncTrayzor.Bootstrapper: SyncTrazor version 1.1.16.0 (Amd64) started at C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\SyncTrayzor.exe (.NET version: 4.6.2 on Windows 10 Anniversary Update systems (394802)) 
2017-06-27 17:07:36.6324 #9408 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: LogFilePath: C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\logs 
2017-06-27 17:07:36.6324 #9408 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: SyncthingBackupPath: C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\syncthing.exe 
2017-06-27 17:07:36.6324 #9408 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: ConfigurationFilePath: C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\data\config.xml 
2017-06-27 17:07:36.6324 #9408 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: ConfigurationFileBackupPath: C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\data\config-backups 
2017-06-27 17:07:36.6324 #9408 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: CefCachePath: C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\data\cef\cache 
2017-06-27 17:07:36.6324 #9408 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: DefaultSyncthingPath: C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\data\syncthing.exe 
2017-06-27 17:07:36.6324 #9408 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: DefaultSyncthingHomePath: C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\data\syncthing 
2017-06-27 17:07:36.6484 #9408 [Debug] SyncTrayzor.Services.Ipc.IpcCommsClientFactory: Checking for other SyncTrayzor processes 
2017-06-27 17:07:36.6484 #9408 [Error] SyncTrayzor.Services.Ipc.IpcCommsClientFactory: Error accessing information for process with PID 4852 System.ComponentModel.Win32Exception Zugriff verweigert Microsoft.Win32.SafeHandles.SafeProcessHandle OpenProcess(Int32, Int32, Boolean)    bei System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   bei System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId, Boolean firstModuleOnly)
   bei System.Diagnostics.NtProcessManager.GetFirstModuleInfo(Int32 processId)
   bei System.Diagnostics.Process.get_MainModule()
   bei SyncTrayzor.Services.Ipc.IpcCommsClientFactory.TryCreateClient() in C:\projects\synctrayzor\src\SyncTrayzor\Services\Ipc\IpcCommsClientFactory.cs:Zeile 34. System.ComponentModel.Win32Exception (0x80004005): Zugriff verweigert
   bei System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   bei System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId, Boolean firstModuleOnly)
   bei System.Diagnostics.NtProcessManager.GetFirstModuleInfo(Int32 processId)
   bei System.Diagnostics.Process.get_MainModule()
   bei SyncTrayzor.Services.Ipc.IpcCommsClientFactory.TryCreateClient() in C:\projects\synctrayzor\src\SyncTrayzor\Services\Ipc\IpcCommsClientFactory.cs:Zeile 34.
2017-06-27 17:07:36.6714 #9408 [Error] SyncTrayzor.Services.Ipc.IpcCommsClientFactory: Error accessing information for process with PID 8888 System.ComponentModel.Win32Exception Zugriff verweigert Microsoft.Win32.SafeHandles.SafeProcessHandle OpenProcess(Int32, Int32, Boolean)    bei System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   bei System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId, Boolean firstModuleOnly)
   bei System.Diagnostics.NtProcessManager.GetFirstModuleInfo(Int32 processId)
   bei System.Diagnostics.Process.get_MainModule()
   bei SyncTrayzor.Services.Ipc.IpcCommsClientFactory.TryCreateClient() in C:\projects\synctrayzor\src\SyncTrayzor\Services\Ipc\IpcCommsClientFactory.cs:Zeile 34. System.ComponentModel.Win32Exception (0x80004005): Zugriff verweigert
   bei System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   bei System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId, Boolean firstModuleOnly)
   bei System.Diagnostics.NtProcessManager.GetFirstModuleInfo(Int32 processId)
   bei System.Diagnostics.Process.get_MainModule()
   bei SyncTrayzor.Services.Ipc.IpcCommsClientFactory.TryCreateClient() in C:\projects\synctrayzor\src\SyncTrayzor\Services\Ipc\IpcCommsClientFactory.cs:Zeile 34.
2017-06-27 17:07:36.6714 #9408 [Debug] SyncTrayzor.Services.Ipc.IpcCommsClientFactory: Did not find any other processes, or they all responded with an error 
2017-06-27 17:07:36.6964 #9408 [Debug] SyncTrayzor.Services.Config.ConfigurationProvider: Loaded default configuration: <Configuration ShowTrayIconOnlyOnClose=False MinimizeToTray=False CloseToTray=True ShowDeviceConnectivityBalloons=True ShowDeviceOrFolderRejectedBalloons=True SyncthingAddress=localhost:8384 StartSyncthingAutomatically=True SyncthingCommandLineFlags=[]SyncthingApiKey= SyncthingEnvironmentalVariables=[] SyncthingDenyUpgrade=False SyncthingPriorityLevel=Normal Folders=[] NotifyOfNewVersions=True LatestNotifiedVersion= ObfuscateDeviceIDs=True UseComputerCulture=True SyncthingConsoleHeight=100 WindowPlacement= SyncthingWebBrowserZoomLevel=0 LastSeenInstallCount=0 SyncthingCustomPath= SyncthingCustomHomePath= ShowSynchronizedBalloonEvenIfNothingDownloaded=False DisableHardwareRendering=False EnableFailedTransferAlerts=True EnableConflictFileMonitoring=True SyncthingDebugFacilities=[] ConflictResolverDeletesToRecycleBin=True PauseDevicesOnMeteredNetworks=True HaveDonated=False IconAnimationMode=DataTransferring OpenFolderCommand=explorer.exe "{0}" ShowFileInFolderCommand=explorer.exe /select, "{0}"> 
2017-06-27 17:07:36.7074 #9408 [Debug] SyncTrayzor.Services.Config.ConfigurationProvider: Found existing configuration at C:\Users\studioMichael\Desktop\SyncTrayzorPortable-x64\data\config.xml 
2017-06-27 17:07:36.7694 #9408 [Info] SyncTrayzor.Services.AutostartProvider: Have read/write access to the registry 
2017-06-27 17:07:37.0644 #9408 [Info] SyncTrayzor.Services.Conflicts.ConflictFileWatcher: Refreshing conflicted files. Found 0 from 0 options 
2017-06-27 17:07:37.5415 #9408 [Debug] SyncTrayzor.Syncthing.SyncthingProcessRunner: SyncthingProcessRunner.Start called 
2017-06-27 17:07:37.5415 #9408 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Starting syncthing:  
2017-06-27 17:07:37.5415 #9408 [Debug] SyncTrayzor.Bootstrapper: Cleaning up config folder path 
2017-06-27 17:07:37.5565 #9408 [Error] SyncTrayzor.Bootstrapper: An unhandled exception occurred System.Net.Sockets.SocketException Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig Void DoBind(System.Net.EndPoint, System.Net.SocketAddress)    bei System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   bei System.Net.Sockets.Socket.Bind(EndPoint localEP)
   bei System.Net.Sockets.TcpListener.Start(Int32 backlog)
   bei SyncTrayzor.Syncthing.FreePortFinder.FindFreePort(Int32 startingPort) in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\FreePortFinder.cs:Zeile 37.
   bei SyncTrayzor.Syncthing.SyncthingManager.<ProcessStarting>d__132.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 398.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) System.Net.Sockets.SocketException (0x80004005): Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig
   bei System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   bei System.Net.Sockets.Socket.Bind(EndPoint localEP)
   bei System.Net.Sockets.TcpListener.Start(Int32 backlog)
   bei SyncTrayzor.Syncthing.FreePortFinder.FindFreePort(Int32 startingPort) in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\FreePortFinder.cs:Zeile 37.
   bei SyncTrayzor.Syncthing.SyncthingManager.<ProcessStarting>d__132.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 398.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2017-06-27 17:07:37.6265 #9408 [Error] SyncTrayzor.Bootstrapper: An unhandled exception occurred System.Exception Unable to find Syncthing at path  Void Start()    bei SyncTrayzor.Syncthing.SyncthingProcessRunner.Start() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingProcessRunner.cs:Zeile 104.
   bei SyncTrayzor.Syncthing.SyncthingManager.<StartAsync>d__120.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 193.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Utils.SafeSyncthingExtensions.<StartWithErrorDialogAsync>d__0.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Utils\SafeSyncthingExtensions.cs:Zeile 17.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Pages.ShellViewModel.<Start>d__42.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\ShellViewModel.cs:Zeile 92.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) System.Exception: Unable to find Syncthing at path 
   bei SyncTrayzor.Syncthing.SyncthingProcessRunner.Start() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingProcessRunner.cs:Zeile 104.
   bei SyncTrayzor.Syncthing.SyncthingManager.<StartAsync>d__120.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 193.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Utils.SafeSyncthingExtensions.<StartWithErrorDialogAsync>d__0.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Utils\SafeSyncthingExtensions.cs:Zeile 17.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Pages.ShellViewModel.<Start>d__42.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\ShellViewModel.cs:Zeile 92.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2017-06-27 17:07:37.6515 #9408 [Debug] SyncTrayzor.Services.UpdateManagement.UpdateNotificationClient: Fetched updates response: <UpdateNotificationResponse data= error=> 
2017-06-27 17:07:37.6515 #9408 [Info] SyncTrayzor.Services.UpdateManagement.UpdateChecker: No updates available 
2017-06-27 17:07:39.0275 #9408 [Error] SyncTrayzor.Bootstrapper: Unhandled exception while trying to display unhandled exception window System.Exception Unable to find Syncthing at path  Void Start()    bei SyncTrayzor.Syncthing.SyncthingProcessRunner.Start() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingProcessRunner.cs:Zeile 104.
   bei SyncTrayzor.Syncthing.SyncthingManager.<StartAsync>d__120.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 193.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Utils.SafeSyncthingExtensions.<StartWithErrorDialogAsync>d__0.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Utils\SafeSyncthingExtensions.cs:Zeile 17.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Pages.ShellViewModel.<Start>d__42.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\ShellViewModel.cs:Zeile 92.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Windows.Threading.DispatcherOperation.Invoke()
   bei System.Windows.Threading.Dispatcher.ProcessQueue()
   bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Window.ShowHelper(Object booleanBox)
   bei System.Windows.Window.ShowDialog()
   bei SyncTrayzor.Bootstrapper.OnUnhandledException(DispatcherUnhandledExceptionEventArgs e) in C:\projects\synctrayzor\src\SyncTrayzor\Bootstrapper.cs:Zeile 309. System.Exception: Unable to find Syncthing at path 
   bei SyncTrayzor.Syncthing.SyncthingProcessRunner.Start() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingProcessRunner.cs:Zeile 104.
   bei SyncTrayzor.Syncthing.SyncthingManager.<StartAsync>d__120.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 193.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Utils.SafeSyncthingExtensions.<StartWithErrorDialogAsync>d__0.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Utils\SafeSyncthingExtensions.cs:Zeile 17.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei SyncTrayzor.Pages.ShellViewModel.<Start>d__42.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\ShellViewModel.cs:Zeile 92.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Windows.Threading.DispatcherOperation.Invoke()
   bei System.Windows.Threading.Dispatcher.ProcessQueue()
   bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Window.ShowHelper(Object booleanBox)
   bei System.Windows.Window.ShowDialog()
   bei SyncTrayzor.Bootstrapper.OnUnhandledException(DispatcherUnhandledExceptionEventArgs e) in C:\projects\synctrayzor\src\SyncTrayzor\Bootstrapper.cs:Zeile 309.
2017-06-27 17:07:39.0275 #9408 [Error] SyncTrayzor.Bootstrapper: An unhandled AppDomain exception occurred. Terminating: True System.Net.Sockets.SocketException Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig Void DoBind(System.Net.EndPoint, System.Net.SocketAddress)    bei System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   bei System.Net.Sockets.Socket.Bind(EndPoint localEP)
   bei System.Net.Sockets.TcpListener.Start(Int32 backlog)
   bei SyncTrayzor.Syncthing.FreePortFinder.FindFreePort(Int32 startingPort) in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\FreePortFinder.cs:Zeile 37.
   bei SyncTrayzor.Syncthing.SyncthingManager.<ProcessStarting>d__132.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 398.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Windows.Threading.DispatcherOperation.Invoke()
   bei System.Windows.Threading.Dispatcher.ProcessQueue()
   bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Application.RunDispatcher(Object ignore)
   bei System.Windows.Application.RunInternal(Window window)
   bei SyncTrayzor.App.Main() System.Net.Sockets.SocketException (0x80004005): Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig
   bei System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   bei System.Net.Sockets.Socket.Bind(EndPoint localEP)
   bei System.Net.Sockets.TcpListener.Start(Int32 backlog)
   bei SyncTrayzor.Syncthing.FreePortFinder.FindFreePort(Int32 startingPort) in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\FreePortFinder.cs:Zeile 37.
   bei SyncTrayzor.Syncthing.SyncthingManager.<ProcessStarting>d__132.MoveNext() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingManager.cs:Zeile 398.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Windows.Threading.DispatcherOperation.Invoke()
   bei System.Windows.Threading.Dispatcher.ProcessQueue()
   bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Application.RunDispatcher(Object ignore)
   bei System.Windows.Application.RunInternal(Window window)
   bei SyncTrayzor.App.Main()

@etraff
Copy link
Author

etraff commented Jun 27, 2017

it only accours if you bind the GUI to 0.0.0.0:portx - so localhost:portx won't crash,

Anitvirus is Avast - so maybe it has something to do with it, you never know with this damned snake oil :-)

@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

Looking through the log, something else is broken too: it should successfully find a free port to start Syncthing on, but that's failing.

@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

Aah, I follow. That first error caused the error which you reported. Nothing to do with AV in this case.

canton7 added a commit that referenced this issue Jun 27, 2017
User reported that FreePortFinder was failing to find a free port when
another instance of Syncthing was running - it was rethrowing the exception
after the first attempt, which means it's a SocketError I wasn't anticipating.
There isn't enough information to say what SocketError it was though.

Just continue on all of them. We'll give up after a few anyway.

Fixes #381
@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

Mind trying this build (when it finishes) with the gui listen addresses / ports which made it crash before? https://ci.appveyor.com/project/canton7/synctrayzor/build/1.1.16.472/artifacts . Thanks!

@etraff
Copy link
Author

etraff commented Jun 27, 2017

Sure, I hava a look at it in the next minutes

@etraff
Copy link
Author

etraff commented Jun 27, 2017

Crap, this built is getting blocked now by avast
https://picload.org/image/rprwloii/unbenannt.jpg

@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

Hah, nice.

@etraff
Copy link
Author

etraff commented Jun 27, 2017

Okay, the new Version does not crash, it just picks the next free port:
https://img3.picload.org/image/rprwlpii/unbenannt.png

@canton7
Copy link
Owner

canton7 commented Jun 27, 2017

Awesome, thanks for checking.

@jebeld17
Copy link

jebeld17 commented Jul 4, 2017

See #354

@jebeld17
Copy link

jebeld17 commented Jul 4, 2017

@etraff, I had a similar issue with Kaspersky in the past. Kaspersky's heuristics blocked Syncthing, not at the fault at the developers of either program, though. Kaspersky's machine learning simply did what it was meant to do: block things it may deem a threat, because of permissions the app may or may not have, being an otherwise 'unknown' program with different code, etc..
I'd suggest moving the Syncthing and Synctrayzor Program Files (or Program Files (x86)) folders to a whitelist, and file a "false positive" report with Avast here: https://www.avast.com/false-positive-file-form.php

Note I didn't even need to whitelist the programs; Kaspersky's team got in contact with me right away to update their whitelists and improve their heuristics. :-)

@canton7
Copy link
Owner

canton7 commented Jul 5, 2017

#354 is a completely different issue.

This issue turned out to be unrelated to AV - I thought it was due to AV at the start, but I was wrong.

@canton7 canton7 closed this as completed in fad5fb6 Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants