Security Error at beginning of installation

Apr 17, 2014 at 8:34 PM
This is my first attempt to use Chocolatey, so apologies if I'm missing something simple!

I created a basic script based on the examples and added some additional Chocolatey packages to install. When I launch Boxstarter with my script, it seems to get started, then comes back quickly with a Security Error.

It does seem to create the Boxstarter package just fine. In fact, I was able to find it and kick it off directly with Chocolatey (cinst temp_BoxstarterPackage -source C:\some-really-long-path) and it seems to work just fine.

Here's the full log. Any ideas what might cause the Security Error? I'm a local admin, running the command prompt as an admin (though the installer seems to start a new session). Windows 8.1.

-- + Boxstarter starting Calling Chocolatey to install temp_BoxstarterPackage. This
may take several minutes to complete...
Chocolatey (v0.9.8.23) is installing 'temp_BoxstarterPackage' and dependencies.
By installing you accept the license for 'temp_BoxstarterPackage' and each depen
dency you are installing.
______ temp_BoxstarterPackage v1.0.0 ______
Write-Error : Package 'temp_BoxstarterPackage v1.0.0' did not install successfully: Security error.
At C:\Chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:90 char:17
  • Write-Error "Package `'$installedPackageName v$installedPackageV ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
  • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error
Finished installing 'temp_BoxstarterPackage' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure.
  • Boxstarter finished Calling Chocolatey to install temp_BoxstarterPackage. This may take several minutes to complete... 00:00:03.5590497
    True
    Boxstarter: Enabling Automatic Updates from Windows Update
    Type ENTER to exit:
Coordinator
Apr 18, 2014 at 5:37 AM
Could you provide the contents of C:\chocolatey\chocolateyinstall\chocolateyInstall.log? This error is thrown from Chocolatey and being able to review the Chocolatey log would really help to get closer to the root cause. You could copy it to a gist and share that if thats convenient.

Thanks!
Apr 18, 2014 at 6:07 PM
Ah, that explains why I couldn't find anything in the Boxstarter logs! Here's the chocolatey log on a fresh attempt: http://f.cl.ly/items/2M06413O3E342j3m3x0h/chocolateyLog.txt

Appreciate any hints!
Coordinator
Apr 18, 2014 at 10:05 PM
Thanks! That helps narrow it down a little bit. A couple questions:
  1. How are you launching Boxstarter. You mentioned that you are launching it from a script. Can you share the script as well as the package?
  2. If you look in %temp%\chocolatey\temp_BoxstarterPackage, is there a Failure.log file? If so, could you share that?
Thanks!
Matt
Apr 21, 2014 at 6:30 PM
Hey Matt,
  1. I'm launching using the "launcher" by running this command:

    START http://boxstarter.org/package/nr/url?https://gist.github.com/tomfulton/11007948
Here's the script and the generated package
  1. In the %temp%\chocolatey\ folder, I'm not seeing any folder for my package (temp_BoxstarterPackage), I only see folders for each of the chocolatey packages (ie dropbox, googlechrome, etc). Anywhere else I should look?
-Tom
Coordinator
Apr 21, 2014 at 7:08 PM
I believe I see the issue. It is likely your first line:
Set-ExecutionPolicy Unrestricted -Force
instead use:
Update-ExecutionPolicy Unrestricted
This is a Boxstarter command that will launch a separate elevated powershell process with unrestricted ExecutionPolicy. You cannot do this in the current powershell session since its execution policy is set to ByPass.
May 31, 2014 at 11:38 PM
Hi again - sorry for not getting back to you. I did try this quickly but was getting some other errors, probably just me forgetting how to use it as it's been a while. I'll definitely give this a shot on the next go-around. Thanks again!

PS, I think I copied that line from the docs or another script I found. Taking a quick look now they all seem to be using the way you mentioned though.