Atom fails to install on Windows when chef-client is running as a service. This was tested on Windows Server 2012R2 but other Windows versions may be similarly affected.
This issue could also be replicated by running chef-client as a user with a very long username.
2016-05-03 11:47:32> Program: Starting Squirrel Updater: --install . --Machine
2016-05-03 11:47:32> Program: Starting install, writing to C:\Windows\system32\config\systemprofile\AppData\Local\SquirrelTemp
2016-05-03 11:47:32> Program: About to install to: C:\Windows\SysWOW64\config\systemprofile\AppData\Local\atom
2016-05-03 11:47:32> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Windows\SysWOW64\config\systemprofile\AppData\Local\atom\packages\RELEASES'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at 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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__3f.MoveNext()
2016-05-03 11:47:32> CheckForUpdateImpl: Reading RELEASES file from C:\Windows\system32\config\systemprofile\AppData\Local\SquirrelTemp
2016-05-03 11:47:32> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2016-05-03 11:47:33> ApplyReleasesImpl: Writing files to app directory: C:\Windows\SysWOW64\config\systemprofile\AppData\Local\atom\app-1.7.3
2016-05-03 11:47:45> IEnableLogger: Failed to install package to app dir: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.Path.GetFullPath(String path)
at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractEntry(ZipEntry entry)
at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip(Stream inputStream, String targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, String fileFilter, String directoryFilter, Boolean restoreDateTime, Boolean isStreamOwner)
at Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClassb4.<<installPackageToAppDir>b__ad>d__bd.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<LogIfThrows>d__50`1.MoveNext()
Atom fails to install on Windows when chef-client is running as a service. This was tested on Windows Server 2012R2 but other Windows versions may be similarly affected.
This occurs due to Atom issue 5109: Path too long exception on Windows install as the default installation folder becomes
C:\Windows\SysWOW64\config\systemprofile\AppData\Local\atomwhich is too long once the contents of the archive are extracted here.This issue could also be replicated by running chef-client as a user with a very long username.
The log file during the installation process is available at
C:\Windows\SysWOW64\config\systemprofile\AppData\Local\SquirrelTemp\SquirrelSetup.log.and an excerpt from the logs is provided below: