Skip to content
This repository has been archived by the owner on Jul 13, 2018. It is now read-only.

exit code -1 on install #40

Closed
kwv opened this issue Apr 14, 2015 · 8 comments
Closed

exit code -1 on install #40

kwv opened this issue Apr 14, 2015 · 8 comments

Comments

@kwv
Copy link

kwv commented Apr 14, 2015

From running the AtomInstall.exe in the \Temp\chocolatey\ directory, it looks like the issue presents when running with the --silent flag (also tried /quiet). Omitting the flag shows the splash screen, but allows installation to precede.

2015-04-14 08:46:14,947 [INFO ] - ============================================================
2015-04-14 08:46:14,985 [INFO ] - Chocolatey v0.9.9.4
2015-04-14 08:46:15,084 [INFO ] - Installing the following packages:
2015-04-14 08:46:15,086 [INFO ] - atom
2015-04-14 08:46:15,088 [INFO ] - By installing you accept licenses for the packages.
2015-04-14 08:46:19,765 [INFO ] - 
Atom v0.174.1
2015-04-14 08:46:19,864 [INFO ] -  Found 'chocolateyInstall.ps1':
2015-04-14 08:46:19,866 [INFO ] - 
# Remove old apm shim
$apmPath = Join-Path $nugetExePath "apm.bat"
if (Test-Path ($apmPath)) {Remove-Item $apmPath -force}

# Remove old atom.exe shim
$atomPath = Join-Path $nugetExePath "atom.exe"
if (Test-Path ($atomPath)) {Remove-Item $atomPath -force}

# Run installer
$packageName = 'Atom'
$url = 'https://atom.io/download/windows'
$installerType = 'exe'
$silentArgs = '--silent'

Install-ChocolateyPackage $packageName $installerType $silentArgs $url


2015-04-14 08:46:19,893 [INFO ] - 
Do you want to run the script? 
 NOTE: If you choose not to run the script, the installation will 
 fail.
 Skip is an advanced option and most likely will never be wanted.

2015-04-14 08:46:19,895 [INFO ] -  1) yes
2015-04-14 08:46:19,899 [INFO ] -  2) no [Default - Press Enter]
2015-04-14 08:46:19,900 [INFO ] -  3) skip
2015-04-14 08:46:52,123 [WARN ] -  WARNING: Some imported command names include unapproved verbs which might make 
2015-04-14 08:46:52,126 [INFO ] -  them less discoverable.  Use the Verbose parameter for more detail or type 
2015-04-14 08:46:52,128 [INFO ] -  Get-Verb to see the list of approved verbs.
2015-04-14 08:46:52,175 [ERROR] -  Join-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-14 08:46:52,176 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:2 char:21
2015-04-14 08:46:52,178 [ERROR] -  + $apmPath = Join-Path <<<<  $nugetExePath "apm.bat"
2015-04-14 08:46:52,180 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingVa 
2015-04-14 08:46:52,182 [ERROR] -     lidationException
2015-04-14 08:46:52,184 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M 
2015-04-14 08:46:52,186 [ERROR] -     icrosoft.PowerShell.Commands.JoinPathCommand
2015-04-14 08:46:52,188 [ERROR] -  Test-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-14 08:46:52,189 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:3 char:14
2015-04-14 08:46:52,191 [ERROR] -  + if (Test-Path <<<<  ($apmPath)) {Remove-Item $apmPath -force}
2015-04-14 08:46:52,193 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingVa 
2015-04-14 08:46:52,194 [ERROR] -     lidationException
2015-04-14 08:46:52,197 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M 
2015-04-14 08:46:52,201 [ERROR] -     icrosoft.PowerShell.Commands.TestPathCommand
2015-04-14 08:46:52,202 [ERROR] -  Join-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-14 08:46:52,206 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:6 char:22
2015-04-14 08:46:52,208 [ERROR] -  + $atomPath = Join-Path <<<<  $nugetExePath "atom.exe"
2015-04-14 08:46:52,210 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingVa 
2015-04-14 08:46:52,211 [ERROR] -     lidationException
2015-04-14 08:46:52,213 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M 
2015-04-14 08:46:52,214 [ERROR] -     icrosoft.PowerShell.Commands.JoinPathCommand
2015-04-14 08:46:52,216 [ERROR] -  Test-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-14 08:46:52,218 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:7 char:14
2015-04-14 08:46:52,219 [ERROR] -  + if (Test-Path <<<<  ($atomPath)) {Remove-Item $atomPath -force}
2015-04-14 08:46:52,229 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingVa 
2015-04-14 08:46:52,231 [ERROR] -     lidationException
2015-04-14 08:46:52,235 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M 
2015-04-14 08:46:52,238 [ERROR] -     icrosoft.PowerShell.Commands.TestPathCommand
2015-04-14 08:46:52,387 [INFO ] -  Using this proxyserver: 192.168.0.255:8080
2015-04-14 08:46:56,997 [INFO ] -  Installing Atom...
2015-04-14 08:47:03,269 [ERROR] -  [ERROR] Running C:\Users\user~1.DEV\AppData\Local\Temp\chocolatey\Atom\AtomIn
2015-04-14 08:47:03,271 [ERROR] -  stall.exe with --silent  was not successful. Exit code was '-1' Error Message: 
2015-04-14 08:47:03,272 [ERROR] -  .
2015-04-14 08:47:03,274 [ERROR] -  At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.p
2015-04-14 08:47:03,276 [ERROR] -  s1:92 char:10
2015-04-14 08:47:03,277 [ERROR] -  +     throw <<<<  $errorMessage
2015-04-14 08:47:03,279 [ERROR] -      + CategoryInfo          : OperationStopped: ([ERROR] Running...or Message: 
2015-04-14 08:47:03,280 [ERROR] -  .:String) [], RuntimeException
2015-04-14 08:47:03,281 [ERROR] -      + FullyQualifiedErrorId : [ERROR] Running C:\Users\user~1.DEV\AppData\Lo 
2015-04-14 08:47:03,283 [ERROR] -     cal\Temp\chocolatey\Atom\AtomInstall.exe with --silent  was not successful  
2015-04-14 08:47:03,285 [ERROR] -    . Exit code was '-1' Error Message: 
2015-04-14 08:47:03,287 [ERROR] -  .
2015-04-14 08:47:03,416 [ERROR] - atom install not successful.
2015-04-14 08:47:03,421 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1'.
 See log for details.
2015-04-14 08:47:05,461 [WARN ] - 
Chocolatey installed 0/1 package(s). 1 package(s) failed.
 See the log for details.
2015-04-14 08:47:05,463 [ERROR] - Failures:
2015-04-14 08:47:05,467 [ERROR] -  - atom

@dougireton
Copy link

The failure in the Atom package install is due to this bug in Chocolatey: chocolatey/choco#230

@ferventcoder
Copy link

Expect to see this fixed in 0.9.9.5 of choco

@vtintillier
Copy link

@ferventcoder This is not fixed in 0.9.9.5, or maybe this is now a different error. But nugetExePath still null apparently:

============================================================
2015-04-23 15:58:32,402 [INFO ] - Chocolatey v0.9.9.5
2015-04-23 15:58:32,449 [INFO ] - Installing the following packages:
2015-04-23 15:58:32,449 [INFO ] - Atom
2015-04-23 15:58:32,449 [INFO ] - By installing you accept licenses for the packages.
2015-04-23 15:58:35,871 [INFO ] - 
Atom v0.174.1
2015-04-23 15:58:39,090 [ERROR] -  Join-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-23 15:58:39,090 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:2 char:22
2015-04-23 15:58:39,090 [ERROR] -  + $apmPath = Join-Path $nugetExePath "apm.bat"
2015-04-23 15:58:39,090 [ERROR] -  +                      ~~~~~~~~~~~~~
2015-04-23 15:58:39,090 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingValidationException
2015-04-23 15:58:39,090 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom 
2015-04-23 15:58:39,090 [ERROR] -     mand
2015-04-23 15:58:39,090 [ERROR] -  Test-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-23 15:58:39,090 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:3 char:15
2015-04-23 15:58:39,090 [ERROR] -  + if (Test-Path ($apmPath)) {Remove-Item $apmPath -force}
2015-04-23 15:58:39,090 [ERROR] -  +               ~~~~~~~~~~
2015-04-23 15:58:39,105 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
2015-04-23 15:58:39,105 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCom 
2015-04-23 15:58:39,105 [ERROR] -     mand
2015-04-23 15:58:39,105 [ERROR] -  Join-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-23 15:58:39,105 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:6 char:23
2015-04-23 15:58:39,105 [ERROR] -  + $atomPath = Join-Path $nugetExePath "atom.exe"
2015-04-23 15:58:39,105 [ERROR] -  +                       ~~~~~~~~~~~~~
2015-04-23 15:58:39,105 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingValidationException
2015-04-23 15:58:39,105 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom 
2015-04-23 15:58:39,105 [ERROR] -     mand
2015-04-23 15:58:39,105 [ERROR] -  Test-Path : Cannot bind argument to parameter 'Path' because it is null.
2015-04-23 15:58:39,105 [ERROR] -  At C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1:7 char:15
2015-04-23 15:58:39,105 [ERROR] -  + if (Test-Path ($atomPath)) {Remove-Item $atomPath -force}
2015-04-23 15:58:39,105 [ERROR] -  +               ~~~~~~~~~~~
2015-04-23 15:58:39,105 [ERROR] -      + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
2015-04-23 15:58:39,105 [ERROR] -      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCom 
2015-04-23 15:58:39,105 [ERROR] -     mand
2015-04-23 15:58:39,183 [INFO ] -  Using this proxyserver: bluecoat-proxy:8080
2015-04-23 15:58:40,621 [INFO ] -  Downloading Atom 32 bit
2015-04-23 15:58:40,621 [INFO ] -    from 'https://atom.io/download/windows'
2015-04-23 15:58:40,714 [INFO ] -  Using this proxyserver: bluecoat-proxy:8080
2015-04-23 16:00:50,413 [INFO ] -  Installing Atom...
2015-04-23 16:00:51,695 [INFO ] -  Atom has been installed.
2015-04-23 16:00:51,773 [ERROR] - The install of atom was NOT successful.
2015-04-23 16:00:51,773 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\Atom\tools\chocolateyInstall.ps1'.
 See log for details.
2015-04-23 16:00:53,804 [WARN ] - 
Chocolatey installed 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2015-04-23 16:00:53,804 [ERROR] - Failures:
2015-04-23 16:00:53,804 [ERROR] -  - atom

@ferventcoder
Copy link

@bradgearon It looks like the package is using something it should not - $nugetExePath is not part of the API and it is no longer available as Chocolatey is now compiled instead of a powershell module itself.

@ferventcoder
Copy link

@ferventcoder
Copy link

Adding the following in 0.9.9.6 chocolatey/choco#267

@ferventcoder
Copy link

This is now fixed. You should be able to install with choco 0.9.9.6.

@kevinsawicki
Copy link
Contributor

Closing this out since it has been fixed upstream

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants