Describe the bug
I installed ZeroTier One (1.4.6) on my Windows 10 machine (1903) and joined my network.
I also set the "start with windows" option in the preferences. Directly after the installation the tray icon worked just as expected.
After rebooting the system, the tray icon appeared for a few seconds and then vanished. When manually starting "ZeroTier One.exe", the tray icon also appears for a few moments just to disappear again.
When manually killing "zerotier-one_x64.exe" via task manager and restarting ZeroTier One, the tray icon appeared again, but it did neither show the node ID nor my network. The task icon also disappears/crashes when trying to open the preferences. This issue seems to be related to the stopped ZeroTierOneService, which is stopped when killing the application but is not restarted again when restarting "ZeroTier One.exe". After starting the ZeroTierOneService again the same issue as described above reappeared.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After rebooting the system I expect the ZeroTier One tray icon to be available just like after the fresh install to manage all the zero-tier related settings.
Screenshots
The cli works just fine, but there is no tray icon:

After I killed ZeroTier via task manager and restart it, the tray icon is basically broken - no node ID and an empty list of networks. This is propably due to the Service not being restarted properly as mentioned earlier:

Here is a short clip of what happens, when I try to manually start ZeroTier One (with the service running):

Desktop (please complete the following information):
I am seeing this as well; here's some information from Windows Event Viewer when the tray app crashes:
Application: ZeroTier One.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at WinUI.CentralAPI.UpdateRequestHeaders()
at WinUI.CentralAPI..ctor()
at WinUI.CentralAPI.get_Instance()
at WinUI.ToolbarItem+<>c__DisplayClass22_0.<updateStatus>b__0()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at WinUI.App.Main()
And here is the contents of the WER file:
锘縑ersion=1
EventType=CLR20r3
EventTime=132110343496847864
ReportType=2
Consent=1
UploadTime=132110343532505001
ReportStatus=268435456
ReportIdentifier=063b3564-3de0-4064-acac-00cebb9e73a4
IntegratorReportIdentifier=32cbeaad-9c6d-4520-a93a-8b05097c7578
Wow64Host=34404
Wow64Guest=332
NsAppName=ZeroTier One.exe
OriginalFilename=ZeroTier One.exe
AppSessionGuid=00004150-0001-0002-069f-db4da859d501
TargetAppId=W:0006f783d6139152313c9b20543f86269bce00000000!0000bd0c54693c36fa28fa9c2469c2ff5364e0bf428f!ZeroTier One.exe
TargetAppVer=2019//07//29:19:29:01!3e8144!ZeroTier One.exe
BootId=4294967295
ServiceSplit=1981743104
TargetAsId=819
IsFatal=1
EtwNonCollectReason=4
Response.BucketId=f8f791fdce922634e7a6215895e6bf93
Response.BucketTable=5
Response.LegacyBucketId=1704086173362077587
Response.type=4
Sig[0].Name=Problem Signature 01
Sig[0].Value=ZeroTier One.exe
Sig[1].Name=Problem Signature 02
Sig[1].Value=1.0.0.0
Sig[2].Name=Problem Signature 03
Sig[2].Value=5d3f48fd
Sig[3].Name=Problem Signature 04
Sig[3].Value=ZeroTier One
Sig[4].Name=Problem Signature 05
Sig[4].Value=1.0.0.0
Sig[5].Name=Problem Signature 06
Sig[5].Value=5d3f48fd
Sig[6].Name=Problem Signature 07
Sig[6].Value=d
Sig[7].Name=Problem Signature 08
Sig[7].Value=0
Sig[8].Name=Problem Signature 09
Sig[8].Value=System.NullReferenceException
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.18362.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=2beb
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=2beba6fb4680d73a8c78ca7c24ccdb46
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=0cad
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=0cad1d5652d45f259d4c13764aaae655
UI[2]=C:\Program Files (x86)\ZeroTier\One\ZeroTier One.exe
LoadedModule[0]=C:\Program Files (x86)\ZeroTier\One\ZeroTier One.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\SYSTEM32\MSCOREE.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNEL32.dll
LoadedModule[4]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[5]=C:\WINDOWS\SYSTEM32\apphelp.dll
LoadedModule[6]=C:\WINDOWS\SYSTEM32\AcLayers.DLL
LoadedModule[7]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[8]=C:\WINDOWS\System32\USER32.dll
LoadedModule[9]=C:\WINDOWS\System32\win32u.dll
LoadedModule[10]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[11]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[12]=C:\WINDOWS\System32\msvcp_win.dll
LoadedModule[13]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[14]=C:\WINDOWS\System32\SHELL32.dll
LoadedModule[15]=C:\WINDOWS\System32\cfgmgr32.dll
LoadedModule[16]=C:\WINDOWS\System32\shcore.dll
LoadedModule[17]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[18]=C:\WINDOWS\System32\SspiCli.dll
LoadedModule[19]=C:\WINDOWS\System32\CRYPTBASE.dll
LoadedModule[20]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[21]=C:\WINDOWS\System32\sechost.dll
LoadedModule[22]=C:\WINDOWS\System32\combase.dll
LoadedModule[23]=C:\WINDOWS\System32\windows.storage.dll
LoadedModule[24]=C:\WINDOWS\System32\advapi32.dll
LoadedModule[25]=C:\WINDOWS\System32\profapi.dll
LoadedModule[26]=C:\WINDOWS\System32\powrprof.dll
LoadedModule[27]=C:\WINDOWS\System32\UMPDC.dll
LoadedModule[28]=C:\WINDOWS\System32\shlwapi.dll
LoadedModule[29]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[30]=C:\WINDOWS\System32\cryptsp.dll
LoadedModule[31]=C:\WINDOWS\System32\OLEAUT32.dll
LoadedModule[32]=C:\WINDOWS\System32\SETUPAPI.dll
LoadedModule[33]=C:\WINDOWS\System32\bcrypt.dll
LoadedModule[34]=C:\WINDOWS\SYSTEM32\MPR.dll
LoadedModule[35]=C:\WINDOWS\SYSTEM32\sfc.dll
LoadedModule[36]=C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
LoadedModule[37]=C:\WINDOWS\SYSTEM32\PROPSYS.dll
LoadedModule[38]=C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
LoadedModule[39]=C:\WINDOWS\SYSTEM32\sfc_os.DLL
LoadedModule[40]=C:\WINDOWS\SYSTEM32\SortWindows61.dll
LoadedModule[41]=C:\WINDOWS\System32\IMM32.DLL
LoadedModule[42]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
LoadedModule[43]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[44]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
LoadedModule[45]=C:\WINDOWS\SYSTEM32\VCRUNTIME140_CLR0400.dll
LoadedModule[46]=C:\WINDOWS\SYSTEM32\ucrtbase_clr0400.dll
LoadedModule[47]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\mscorlib\2fd365eef9c2999c233994057e037e6b\mscorlib.ni.dll
LoadedModule[48]=C:\WINDOWS\System32\ole32.dll
LoadedModule[49]=C:\WINDOWS\system32\uxtheme.dll
LoadedModule[50]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System\3b82ac2a7aa1eb0957c2ba3eb9eaaa93\System.ni.dll
LoadedModule[51]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\PresentationCore\bca9a0d854d914dab4c185b5643eb002\PresentationCore.ni.dll
LoadedModule[52]=C:\WINDOWS\system32\rsaenh.dll
LoadedModule[53]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Presentatio5ae0f00f#\fe3be0ddd71190dab0559bff81e983e0\PresentationFramework.ni.dll
LoadedModule[54]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Core\84705775928cda4b16362bb96b8bc12c\System.Core.ni.dll
LoadedModule[55]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\WindowsBase\156861e2108bdfc6b447a8221eff17f5\WindowsBase.ni.dll
LoadedModule[56]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xaml\7f519460610808a56104a1722db7a02c\System.Xaml.ni.dll
LoadedModule[57]=C:\WINDOWS\SYSTEM32\dwrite.dll
LoadedModule[58]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll
LoadedModule[59]=C:\WINDOWS\SYSTEM32\MSVCP140_CLR0400.dll
LoadedModule[60]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\PresentationNative_v0400.dll
LoadedModule[61]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll
LoadedModule[62]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Configuration\d60f2999cd2ec3cd51c7ba6167d5ab8c\System.Configuration.ni.dll
LoadedModule[63]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xml\c4ffd21a36faf0241c78216a619f2623\System.Xml.ni.dll
LoadedModule[64]=C:\WINDOWS\System32\MSCTF.dll
LoadedModule[65]=C:\WINDOWS\SYSTEM32\urlmon.dll
LoadedModule[66]=C:\WINDOWS\SYSTEM32\iertutil.dll
LoadedModule[67]=C:\WINDOWS\SYSTEM32\WindowsCodecs.dll
LoadedModule[68]=C:\WINDOWS\SYSTEM32\DWMAPI.dll
LoadedModule[69]=C:\WINDOWS\SYSTEM32\d3d9.dll
LoadedModule[70]=C:\WINDOWS\SYSTEM32\dxcore.dll
LoadedModule[71]=C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_547eeefb57db4499\nvldumd.dll
LoadedModule[72]=C:\WINDOWS\System32\crypt32.dll
LoadedModule[73]=C:\WINDOWS\System32\MSASN1.dll
LoadedModule[74]=C:\WINDOWS\System32\WINTRUST.DLL
LoadedModule[75]=C:\WINDOWS\System32\imagehlp.dll
LoadedModule[76]=C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_547eeefb57db4499\nvd3dum.dll
LoadedModule[77]=C:\WINDOWS\SYSTEM32\WINMM.dll
LoadedModule[78]=C:\WINDOWS\SYSTEM32\winmmbase.dll
LoadedModule[79]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Presentatioaec034ca#\9d2a868c5dea06ce323b2ff9340dd7b4\PresentationFramework.Aero2.ni.dll
LoadedModule[80]=C:\WINDOWS\System32\psapi.dll
LoadedModule[81]=C:\WINDOWS\SYSTEM32\rasapi32.dll
LoadedModule[82]=C:\WINDOWS\SYSTEM32\rasman.dll
LoadedModule[83]=C:\WINDOWS\SYSTEM32\rtutils.dll
LoadedModule[84]=C:\WINDOWS\System32\WS2_32.dll
LoadedModule[85]=C:\WINDOWS\system32\mswsock.dll
LoadedModule[86]=C:\WINDOWS\SYSTEM32\winhttp.dll
LoadedModule[87]=C:\WINDOWS\System32\NSI.dll
LoadedModule[88]=C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
LoadedModule[89]=C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
LoadedModule[90]=C:\WINDOWS\SYSTEM32\DNSAPI.dll
LoadedModule[91]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Runteb92aa12#\6031b6bf010e37836cce5e0fd81ec07d\System.Runtime.Serialization.ni.dll
LoadedModule[92]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xml.Linq\8635e8acb0e225221a2faf53c431e68a\System.Xml.Linq.ni.dll
LoadedModule[93]=C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
LoadedModule[94]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Net.Http\e2254c3b4ea55b8b86bb2ae5c52fff47\System.Net.Http.ni.dll
LoadedModule[95]=C:\WINDOWS\SYSTEM32\WINNSI.DLL
LoadedModule[96]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
OsInfo[0].Key=vermaj
OsInfo[0].Value=10
OsInfo[1].Key=vermin
OsInfo[1].Value=0
OsInfo[2].Key=verbld
OsInfo[2].Value=18362
OsInfo[3].Key=ubr
OsInfo[3].Value=295
OsInfo[4].Key=versp
OsInfo[4].Value=0
OsInfo[5].Key=arch
OsInfo[5].Value=9
OsInfo[6].Key=lcid
OsInfo[6].Value=1033
OsInfo[7].Key=geoid
OsInfo[7].Value=244
OsInfo[8].Key=sku
OsInfo[8].Value=48
OsInfo[9].Key=domain
OsInfo[9].Value=0
OsInfo[10].Key=prodsuite
OsInfo[10].Value=256
OsInfo[11].Key=ntprodtype
OsInfo[11].Value=1
OsInfo[12].Key=platid
OsInfo[12].Value=10
OsInfo[13].Key=sr
OsInfo[13].Value=0
OsInfo[14].Key=tmsi
OsInfo[14].Value=2
OsInfo[15].Key=osinsty
OsInfo[15].Value=3
OsInfo[16].Key=iever
OsInfo[16].Value=11.295.18362.0-11.0.140
OsInfo[17].Key=portos
OsInfo[17].Value=0
OsInfo[18].Key=ram
OsInfo[18].Value=16333
OsInfo[19].Key=svolsz
OsInfo[19].Value=222
OsInfo[20].Key=wimbt
OsInfo[20].Value=0
OsInfo[21].Key=blddt
OsInfo[21].Value=190318
OsInfo[22].Key=bldtm
OsInfo[22].Value=1202
OsInfo[23].Key=bldbrch
OsInfo[23].Value=19h1_release
OsInfo[24].Key=bldchk
OsInfo[24].Value=0
OsInfo[25].Key=wpvermaj
OsInfo[25].Value=0
OsInfo[26].Key=wpvermin
OsInfo[26].Value=0
OsInfo[27].Key=wpbuildmaj
OsInfo[27].Value=0
OsInfo[28].Key=wpbuildmin
OsInfo[28].Value=0
OsInfo[29].Key=osver
OsInfo[29].Value=10.0.18362.295.amd64fre.19h1_release.190318-1202
OsInfo[30].Key=buildflightid
OsInfo[30].Value=54F644E9-73BD-4700-B3AF-3620273620BA.1
OsInfo[31].Key=edition
OsInfo[31].Value=Professional
OsInfo[32].Key=ring
OsInfo[33].Key=expid
OsInfo[34].Key=containerid
OsInfo[35].Key=containertype
OsInfo[36].Key=edu
OsInfo[36].Value=0
FriendlyEventName=Stopped working
ConsentKey=CLR20r3
AppName=ZeroTier One
AppPath=C:\Program Files (x86)\ZeroTier\One\ZeroTier One.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=A72212648D05571B00498E08E97EC0A4
MetadataHash=528964589
Exactly the same issue here.
ZeroTier 1.4.6
Windows 10 1903
I am getting the same thing.
ZeroTeir 1.4.6
Windows 10 1909
It was first happening with an older version. Updated to the most recent version and same issue with the same crash in the vent log.
I looked at one of my other computers that had a working ZeroTeir icon and noticed in
null
in it. On my working machine it has
{"server_url":"https://my.zerotier.com","api_key":null}
Replacing the central.conf on the broken machine has fixed the issue.
Excellent, tried this and it has worked for me. Thanks.
Thanks for tracking this down. Fix will be in next release
Most helpful comment
I looked at one of my other computers that had a working ZeroTeir icon and noticed in
null
in it. On my working machine it has
{"server_url":"https://my.zerotier.com","api_key":null}
Replacing the central.conf on the broken machine has fixed the issue.