# Test Kitchen Returns \[no implicit conversion of nil into String\]

**URL:** <https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609>\
**Category:** Chef Infra (archive)\
**Created:** [February 20, 2018, 1:00pm UTC](https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609 "2018-02-20T13:00:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sethro](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sethro/32/2200_2.png) [@sethro](https://discourse.chef.io/u/sethro)\
**Post date:** [February 20, 2018, 1:00pm UTC](https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609/1 "2018-02-20T13:00:19Z")

</div>

Good Morning,

I am attempting to run through the Chef Learning tracks and stuck at creating an AWS EC2 Windows instance with Test Kitchen. The error received is below and Kitchen fails at this exact same spot every time. Debug log files are available if needed. Appreciate anyone's thoughts on that matter and thank you so much!!

> 2018/02/20 12:42:16Z: Message: Windows is Ready to use
> 
> ```
> Waited 0/600s for instance <i-0a8ff8aaef2652770> to fetch windows admin password.
> 
> ```
> 
> > > > > > > ## ------Exception------- Class: Kitchen::ActionFailed Message: 1 actions failed. Failed to complete #create action: [no implicit conversion of nil into String] on default-windows-2012r2
> > > > > > > 
> > > > > > > Please see .kitchen/logs/kitchen.log for more details  
> > > > > > > Also try running `kitchen diagnose --all` for configuration

**System Setup**  
Windows 10 (16299.248)  
Chef Development Kit Version: 2.4.17  
chef-client version: 13.6.4  
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)  
berks version: 6.3.1  
kitchen version: 1.19.2  
inspec version: 1.45.13  
Python: 3.6.4  
PIP: 9.0.1

---

<div class="post-metadata">

**Author:** ![cheeseplus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/cheeseplus/32/960_2.png) [@cheeseplus](https://discourse.chef.io/u/cheeseplus)\
**Post date:** [February 20, 2018, 1:37pm UTC](https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609/2 "2018-02-20T13:37:39Z")

</div>

A gist of the `.kitchen.yml` you have, the debug logs, and a link to the specific page/module you are on would be great. Even better come join us [Chef Community Slack](http://community-slack.chef.io/) in the #test-kitchen channel and we can try to troubleshoot this in realtime.

Cheers,

---

<div class="post-metadata">

**Author:** ![dragon788](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dragon788](https://discourse.chef.io/u/dragon788)\
**Post date:** [February 20, 2018, 2:03pm UTC](https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609/3 "2018-02-20T14:03:13Z")

</div>

When I’ve run into this it was because I hadn’t configured my aws ssh key that allows me to pull the Windows password. This goes under transport and adding that as well as increasing the retries usually fixes it for me.

---

<div class="post-metadata">

**Author:** ![sethro](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sethro/32/2200_2.png) [@sethro](https://discourse.chef.io/u/sethro)\
**Post date:** [February 22, 2018, 12:47am UTC](https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609/4 "2018-02-22T00:47:17Z")

</div>

@cheeseplus, the information requested is below! Let me know if any issues accessing the GIST URL and thank you very much.

@dragon788, I created a new AWS Key Pair and generated a new Access Key ID for the IAM User and set those up accordingly on the Chef Workstation but still no go. Also attempted to increase the SSH Connection Retries as well. Thank you very much too!

**Gist of Kitchen.yml, Kitchen Logs, and PS Kitchen Output:** [https://gist.github.com/sethro2/6071eb81735d1f5f32366e7595f14c55](https://gist.github.com/sethro2/6071eb81735d1f5f32366e7595f14c55)  
**Chef Training Module (Step 3):**[https://learn.chef.io/modules/local-development/windows/aws/apply-a-cookbook#/](https://learn.chef.io/modules/local-development/windows/aws/apply-a-cookbook#/)

---

<div class="post-metadata">

**Author:** ![cheeseplus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/cheeseplus/32/960_2.png) [@cheeseplus](https://discourse.chef.io/u/cheeseplus)\
**Post date:** [February 22, 2018, 8:48pm UTC](https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609/5 "2018-02-22T20:48:24Z")

</div>

Looks like the `transport` [section](https://gist.github.com/sethro2/6071eb81735d1f5f32366e7595f14c55#file-kitchen-yml-L20-L21) is not properly aligned and since YAML takes it’s spacing/tabbing very seriously it’s not happy. Below I’ve fixed the alignment so you can see:

```auto
---
...
provisioner:
  name: chef_zero
  log_level: debug

verifier:
  name: inspec

transport:
  ssh_key: c:\users\admin\.aws\us-east.pem

platforms:
  - name: windows-2012r2

```

---

<div class="post-metadata">

**Author:** ![sethro](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sethro/32/2200_2.png) [@sethro](https://discourse.chef.io/u/sethro)\
**Post date:** [February 23, 2018, 12:24am UTC](https://discourse.chef.io/t/test-kitchen-returns-no-implicit-conversion-of-nil-into-string/12609/6 "2018-02-23T00:24:22Z")

</div>

Removing the spaces from the beginning of the Transport line did the trick… unbelievable.

Thank you so much for helping a grasshopper find his way!!
