This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Issue building atom on Windows #14264
Copy link
Copy link
Closed
Labels
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
In attempting to build Atom from source on Windows 10, I am presented with an issue that a "path, file name, or both are too long".
Steps to Reproduce
- Checkout latest commit (currently 1fc23c3)
script/build --create-windows-installer --compress-artifacts
Expected behavior: Atom builds, providing installer
Actual behavior: Build fails during creation of installer
Reproduces how often: 100%
Versions
OS: Windows 10 Pro x64
Node: v6.10.2
NPM: v3.10.10
Python: 2.7.12
Also, I am using Visual C++ Build Tools 2015.
Additional Information
My repo is checked out to c:\atom to get the path as short as possible. I have run npm dedupe on my node_modules in both the repo base and the 'out' directories at different points to attempt to get rid of this error - I am using NPMv3 so I believe this is not needed anyway.
Here is a snippet of the build output with debugging:
Verifying if snapshot can be executed via `mksnapshot`
Generating startup blob at "C:\atom\out\snapshot_blob.bin"
Moving generated startup blob into "C:\atom\out\Atom x64\snapshot_blob.bin"
Skipping code-signing. Specify the --code-sign option and provide a ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL environment variable to perform code-signing
Creating Windows Installer for C:\atom\out\Atom x64
Thu, 20 Apr 2017 03:04:54 GMT electron-windows-installer:spawn Spawning C:\atom\script\node_modules\electron-winstaller\vendor\rcedit.exe C:\atom\out\Atom x64\Update.exe --set-icon C:\atom\resources\app-icons\dev\atom.ico
Thu, 20 Apr 2017 03:04:54 GMT electron-windows-installer:fs-utils Error: ENOENT: no such file or directory, stat 'C:\atom\out\Atom x64\resources\app.asar'
at Error (native)
Thu, 20 Apr 2017 03:04:54 GMT electron-windows-installer:main Created NuSpec file:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>atom</id>
<title>Atom</title>
<version>1.18.0-dev-41f0d5825</version>
<authors>GitHub Inc.</authors>
<owners>GitHub Inc.</owners>
<iconUrl>https://raw.githubusercontent.com/atom/atom/master/resources/app-icons/dev/atom.ico</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A hackable text editor for the 21st Century.</description>
<copyright>Copyright © 2017 GitHub Inc.</copyright>
</metadata>
<files>
<file src="locales\**" target="lib\net45\locales" />
<file src="resources\**" target="lib\net45\resources" />
<file src="*.bin" target="lib\net45" />
<file src="*.dll" target="lib\net45" />
<file src="*.pak" target="lib\net45" />
<file src="Update.exe" target="lib\net45\squirrel.exe" />
<file src="icudtl.dat" target="lib\net45\icudtl.dat" />
<file src="LICENSE" target="lib\net45\LICENSE" />
<file src="atom.exe" target="lib\net45\atom.exe" />
</files>
</package>
Thu, 20 Apr 2017 03:04:54 GMT electron-windows-installer:spawn Spawning C:\atom\script\node_modules\electron-winstaller\vendor\nuget.exe pack C:\Users\SHANE~1.AEO\AppData\Local\Temp\si-117320-944-68ih1h.cxazcl3di\atom.nuspec -BasePath C:\atom\out\Atom x64 -OutputDirectory C:\Users\SHANE~1.AEO\AppData\Local\Temp\si-117320-944-68ih1h.cxazcl3di -NoDefaultExcludes
Thu, 20 Apr 2017 03:18:49 GMT electron-windows-installer:main Attempting to build package from 'atom.nuspec'.
Successfully created package 'C:\Users\SHANE~1.AEO\AppData\Local\Temp\si-117320-944-68ih1h.cxazcl3di\atom.1.18.0-dev-41f0d5825.nupkg'.
Thu, 20 Apr 2017 03:18:49 GMT electron-windows-installer:spawn Spawning C:\atom\script\node_modules\electron-winstaller\vendor\SyncReleases.exe -u https://atom.io/api/updates-x64?version=1.18.0-dev-41f0d5825 -r C:\atom\out
Thu, 20 Apr 2017 03:19:47 GMT electron-windows-installer:main Attempting to sync URL as remote RELEASES folder
Trying to download RELEASES index from https://atom.io/api/updates-x64/RELEASES?version=1.18.0-dev-41f0d5825
Downloading release from https://atom.io/api/updates-x64/atom-1.16.0-full.nupkg
Thu, 20 Apr 2017 03:19:47 GMT electron-windows-installer:spawn Spawning C:\atom\script\node_modules\electron-winstaller\vendor\Update.com --releasify C:\Users\SHANE~1.AEO\AppData\Local\Temp\si-117320-944-68ih1h.cxazcl3di\atom.1.18.0-dev-41f0d5825.nupkg --releaseDir C:\atom\out --loadingGif C:\atom\resources\win\loading.gif --setupIcon C:\atom\resources\app-icons\dev\atom.ico
Deleting downloaded nupkg for previous version at C:/atom/out/atom-1.16.0-full.nupkg to prevent it from being stored as an artifact
Error: Failed with exit code: 4294967295
Output:
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.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
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, Int32 bufferSize)
at Squirrel.DeltaPackageBuilder.createDeltaForSingleFile(FileInfo targetFile, DirectoryInfo workingDirectory, Dictionary`2 baseFileListing)
at Squirrel.DeltaPackageBuilder.CreateDeltaPackage(ReleasePackage basePackage, ReleasePackage newPackage, String outputFile)
at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi)
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
at Squirrel.Update.Program.Main(String[] args)
at ChildProcess.proc.on.code (C:\atom\script\node_modules\electron-winstaller\lib\spawn-promise.js:62:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Activity
damieng commentedon Apr 20, 2017
Hmm, can you try creating a c:\temp folder and putting typing
SET TEMP=c:\tempin your command prompt before issuing the build command? (This won't change temp for your machine just for that command window while it is open)shanept commentedon Apr 21, 2017
Unfortunately that doesn't seem to change anything - I still have the error here.
damieng commentedon Apr 21, 2017
Hmm, not sure what else to suggest. If you just want to build atom you don't normally need to use --create-installer - it's used to create the .exe and .msi setup systems and can take some time as well. the -compress-artifacts flag will give you a zip you can use if that helps.
shanept commentedon Apr 21, 2017
damieng commentedon Apr 21, 2017
Was the output exactly the same when you set TEMP? The locations of the files should have been different.
shanept commentedon Apr 22, 2017
Maybe some of the paths may have changed, but it ultimately resulted in the same error in the same place.
damieng commentedon Apr 24, 2017
https://github.com/Squirrel/Squirrel.Windows/blob/master/src/Squirrel/DeltaPackage.cs#L148 is the point where things went awry in squirrel - this function is mostly performing operations creating temporary files using your temp folder.
Your temp folder is longer than the one I personally use to build Windows and longer than the one we use on the build server both of which are working fine right now. It might be worth creating a
c:\tempand setting TMP and TEMP to that from your system settings (then re-open the command window to take effect)damieng commentedon May 17, 2017
No further response.
damieng commentedon May 24, 2017
Found something else you can try if you're still stuck;
Might get you past it - we just ran into a length issue on our build server and this helped.
gigibiffi84 commentedon Jul 12, 2017
Hi @damieng i was facing with same problem and overriding SQUIRREL_TEMP variables solves the issue thk for your suggest!! However i had to define a global env variable beacuse setting it from command line does not take effect.
shanept commentedon Aug 16, 2017
Hi @damieng
Sorry, it's obviously been quite a while since I last looked at this. However, setting that environmental variable has done the trick and I have now managed to compile a Windows installer.
Now, I am attempting to run the install, and it failed until I set SQUIRREL_TEMP as an environmental variable for my user account. This can't be right? Is there something else you guys are doing to get around this?
Thanks
damieng commentedon Aug 16, 2017
Our installers don't typically have this problem however if your temp path is long it might be necessary (the default is within your user folder so longer user names can cause this)
shanept commentedon Aug 17, 2017
I don't think my user folder is all that long, and my username is only five characters. I guess it must be due to the dev build having a long name. I've figured out a workaround for now.
Thanks
damieng commentedon Aug 17, 2017
What do you mean 'dev build' having a long name? Is the workaround to set SQUIRREL_TEMP?
lock commentedon Mar 31, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!