atom / chocolatey

chocolatey installer for Atom
MIT License
12 stars 17 forks source link

Error installing Atom on Win 7 #19

Closed assertnotnull closed 10 years ago

assertnotnull commented 10 years ago

On windows 7 x64. It got this message, rerun it and it was saying it was installed.


Write-Error : Atom did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] Exception calling "Substring" with "1" argument(s): "startIndex cannot be larger than length of string .
Parameter name: startIndex"
-----------------------
At C:\Chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:29 char:13
+     Write-Error <<<<  $errorMessage
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Exception calling "Substring" with "1" argument(s): "startIndex cannot be larger than length of string.
Parameter name: startIndex"
Au niveau de C:\Chocolatey\chocolateyinstall\helpers\functions\Get-ChocolateyUnzip.ps1 : 82 Caractère : 40
+     $insideZipFile=$file.path.substring <<<< ($fileIndex)
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : DotNetMethodException

----
Second try;

λ cinst atom
Chocolatey (v0.9.8.20) is installing atom and dependencies. By installing you accept the license for atom and each dependency you are installing.
'Atom 0.113.0' already installed.
If you want to reinstall the current version of an existing package, please use the -force command.

Finished installing 'atom' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure.
kevinsawicki commented 10 years ago

Could you try upgrading to the latest chocolatey release using cinst chocolatey and then restart your command prompt or powershell window and then run cinst Atom --debug?

briankoser commented 10 years ago

@kevinsawicki I was having the same problem, I did as you asked and got:

PS C:\Users\Brian> cinst Atom -debug
DEBUG: Running 'Append-InstallLog' with chocoInstallLog:''
DEBUG: Arguments: $command =
'install'|$packageNames='Atom'|$source=''|$version=''|$allVersions=False|$InstallArguments=''|$overrideArguments=False|
$force=False|$prerelease=False|$localonly=False|$verbosity=False|$debug=True|$quiet=False|$name=''|$ignoreDependencies=
False|$forceX86=False|$packageParameters=''|PowerShellVersion=2.0
DEBUG: Running 'Chocolatey-Install' for 'Atom' with source: '', version: '', installerArguments:''
DEBUG: Running 'Chocolatey-NuGet' for Atom with source:''. Force? False
Chocolatey (v0.9.8.25) is installing 'Atom' and dependencies. By installing you accept the license for 'Atom' and each d
ependency you are installing.
DEBUG: Installing packages to "C:\ProgramData\Chocolatey\lib".
DEBUG: Running 'Run-NuGet' for Atom with source: '', version:''
DEBUG: ___ NuGet ____
DEBUG: Running 'Get-ConfigValue' with configValue:'useNuGetForSources'
DEBUG: Running 'Get-UserConfigValue' with configValue:'useNuGetForSources'
DEBUG: After checking the user config the value of 'useNuGetForSources' is ''
DEBUG: Value not found in the user config file - checking the global config
DEBUG: Running 'Get-GlobalConfigValue' with configValue:'useNuGetForSources'
DEBUG: After checking the global config the value of 'useNuGetForSources' is 'false'
DEBUG: Running 'Get-UserConfigValue' with configValue:'sources'
DEBUG: Running 'Get-GlobalConfigValue' with configValue:'sources'
DEBUG: Using global sources
DEBUG: Using '-Source "https://chocolatey.org/api/v2/;"' as the source arguments
DEBUG: Calling 'C:\ProgramData\Chocolatey\chocolateyinstall\nuget.exe' install Atom -OutputDirectory
"C:\ProgramData\Chocolatey\lib" -Source "https://chocolatey.org/api/v2/;" -NonInteractive -NoCache
DEBUG: 'Atom 0.115.0' already installed.
DEBUG: Evaluating NuGet output for line: 'Atom 0.115.0' already installed.
'Atom 0.115.0' already installed.
If you want to reinstall the current version of an existing package, please use the -force command.

DEBUG: Evaluating NuGet output for line:
Finished installing 'Atom' and dependencies - if errors not shown in console, none detected. Check log for errors if uns
ure.
kevinsawicki commented 10 years ago

@briankoser can you try adding the -force option?

briankoser commented 10 years ago

That worked. The output:

PS C:\Users\Brian> cinst Atom -force -debug
DEBUG: Running 'Append-InstallLog' with chocoInstallLog:''
DEBUG: Arguments: $command =
'install'|$packageNames='Atom'|$source=''|$version=''|$allVersions=False|$InstallArguments=''|$overrideArguments=False|
$force=True|$prerelease=False|$localonly=False|$verbosity=False|$debug=True|$quiet=False|$name=''|$ignoreDependencies=F
alse|$forceX86=False|$packageParameters=''|PowerShellVersion=2.0
DEBUG: Running 'Chocolatey-Install' for 'Atom' with source: '', version: '', installerArguments:''
DEBUG: Running 'Chocolatey-NuGet' for Atom with source:''. Force? True
Chocolatey (v0.9.8.25) is installing 'Atom' and dependencies. By installing you accept the license for 'Atom' and each d
ependency you are installing.
DEBUG: Installing packages to "C:\ProgramData\Chocolatey\lib".
DEBUG: Running 'Run-NuGet' for Atom with source: '', version:''
DEBUG: ___ NuGet ____
DEBUG: Running 'Get-ConfigValue' with configValue:'useNuGetForSources'
DEBUG: Running 'Get-UserConfigValue' with configValue:'useNuGetForSources'
DEBUG: After checking the user config the value of 'useNuGetForSources' is ''
DEBUG: Value not found in the user config file - checking the global config
DEBUG: Running 'Get-GlobalConfigValue' with configValue:'useNuGetForSources'
DEBUG: After checking the global config the value of 'useNuGetForSources' is 'false'
DEBUG: Running 'Get-UserConfigValue' with configValue:'sources'
DEBUG: Running 'Get-GlobalConfigValue' with configValue:'sources'
DEBUG: Using global sources
DEBUG: Using '-Source "https://chocolatey.org/api/v2/;"' as the source arguments
DEBUG: Calling 'C:\ProgramData\Chocolatey\chocolateyinstall\nuget.exe' install Atom -OutputDirectory
"C:\ProgramData\Chocolatey\lib" -Source "https://chocolatey.org/api/v2/;" -NonInteractive -NoCache
DEBUG: 'Atom 0.115.0' already installed.
DEBUG: Evaluating NuGet output for line: 'Atom 0.115.0' already installed.
DEBUG: NuGet installed Atom. If we are ignoring dependencies (False) then we will clean this up.

Atom v0.115.0
DEBUG: Running 'Delete-ExistingErrorLog' for Atom
DEBUG: Looking for failure log at 'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\failure.log'
DEBUG: Found the failure log. Deleting it...
DEBUG: Running 'Run-ChocolateyPS1' for Atom with packageFolder:'C:\ProgramData\Chocolatey\lib\Atom.0.115.0', action:
'install'
DEBUG:   __ PowerShell install (chocolateyinstall.ps1) __
DEBUG:   Looking for chocolateyinstall.ps1 in folder 'C:\ProgramData\Chocolatey\lib\Atom.0.115.0'. If
chocolateyinstall.ps1 is found, it will be run.
DEBUG: Action file is 'chocolateyInstall.ps1'
DEBUG: Running 'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\chocolateyInstall.ps1'
DEBUG: Running 'Install-ChocolateyZipPackage' for Atom with
url:'https://github.com/atom/atom/releases/download/v0.115.0/atom-windows.zip', unzipLocation:
'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools', url64bit:
'https://github.com/atom/atom/releases/download/v0.115.0/atom-windows.zip', specificFolder: '', checksum: '',
checksumType: '', checksum64: '', checksumType64: ''
DEBUG: Running 'Get-ChocolateyWebFile' for Atom with
url:'https://github.com/atom/atom/releases/download/v0.115.0/atom-windows.zip',
fileFullPath:'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip',
url64bit:'https://github.com/atom/atom/releases/download/v0.115.0/atom-windows.zip', checksum: '', checksumType: '',
checksum64: '', checksumType64: ''
DEBUG: Running 'Get-ProcessorBits'
DEBUG: CPU is 64 bit
DEBUG: Setting url to 'https://github.com/atom/atom/releases/download/v0.115.0/atom-windows.zip' and bitPackage to 64
DEBUG: Running 'Get-WebHeaders' with url:'https://github.com/atom/atom/releases/download/v0.115.0/atom-windows.zip',
userAgent: 'chocolatey command line'
DEBUG: Setting the UserAgent to 'chocolatey command line'
DEBUG: Web Headers Received:
DEBUG:   'x-amz-id-2':'rjmH3VDjc6RBw6RqQA4so1pAoqT7+2POSH11GTqq/Cfx2SCneAMuQKlnMj97fBRmu++g97SBzh4='
DEBUG:   'x-amz-request-id':'FDC74BD21555DE7A'
DEBUG:   'x-amz-meta-surrogate-control':'max-age=31557600'
DEBUG:   'x-amz-meta-surrogate-key':'repository-3228505 user-3697332'
DEBUG:   'Content-Disposition':'attachment; filename=atom-windows.zip'
DEBUG:   'Accept-Ranges':'bytes'
DEBUG:   'Content-Length':'68420667'
DEBUG:   'Cache-Control':'max-age=31557600'
DEBUG:   'Content-Type':'application/octet-stream'
DEBUG:   'Date':'Sat, 12 Jul 2014 03:38:23 GMT'
DEBUG:   'ETag':'"1da62c3e553d31cf8a732c46644e241d"'
DEBUG:   'Last-Modified':'Fri, 11 Jul 2014 20:16:58 GMT'
DEBUG:   'Server':'AmazonS3'
DEBUG: Atom's requested file has already been downloaded. Using cached copy at
  'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'.
DEBUG: Checking that 'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip' is the size we expect it to
be.
DEBUG: Verifying package provided checksum of '' for
'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'.
DEBUG: Running 'Get-CheckSumValid' with file:'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip',
checksum: '', checksumType: ''
DEBUG: Verifying downloaded file is not known to contain viruses. FilePath:
'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'.
DEBUG: Running 'Get-VirusCheckValid' with
location:'https://github.com/atom/atom/releases/download/v0.115.0/atom-windows.zip', file:
'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'
DEBUG: Running 'Get-ChocolateyUnzip' with
fileFullPath:'C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'', destination:
'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools', specificFolder: '`, packageName: 'Atom'
Extracting C:\Users\Brian\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip to C:\ProgramData\Chocolatey\lib\Atom.0.115
.0\tools...
DEBUG: wrapping 7za invocation with Write-FileUpdateLog
DEBUG: Running 'Write-FileUpdateLog' with
logFilePath:'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\AtomInstall.zip.txt'',
locationToMonitor:C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools, Operation: '
    param($7zip, $destination, $fileFullPath, [ref]$exitCodeRef)
$p = Start-Process $7zip -ArgumentList "x -o`"$destination`" -y `"$fileFullPath`"" -Wait -WindowStyle Hidden -PassThru
    $exitCodeRef.Value = $p.ExitCode
  '
DEBUG: Tracking current state of 'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools'
DEBUG: 7za exit code: 0
C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools
Atom has finished successfully! The chocolatey gods have answered your request!
DEBUG: Running 'Install-ChocolateyShortcut' with parameters ShortcutFilePath: 'C:\Users\Brian\Desktop\Atom.lnk',
TargetPath: 'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\atom.exe', WorkingDirectory: '', Arguments: '',
IconLocation: '', Description: ''
DEBUG: Creating Shortcut...
DEBUG: Shortcut created.

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        07/11/2014     22:44            Install-ChocolateyShortcut completed
Install-ChocolateyShortcut completed has finished successfully! The chocolatey gods have answered your request!

    Directory: C:\Users\Brian\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        08/25/2013     16:54            GitHub, Inc
DEBUG: Running 'Install-ChocolateyShortcut' with parameters ShortcutFilePath:
'C:\Users\Brian\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\GitHub, Inc\Atom.lnk', TargetPath:
'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\atom.exe', WorkingDirectory: '', Arguments: '', IconLocation:
'', Description: ''
DEBUG: Creating Shortcut...
DEBUG: Shortcut created.
Install-ChocolateyShortcut completed has finished successfully! The chocolatey gods have answered your request!
DEBUG: Running 'Install-ChocolateyExplorerMenuItem' with menuKey:'Atom', menuLabel:'Open with Atom',
command:'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\atom.exe', type 'file'
DEBUG: Running 'Start-ChocolateyProcessAsAdmin' with exeToRun:'powershell', statements: '
    if( -not (Test-Path -path HKCR:) ) {New-PSDrive -Name HKCR -PSProvider registry -Root Hkey_Classes_Root};
    if(!(test-path -LiteralPath 'HKCR:\*\shell\Atom')) { new-item -Path 'HKCR:\*\shell\Atom' };
    Set-ItemProperty -LiteralPath 'HKCR:\*\shell\Atom' -Name '(Default)'  -Value 'Open with Atom';
    if(!(test-path -LiteralPath 'HKCR:\*\shell\Atom\command')) { new-item -Path 'HKCR:\*\shell\Atom\command' };
    Set-ItemProperty -LiteralPath 'HKCR:\*\shell\Atom\command' -Name '(Default)' -Value
'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\atom.exe \"%1\"';
    return 0;'
DEBUG: Elevating Permissions and running C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile
-ExecutionPolicy unrestricted -Command "& import-module -name
'C:\ProgramData\Chocolatey\chocolateyinstall\helpers\chocolateyInstaller.psm1'; try{
    if( -not (Test-Path -path HKCR:) ) {New-PSDrive -Name HKCR -PSProvider registry -Root Hkey_Classes_Root};
    if(!(test-path -LiteralPath 'HKCR:\*\shell\Atom')) { new-item -Path 'HKCR:\*\shell\Atom' };
    Set-ItemProperty -LiteralPath 'HKCR:\*\shell\Atom' -Name '(Default)'  -Value 'Open with Atom';
    if(!(test-path -LiteralPath 'HKCR:\*\shell\Atom\command')) { new-item -Path 'HKCR:\*\shell\Atom\command' };
    Set-ItemProperty -LiteralPath 'HKCR:\*\shell\Atom\command' -Name '(Default)' -Value
'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\atom.exe \"%1\"';
    return 0; start-sleep 6;}catch{write-error 'That was not sucessful';start-sleep 8;throw;}". This may take awhile,
depending on the statements.
DEBUG: Finishing 'Start-ChocolateyProcessAsAdmin'
'Atom' explorer menu item has been created
DEBUG: Running 'Install-BinFile' for apm with
path:'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\resources\app\apm\node_modules\atom-package-manager\bin\apm
.cmd'
Adding C:\ProgramData\Chocolatey\bin\apm.bat and pointing to '%DIR%..\lib\atom.0.115.0\tools\atom\resources\app\apm\node
_modules\atom-package-manager\bin\apm.cmd'.
DEBUG: Running 'Get-ChocolateyBins' for C:\ProgramData\Chocolatey\lib\Atom.0.115.0
DEBUG:   __ Executable Links (*.exe) __
DEBUG: Looking for executables in folder: C:\ProgramData\Chocolatey\lib\Atom.0.115.0
Adding batch files for any executables found to a location on PATH. In other words the executable will be available
from ANY command line/powershell prompt.
DEBUG: Found 3 exe files to possibly generate.
DEBUG: Found
'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\resources\app\apm\node_modules\atom-package-manager\bin\node.exe
' for batch redirect
DEBUG: Found
'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\resources\app\node_modules\symbols-view\vendor\ctags-win32.exe'
for batch redirect
DEBUG: Found 'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\atom.exe' for batch redirect
DEBUG: Running 'Generate-BinFile' for atom with
path:'C:\ProgramData\Chocolatey\lib\Atom.0.115.0\tools\Atom\atom.exe'|$useStart:True|$command:
DEBUG: Calling C:\ProgramData\Chocolatey\chocolateyinstall\tools\shimgen.exe -o
"C:\ProgramData\Chocolatey\bin\atom.exe" -p "..\lib\atom.0.115.0\tools\atom\atom.exe" -gui
Added C:\ProgramData\Chocolatey\bin\atom.exe shim pointed to '..\lib\atom.0.115.0\tools\atom\atom.exe'.
DEBUG: Evaluating NuGet output for line:
Finished installing 'Atom' and dependencies - if errors not shown in console, none detected. Check log for errors if uns
ure.
kevinsawicki commented 10 years ago

Okay, I'm going to close this out then, thanks for letting me know.