Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

berks upload fails with "Invalid element in array value of 'files'." #706

Closed
Enalmada opened this issue Jun 27, 2013 · 27 comments
Closed

berks upload fails with "Invalid element in array value of 'files'." #706

Enalmada opened this issue Jun 27, 2013 · 27 comments
Labels

Comments

@Enalmada
Copy link

On Mac, berks upload has been uploading fine. Made a small change to recipe text, added changeglog line, and incremented metadata version...now berks upload fails. Using berkshelf 2.0.5, did bundle update, ruby 1.9.3p429, knife upload works fine, strainer tests with recommended foodcritic rules all return success. Any thoughts on what that error might mean?

> ➜  grocery-web-config git:(master) ✗ berks upload -d
> Using grocery-web-config (0.1.3)
...
> Uploading grocery-web-config (0.1.3) to: 
...
> ==> parsing Chef response body as JSON
> ==> performing authenticated Chef request as 'jzulli'
> request env: {:method=>:put, :body=>"{\"recipes\":[{\"name\":\"default.rb\",\"path\":\"recipes/default.rb\",\"checksum\":\"9d402cd419a01f3362aea24d4010c0b0\",\"specificity\":\"default\"}],\"definitions\":[],\"libraries\":[],\"attributes\":[{\"name\":\"grocery-web-config.rb\",\"path\":\"attributes/grocery-web-config.rb\",\"checksum\":\"395c7956ba5edf253b523ce75a8886ac\",\"specificity\":\"default\"}],\"files\":[{\"name\":\".DS_Store\",\"path\":\"files/.DS_Store\",\"checksum\":\"016a9e9eb9105e86d89e944b65fdc7cf\",\"specificity\":null},{\"name\":\"deploy.py\",\"path\":\"files/default/deploy.py\",\"checksum\":\"b71ab2dcbfbed4becf8ecbd331391355\",\"specificity\":\"default\"}],\"templates\":[{\"name\":\".DS_Store\",\"path\":\"templates/.DS_Store\",\"checksum\":\"4908e42da310d574339426af4fc1c4ed\",\"specificity\":null},{\"name\":\".DS_Store\",\"path\":\"templates/default/.DS_Store\",\"checksum\":\"dbbb6e8928e6d52ed4eec541f5bfd247\",\"specificity\":\"default\"},{\"name\":\"deploycfg.erb\",\"path\":\"templates/default/deploycfg.erb\",\"checksum\":\"e4bfef4808f030988cd1104ed5736863\",\"specificity\":\"default\"},{\"name\":\"grocery-web.sh.erb\",\"path\":\"templates/default/grocery-web.sh.erb\",\"checksum\":\"e1a16cf810169dcddbbe86b3df6ddd5a\",\"specificity\":\"default\"},{\"name\":\"production.conf.erb\",\"path\":\"templates/default/production.conf.erb\",\"checksum\":\"fa6e2e87a91e72ff8d7af72ddee23523\",\"specificity\":\"default\"}],\"resources\":[],\"providers\":[],\"root_files\":[{\"name\":\".kitchen.yml\",\"path\":\".kitchen.yml\",\"checksum\":\"523908c1b9d1e80be27a6cd484e1d683\",\"specificity\":\"default\"},{\"name\":\"chefignore\",\"path\":\"chefignore\",\"checksum\":\"03485640b005eb1083c76518764053dd\",\"specificity\":\"default\"},{\"name\":\"Gemfile\",\"path\":\"Gemfile\",\"checksum\":\"b8339e1333d3eb1a5bae7a8a1404210e\",\"specificity\":\"default\"},{\"name\":\"metadata.rb\",\"path\":\"metadata.rb\",\"checksum\":\"0be47cab339cffb8f06e0ea7ed25988c\",\"specificity\":\"default\"},{\"name\":\"README.md\",\"path\":\"README.md\",\"checksum\":\"3b55f0b0c92054e37264726ec354011a\",\"specificity\":\"default\"},{\"name\":\"Thorfile\",\"path\":\"Thorfile\",\"checksum\":\"e086e1b7927591877ffdd2e048538702\",\"specificity\":\"default\"}],\"chef_type\":\"cookbook_version\",\"name\":\"grocery-web-config-0.1.3\",\"cookbook_name\":\"grocery-web-config\",\"version\":\"0.1.3\",\"metadata\":{\"name\":\"grocery-web-config\",\"description\":\"Installs/Configures the grocery-web EC2 servers\",\"long_description\":\"grocery-web-config Cookbook\\n===========================\\nTODO: Enter the cookbook description here.\\n\\ne.g.\\nThis cookbook makes your favorite breakfast sandwhich.\\n\\nRequirements\\n------------\\nTODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.\\n\\ne.g.\\n#### packages\\n- `toaster` - grocery-web-config needs toaster to brown your bagel.\\n\\nAttributes\\n----------\\nTODO: List you cookbook attributes here.\\n\\ne.g.\\n#### grocery-web-config::default\\n<table>\\n  <tr>\\n    <th>Key</th>\\n    <th>Type</th>\\n    <th>Description</th>\\n    <th>Default</th>\\n  </tr>\\n  <tr>\\n    <td><tt>['grocery-app-config']['bacon']</tt></td>\\n    <td>Boolean</td>\\n    <td>whether to include bacon</td>\\n    <td><tt>true</tt></td>\\n  </tr>\\n</table>\\n\\nUsage\\n-----\\n#### grocery-web-config::default\\nTODO: Write usage instructions for each cookbook.\\n\\ne.g.\\nJust include `grocery-app-config` in your node's `run_list`:\\n\\n```json\\n{\\n  \\\"name\\\":\\\"my_node\\\",\\n  \\\"run_list\\\": [\\n    \\\"recipe[grocery-app-config]\\\"\\n  ]\\n}\\n```\\n\\n\\nLicense and Authors\\n-------------------\\nAuthors: TODO: List authors\\n\",\"maintainer\":\"Savings.com\",\"maintainer_email\":\"joe@savings.com\",\"license\":\"All rights reserved\",\"platforms\":{},\"dependencies\":{\"chef-client\":\"~> 2.1.10\",\"cron\":\"~> 1.2.2\",\"grocery-java\":\">= 0.0.0\",\"build-essential\":\">= 0.0.0\",\"mysql\":\">= 0.0.0\",\"python\":\">= 0.0.0\"},\"recommendations\":{},\"suggestions\":{},\"conflicting\":{},\"providing\":{},\"replacing\":{},\"attributes\":{},\"groupings\":{},\"recipes\":{},\"version\":\"0.1.3\"},\"frozen?\":true,\"json_class\":\"Chef::CookbookVersion\"}", :url=>#<Addressable::URI:0x3fe00e88cc68 URI:https://api.opscode.com:443/organizations/savings/cookbooks/grocery-web-config/0.1.3>, :request_headers=>{"Accept"=>"application/json", "Content-Type"=>"application/json", "X-Chef-Version"=>"11.4.0", "User-Agent"=>"Ridley v1.2.3", "X-OPS-SIGN"=>"algorithm=sha1;version=1.0;", "X-OPS-USERID"=>"jzulli", "X-OPS-TIMESTAMP"=>"2013-06-27T01:36:06Z", "X-OPS-CONTENT-HASH"=>"hFLn/nRNLDM6sCg5SeMXY6g8s28=", "X-OPS-"HOST"=>"api.opscode.com:443", "Content-Length"=>"3883"}, :parallel_manager=>nil, :request=>{:proxy=>nil}, :ssl=>{:verify=>true}}
> ==> handling Chef response
> request env: {:method=>:put, :body=>"{\"error\":[\"Invalid element in array value of 'files'.\"]}", :url=>#<Addressable::URI:0x3fe00e88cc68 URI:https://api.opscode.com:443/organizations/savings/cookbooks/grocery-web-config/0.1.3>, :request_headers=>{"Accept"=>"application/json", "Content-Type"=>"application/json", "X-Chef-Version"=>"11.4.0", "User-Agent"=>"Ridley v1.2.3", "X-OPS-SIGN"=>"algorithm=sha1;version=1.0;", "X-OPS-USERID"=>"jzulli", "X-OPS-TIMESTAMP"=>"2013-06-27T01:36:06Z", "X-OPS-CONTENT-HASH"=>"hFLn/nRNLDM6sCg5SeMXY6g8s28=", "HOST"=>"api.opscode.com:443", "Content-Length"=>"3883"}, :parallel_manager=>nil, :request=>{:proxy=>nil}, :ssl=>{:verify=>true}, :status=>400, :response_headers=>{"server"=>"ngx_openresty", "date"=>"Thu, 27 Jun 2013 01:36:02 GMT", "content-length"=>"56", "connection"=>"keep-alive", "x-ops-api-info"=>"flavor=ohc;version=10.0.0;oc_erchef=0.21.7"}, :response=>#<Faraday::Response:0x007fc01d6a51c8 @env={...}, @on_complete_callbacks=[]>}
> ** error encounted in Chef response
> Ridley::Errors::HTTPBadRequest: {"error":["Invalid element in array value of 'files'."]}
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/middleware/chef_response.rb:24:in `on_complete'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:9:in `block in call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:63:in `on_complete'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/middleware/chef_auth.rb:74:in `call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/middleware/retry.rb:29:in `call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in `run_request'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/connection.rb:104:in `run_request'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in `put'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `public_send'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in `block in handle_message'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in `block in initialize'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/tasks/task_thread.rb:21:in `block in create'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `block in create'
> (celluloid):0:in `remote procedure call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:95:in `value'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/proxies/sync_proxy.rb:28:in `method_missing'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/legacy.rb:14:in `method_missing'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/proxies/actor_proxy.rb:25:in `_send_'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/pool_manager.rb:41:in `_send_'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/pool_manager.rb:122:in `method_missing'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `public_send'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in `block in handle_message'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in `block in initialize'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in `block in create'
> (celluloid):0:in `remote procedure call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:95:in `value'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/proxies/sync_proxy.rb:28:in `method_missing'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/legacy.rb:14:in `method_missing'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/proxies/actor_proxy.rb:21:in `send'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/resource.rb:112:in `raw_request'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/resource.rb:103:in `request'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/resources/cookbook_resource.rb:158:in `update'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/ridley-1.2.3/lib/ridley/resources/cookbook_resource.rb:207:in `upload'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `public_send'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in `block in handle_message'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in `block in initialize'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in `block in create'
> (celluloid):0:in `remote procedure call'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb:95:in `value'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/proxies/sync_proxy.rb:28:in `method_missing'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/celluloid-0.14.1/lib/celluloid/legacy.rb:14:in `method_missing'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/berkshelf-2.0.5/lib/berkshelf/berksfile.rb:545:in `block in upload'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/berkshelf-2.0.5/lib/berkshelf/berksfile.rb:540:in `each'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/berkshelf-2.0.5/lib/berkshelf/berksfile.rb:540:in `upload'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/berkshelf-2.0.5/lib/berkshelf/cli.rb:229:in `upload'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/berkshelf-2.0.5/lib/berkshelf/cli.rb:21:in `dispatch'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/berkshelf-2.0.5/bin/berks:6:in `<top (required)>'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/bin/berks:23:in `load'
> /Users/jzulli/.rbenv/versions/1.9.3-p429/bin/berks:23:in `<main>'
> There was an error connecting to the Chef Server
> Terminating 6 actors...
> Shutdown completed cleanly
@sethvargo
Copy link
Contributor

@Enalmada sent me the full stack trace, and I was able to parse out this bit:

>> body['files']
[
    [0] {
               "name" => ".DS_Store",
               "path" => "files/.DS_Store",
           "checksum" => "016a9e9eb9105e86d89e944b65fdc7cf",
        "specificity" => nil
    },
    [1] {
               "name" => "deploy.py",
               "path" => "files/default/deploy.py",
           "checksum" => "b71ab2dcbfbed4becf8ecbd331391355",
        "specificity" => "default"
    }
]

I believe this is caused by #587.

The .DS_Store has no specificity, so the Chef Server is throwing a fit.

@ivey
Copy link
Contributor

ivey commented Jun 27, 2013

I suspect the root cause is that Ridley is not properly handling chefignore

@Enalmada
Copy link
Author

Good catch on the .DS_Store file. Yes, after removing that file it works. Oh finder. I am closing this with the assumption that it is a dupe and #587 will fix. Hopefully this ticket will help anyone googling the error to find deleting that file as a workaround.

@paulboone
Copy link

Also throws the error for "Invalid element in array value of 'templates'". Just adding this for future searchers.

@mannytoledo
Copy link

Also leaving a note for future searchers. To clear out your chef repo and cookbooks of '.DS_Store' files run this command and it will delete all .DS_Store files recursively.

find . -name '*.DS_Store' -type f -delete

@trinitronx
Copy link

A similar error is returned when a cookbook when an erb file is incorrectly placed in the templates folder (ie: my-cookbook/templates/example.erb). Removing this file fixed the problem.

(for googlers...)

Returned error was: Ridley::Errors::HTTPBadRequest: {"error":["Invalid element in array value of 'templates'."]}

Uploading my-coobook (0.0.1) to: 'https://chef-01.example.com:443/'
Ridley::Errors::HTTPBadRequest: {"error":["Invalid element in array value of 'templates'."]}
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/middleware/chef_response.rb:24:in `on_complete'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/faraday-0.8.8/lib/faraday/response.rb:9:in `block in call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/faraday-0.8.8/lib/faraday/response.rb:63:in `on_complete'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/faraday-0.8.8/lib/faraday/response.rb:8:in `call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/faraday-0.8.8/lib/faraday/response.rb:8:in `call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/faraday-0.8.8/lib/faraday/response.rb:8:in `call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/middleware/chef_auth.rb:74:in `call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/middleware/retry.rb:29:in `call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/faraday-0.8.8/lib/faraday/connection.rb:253:in `run_request'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/connection.rb:104:in `run_request'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/faraday-0.8.8/lib/faraday/connection.rb:118:in `put'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `public_send'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in `block in handle_message'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in `block in initialize'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/tasks/task_thread.rb:21:in `block in create'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `block in create'
(celluloid):0:in `remote procedure call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:95:in `value'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/proxies/sync_proxy.rb:28:in `method_missing'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/legacy.rb:14:in `method_missing'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/proxies/actor_proxy.rb:25:in `_send_'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/pool_manager.rb:41:in `_send_'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/pool_manager.rb:122:in `method_missing'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `public_send'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in `block in handle_message'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in `block in initialize'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in `block in create'
(celluloid):0:in `remote procedure call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:95:in `value'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/proxies/sync_proxy.rb:28:in `method_missing'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/legacy.rb:14:in `method_missing'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/proxies/actor_proxy.rb:21:in `send'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/resource.rb:132:in `raw_request'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/resource.rb:123:in `request'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/resources/cookbook_resource.rb:160:in `update'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/ridley-1.5.3/lib/ridley/resources/cookbook_resource.rb:209:in `upload'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `public_send'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in `block in handle_message'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in `block in initialize'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/tasks/task_thread.rb:21:in `block in create'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `block in create'
(celluloid):0:in `remote procedure call'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/calls.rb:95:in `value'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/proxies/sync_proxy.rb:28:in `method_missing'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/celluloid-0.14.1/lib/celluloid/legacy.rb:14:in `method_missing'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/berkshelf-2.0.10/lib/berkshelf/berksfile.rb:533:in `block in upload'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/berkshelf-2.0.10/lib/berkshelf/berksfile.rb:528:in `each'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/berkshelf-2.0.10/lib/berkshelf/berksfile.rb:528:in `upload'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/berkshelf-2.0.10/lib/berkshelf/cli.rb:229:in `upload'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/berkshelf-2.0.10/lib/berkshelf/cli.rb:21:in `dispatch'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/gems/berkshelf-2.0.10/bin/berks:6:in `<top (required)>'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/bin/berks:23:in `load'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/bin/berks:23:in `<main>'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/bin/ruby_executable_hooks:15:in `eval'
/Users/jcuzella/.rvm/gems/ruby-1.9.3-p392/bin/ruby_executable_hooks:15:in `<main>'
There was an error connecting to the Chef Server

@JC1738
Copy link

JC1738 commented Feb 5, 2014

Had the same problem with invalid element in array of files. This fixed it:

find . -name '*.DS_Store' -type f -delete

Glad found this issue/page.

@ichilton
Copy link

I'm also getting this problem with Berkshelf 2.0.14 if I have .keep or .gitkeep files to make sure certain directories in my cookbook are added to version control if they are empty.

@reset
Copy link
Contributor

reset commented Apr 10, 2014

This has been fixed on the master branch. A new version of Berkshelf will be released in the next week or so.

@dmorrison
Copy link

Just got the same error with Berkshelf 3.1.1. Stack trace here.

Fixed by doing find . -name '*.DS_Store' -type f -delete like @JC1738 did.

@patkaehuaea
Copy link

Same problem on 3.1.1. Same resolution as @dmorrison.

@darron
Copy link

darron commented Jun 6, 2014

I was having this problem today until I removed the .berkshelf/cookbooks/ directory and let the entire cookbook resolution happen from scratch.

@reset reset reopened this Jun 6, 2014
@reset reset added the Bug label Jun 6, 2014
@sethvargo
Copy link
Contributor

@reset why reopen this?

@reset
Copy link
Contributor

reset commented Jun 10, 2014

@sethvargo couldn't find proper documentation that this is actually fixed on master

@jjdevbiz
Copy link

I'm having the same issue, neither previously mentioned resolution of removing .berkshelf/cookbooks or find . -name '*.DS_Store' -type f -delete is working for me.

@jjdevbiz
Copy link

I was using 3.1.1 from chefdk. Tried 3.1.3 from gem install and same issue.

@micxer
Copy link

micxer commented Jun 28, 2014

Just had the same issue with 3.1.1 from chefdk. Only removing all cookbooks from ~/.berkshelf/cookbooks resolved it.

@Sauraus
Copy link

Sauraus commented Aug 11, 2014

find . -name '*.DS_Store' -type f -delete worked for me with chefdk.

@reset
Copy link
Contributor

reset commented Aug 11, 2014

@micxer @jjdevbiz @Sauraus do you have .DS_Store in the cookbook's chefignore file?

@benjohnson77
Copy link

thanks for find . -name '*.DS_Store' -type f -delete

@kameshsampath
Copy link

Thanks all find . -name '*.DS_Store' -type f -delete worked for me and is there anyother way, i doubt we could have that ignored or something, i have it in my chefignore and.gitignore as well

@sethvargo
Copy link
Contributor

I've moved this issue to Ridley (since that's the actual uploader)

@danieljimenez
Copy link

find . -name '*.DS_Store' -type f -delete worked for me as well.

@florianb
Copy link

Unfortunately this problem was not solved for me (berks version 3.2.3) and it also had nothing to do with any .DS_Store-files.

My error was caused by having files placed directly in the files/template-folder.

I was able to solve the problem by moving the designated files into an additional subdirectory:

Wrong

files/
└── distribute.sh

lead to:
E, [2015-03-16T17:57:59.138178 #71706] ERROR -- : Ridley::Errors::HTTPBadRequest: {"error":["Invalid element in array value of 'files'."]}

Right

files/
└── postgres
    └── distribute.sh

@rudymccomb
Copy link

happened to me too solution was

find . -name '*.DS_Store' -type f -delete
Skipping runit (1.5.16) (frozen)
E, [2015-04-08T18:02:41.743441 #23234] ERROR -- : Ridley::Errors::HTTPBadRequest: {"error":["Invalid element in array value of 'templates'."]}
E, [2015-04-08T18:02:41.743912 #23234] ERROR -- : /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.1.0/lib/ridley/middleware/chef_response.rb:24:in `on_complete'

@jasonwbarnett
Copy link
Contributor

I just thought that I would share that this happened to me recently and I was able to resolve it by recursively removing all of the .keep files in the cookbook. e.g.

find . -name '.keep' -delete

@gigo6000
Copy link

gigo6000 commented Dec 2, 2015

Thanks @florianb that was my problem not any .DS_Store files.

@berkshelf berkshelf locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests