boxstarter-cookbook icon indicating copy to clipboard operation
boxstarter-cookbook copied to clipboard

Boxstarter fails to execute resource

Open michaelbarkdoll opened this issue 9 years ago • 1 comments

Chef fails to execute Enabling Automatic Updates from Windows Update with simple block of code:

include_recipe 'boxstarter::default'

boxstarter "boxstarter run" do password "plaintext" disable_reboots false code <<-EOH cinst fiddler4 EOH end

192.168.56.111 ERROR SUMMARY: 192.168.56.111 #1) 192.168.56.111 192.168.56.111 192.168.56.111 PSMessageDetails : 192.168.56.111 Exception : System.Management.Automation.RuntimeException: You cann 192.168.56.111 ot call a method on a null-valued expression. 192.168.56.111 at System.Management.Automation.ParserOps.CallMethod 192.168.56.111 (Token token, Object target, String methodName, Object[ 192.168.56.111 ] paramArray, Boolean callStatic, Object valueToSet) 192.168.56.111 at System.Management.Automation.MethodCallNode.Invok 192.168.56.111 eMethod(Object target, Object[] arguments, Object value 192.168.56.111 ) 192.168.56.111 at System.Management.Automation.MethodCallNode.Execu 192.168.56.111 te(Array input, Pipe outputPipe, ExecutionContext conte 192.168.56.111 xt) 192.168.56.111 at System.Management.Automation.MethodCallNode.Execu 192.168.56.111 te(Array input, Pipe outputPipe, ExecutionContext conte 192.168.56.111 xt) 192.168.56.111 at System.Management.Automation.CommandNode.ReadArgu 192.168.56.111 ments(Int32& index, ExecutionContext context) 192.168.56.111 at System.Management.Automation.CommandNode.BindPara 192.168.56.111 metersAndArguments(Int32 index, ExecutionContext contex 192.168.56.111 t) 192.168.56.111 at System.Management.Automation.CommandNode.AddToPip 192.168.56.111 eline(PipelineProcessor pipeline, ExecutionContext cont 192.168.56.111 ext) 192.168.56.111 at System.Management.Automation.PipelineNode.Execute 192.168.56.111 (Array input, Pipe outputPipe, ArrayList& resultList, E 192.168.56.111
192.168.56.111 xecutionContext context) 192.168.56.111 at System.Management.Automation.StatementListNode.Ex 192.168.56.111 ecuteStatement(ParseTreeNode statement, Array input, Pi 192.168.56.111 pe outputPipe, ArrayList& resultList, ExecutionContext 192.168.56.111 context) 192.168.56.111 TargetObject : Replace 192.168.56.111 CategoryInfo : InvalidOperation: (Replace:String) [], RuntimeException 192.168.56.111 FullyQualifiedErrorId : InvokeMethodOnNull 192.168.56.111 ErrorDetails : 192.168.56.111 InvocationInfo : System.Management.Automation.InvocationInfo 192.168.56.111 PipelineIterationInfo : {}

Any hints on what I should correct? Thanks!

Error log: https://gist.github.com/anonymous/5220de5ba922d030cae5

michaelbarkdoll avatar Dec 07 '15 22:12 michaelbarkdoll

Additional error log: https://gist.github.com/anonymous/1307f2a708df39080d29

This error code is being thrown in Boxstarter.Chocolatey/Chocolatey.ps1 line: 168

It appears boxstarter is locally installing an older version of chocolatey. I had to modify some flags in the files/bootstrapper.ps1 script for cholocately (newest) version to install and allow the installation of boxstarter.

Note: I appear to get a seperate error if I include: Install-WindowsUpdate -acceptEula in the boxstarter resource

C:\Users\AppData\Roaming\boxstarter\boxstarter.WinConfig\Install-WindowsUpdate.ps1:72 char:35 223 + $Result = $Searcher.Search <<<< ($criteria)

Does windows have to be activated prior to boxstarter allowing the cookbook to work?

michaelbarkdoll avatar Dec 09 '15 04:12 michaelbarkdoll