Compiling selenium webdriver source - buck issues - selenium

Been spending yesterday compiling the open source Appium tool, and today Selenium.
Between the projects, on Windows, I've had to install different versions of the JDK, ruby, python 2.7 (I had 3.6), git, ffmpeg, opencv4nodejs,nodejs, npm, choco and a variety of other random tools and utilities. cmake. Bundletool. Ant.
Anyway, I've gotten further than I've gotten before, but now for the last few hours I'm stuck.
go.bat clean executes fine
go.bat <anything else> seems to fail, whether its used with test_java, test_htmlunit, build, test_firefox and more.
However, I've not been able to track down where in the miles of rake/buck stuff the actual error is coming from.
An example:
go.bat test_java
Output:
$ ./go.bat test_java
C:\Users\mayom\selenium>java -Xmx4096m -XX:MetaspaceSize=1024m
-XX:ReservedCodeCacheSize=512m -client -jar third_party/jruby/jruby-complete.jar -X-C -S rake test_java python
buckw kill python buckw build --stamp-build=detect --deep
//java/client/test/org/openqa/selenium/atoms:test Starting new Buck
daemon... PARSING BUCK FILES: FINISHED IN 1.7s CREATING ACTION GRAPH:
FINISHED IN 0.4s BUILT 145/223 JOBS 1.2s //javascript/webdriver:key
BUILT 146/223 JOBS 4.1s
//java/client/src/org/openqa/selenium/remote:remote-gen-manifest BUILT
147/223 JOBS 4.8s //third_party/java/jetty:jetty-gen-manifest BUILT
148/223 JOBS 4.5s
//java/client/src/org/openqa/selenium:core-gen-manifest BUILT 149/223
JOBS 1.9s
//java/client/src/org/openqa/selenium/remote:remote-lib-build-info
BUILT 150/223 JOBS 1.3s
//java/client/src/org/openqa/selenium:core-lib-build-info BUILT
151/223 JOBS 2.7s //third_party/java/jetty:jetty-lib-build-info BUILT
181/223 JOBS 1.3s
//java/client/src/org/openqa/selenium/remote:remote-lib-build-info#class-abi
BUILT 185/223 JOBS 1.3s
//third_party/java/jetty:jetty-lib-build-info#class-abi BUILT 189/223
JOBS 0.2s //javascript/atoms:events BUILT 197/223 JOBS 0.8s
//javascript/atoms:inject BUILT 198/223 JOBS 1.4s
//java/client/src/org/openqa/selenium:core-lib-build-info#class-abi
BUILT 199/223 JOBS 0.8s //javascript/atoms:locators BUILT 200/223 JOBS
0.9s //javascript/atoms:html5 BUILT 201/223 JOBS 0.5s //javascript/atoms:devices BUILT 206/223 JOBS 0.4s
//javascript/atoms:action BUILT 207/223 JOBS 0.2s
//javascript/webdriver/atoms:atoms-lib STILL BUILDING
//third_party/java/jetty:move-services (20 seconds) STILL BUILDING
//javascript/atoms/fragments:execute_script (20 seconds) STILL
BUILDING //javascript/webdriver/atoms:inputs (20 seconds)
C:\Users\mayom\selenium\buck-out\gen\third_party\java\jetty\move-services__srcs>md
tmp && cd tmp && jar xf
C:\Users\mayom\selenium\buck-out\gen\third_party\java\jetty\bundle-jars.jar
&& del META-INF/services/* && echo
org.seleniumhq.jetty9.http.Http1FieldPreEncoder
1>META-INF\services\org.seleniumhq.jetty9.http.HttpFieldPreEncoder &&
jar cvf
C:\Users\mayom\selenium\buck-out\gen\third_party\java\jetty\move-services\moved-bundle.jar
*
Parameter format not correct - "services".
STILL BUILDING //javascript/atoms/fragments:execute_script (40
seconds) STILL BUILDING //javascript/webdriver/atoms:inputs (40
seconds) BUILT 209/223 JOBS 45.2s
//javascript/atoms/fragments:execute_script BUILT 210/223 JOBS 50.8s
//javascript/webdriver/atoms:inputs DOWNLOADED 0 ARTIFACTS, 0.00
BYTES, 100.0% CACHE MISS BUILDING: FINISHED IN 1m 2.4s (100%) 210/223
JOBS, 20 UPDATED BUILD FAILED Command failed with exit code 1. stderr:
Parameter format not correct - "services".
When running <genrule>.
When building rule //third_party/java/jetty:move-services. go aborted! python buckw build --stamp-build=detect --deep
//java/client/test/org/openqa/selenium/atoms:test failed with exit
code: 1 C:/Users/mayom/selenium/rake-tasks/buck.rb:52:in block in
buck_cmd' C:/Users/mayom/selenium/rake-tasks/buck.rb:36:inbuck_cmd'
C:/Users/mayom/selenium/rake-tasks/buck.rb:227:in `block in (root)'
Tasks: TOP => test_java =>
//java/client/test/org/openqa/selenium/atoms:test:run =>
//java/client/test/org/openqa/selenium/atoms:test (See full trace by
running task with --trace)
And if I run it with --trace:
$ ./go.bat test_java --trace
C:\Users\mayom\selenium>java -Xmx4096m -XX:MetaspaceSize=1024m
-XX:ReservedCodeCacheSize=512m -client -jar third_party/jruby/jruby-complete.jar -X-C -S rake test_java --trace
Parsing cpp/build.desc Parsing cpp/iedriverserver/build.desc Parsing
javascript/build.desc Parsing javascript/android-atoms/build.desc
Parsing javascript/atoms/build.desc Parsing
javascript/atoms/fragments/build.desc Parsing
javascript/chrome-driver/build.desc Parsing
javascript/ie-driver/build.desc Parsing javascript/jsunit/build.desc
Parsing javascript/node/build.desc Parsing
javascript/remote/build.desc Parsing
javascript/selenium-atoms/build.desc Parsing
javascript/selenium-core/build.desc Parsing
javascript/webdriver/build.desc Parsing
javascript/webdriver/atoms/build.desc Parsing
javascript/webdriver/atoms/fragments/build.desc Parsing
javascript/webdriver/atoms/fragments/inject/build.desc Parsing
javascript/webdriver/atoms/inject/build.desc Parsing py/build.desc
Parsing rb/build.desc Parsing third_party/closure/build.desc Parsing
third_party/firebug/build.desc Parsing third_party/jruby/build.desc
Parsing third_party/js/sizzle/build.desc Parsing
third_party/js/wgxpath/build.desc
** Invoke test_java (first_time)
** Invoke //java/client/test/org/openqa/selenium/atoms:test:run (first_time)
** Invoke //java/client/test/org/openqa/selenium/atoms:test (first_time)
** Execute //java/client/test/org/openqa/selenium/atoms:test python buckw kill python buckw build --stamp-build=detect --deep
//java/client/test/org/openqa/selenium/atoms:test Starting new Buck
daemon... PARSING BUCK FILES: FINISHED IN 1.7s CREATING ACTION GRAPH:
FINISHED IN 0.5s BUILT 146/223 JOBS 3.9s
//java/client/src/org/openqa/selenium/remote:remote-gen-manifest BUILT
147/223 JOBS 4.2s
//java/client/src/org/openqa/selenium:core-gen-manifest BUILT 148/223
JOBS 4.4s //third_party/java/jetty:jetty-gen-manifest BUILT 155/223
JOBS 0.8s
//java/client/src/org/openqa/selenium:core-lib-build-info#class-abi
BUILT 179/223 JOBS 2.5s //third_party/java/jetty:jetty-lib-build-info
BUILT 187/223 JOBS 2.8s
//java/client/src/org/openqa/selenium/remote:remote-lib-build-info
BUILT 189/223 JOBS 0.8s
//java/client/test/org/openqa/selenium/atoms:execute_script BUILT
191/223 JOBS 1.4s
//third_party/java/jetty:jetty-lib-build-info#class-abi BUILT 195/223
JOBS 2.7s //java/client/src/org/openqa/selenium:core-lib-build-info
BUILT 206/223 JOBS 0.7s
//java/client/test/org/openqa/selenium/atoms:atoms_inputs BUILT
207/223 JOBS 1.2s
//java/client/src/org/openqa/selenium/remote:remote-lib-build-info#class-abi
C:\Users\mayom\selenium\buck-out\gen\third_party\java\jetty\move-services__srcs>md
tmp && cd tmp && jar xf
C:\Users\mayom\selenium\buck-out\gen\third_party\java\jetty\bundle-jars.jar
&& del META-INF/services/* && echo
org.seleniumhq.jetty9.http.Http1FieldPreEncoder
1>META-INF\services\org.seleniumhq.jetty9.http.HttpFieldPreEncoder &&
jar cvf
C:\Users\mayom\selenium\buck-out\gen\third_party\java\jetty\move-services\moved-bundle.jar
*
Parameter format not correct - "services".
DOWNLOADED 0 ARTIFACTS, 0.00 BYTES, 100.0% CACHE MISS BUILDING:
FINISHED IN 14.2s (100%) 212/223 JOBS, 12 UPDATED BUILD FAILED Command
failed with exit code 1. stderr: Parameter format not correct -
"services".
When running <genrule>.
When building rule //third_party/java/jetty:move-services. Exception `RuntimeError' at
C:/Users/mayom/selenium/rake-tasks/buck.rb:52 - python buckw build
--stamp-build=detect --deep //java/client/test/org/openqa/selenium/atoms:test failed with exit
code: 1 Exception #<Class:#<RuntimeError:0x1ee40b5c>>' at
C:/Users/mayom/selenium/rake-tasks/buck.rb:52 - python buckw build
--stamp-build=detect --deep //java/client/test/org/openqa/selenium/atoms:test failed with exit
code: 1 Exception#>' at
C:/Users/mayom/selenium/rake-tasks/buck.rb:52 - python buckw build
--stamp-build=detect --deep //java/client/test/org/openqa/selenium/atoms:test failed with exit
code: 1 Exception #<Class:#<RuntimeError:0x1ee40b5c>>' at
C:/Users/mayom/selenium/rake-tasks/buck.rb:52 - python buckw build
--stamp-build=detect --deep //java/client/test/org/openqa/selenium/atoms:test failed with exit
code: 1 go aborted! python buckw build --stamp-build=detect --deep
//java/client/test/org/openqa/selenium/atoms:test failed with exit
code: 1 C:/Users/mayom/selenium/rake-tasks/buck.rb:52:inblock in
buck_cmd' org/jruby/RubyIO.java:4902:in popen3'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jruby/open3_windows.rb:74:in
popen3' C:/Users/mayom/selenium/rake-tasks/buck.rb:36:in buck_cmd'
C:/Users/mayom/selenium/rake-tasks/buck.rb:227:inblock in (root)'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:240:in block in
execute' org/jruby/RubyArray.java:1735:ineach'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:235:in execute'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:179:inblock in
invoke_with_call_chain'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:214:in
mon_synchronize'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:172:in
invoke_with_call_chain'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:201:in block in
invoke_prerequisites' org/jruby/RubyArray.java:1735:ineach'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:199:in
invoke_prerequisites'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:178:inblock in
invoke_with_call_chain'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:214:in
mon_synchronize'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:172:in
invoke_with_call_chain'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:201:in block in
invoke_prerequisites' org/jruby/RubyArray.java:1735:ineach'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:199:in
invoke_prerequisites'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:178:inblock in
invoke_with_call_chain'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:214:in
mon_synchronize'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:172:in
invoke_with_call_chain'
uri:classloader:/gems/rake-10.5.0/lib/rake/task.rb:165:in invoke'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:150:in
invoke_task'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:106:in
block in top_level' org/jruby/RubyArray.java:1735:ineach'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:106:in
block in top_level'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:115:in
run_with_threads'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:100:in
top_level'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:78:inblock
in run'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:176:in
standard_exception_handling'
uri:classloader:/gems/rake-10.5.0/lib/rake/application.rb:75:inrun'
uri:classloader:/gems/rake-10.5.0/bin/rake:33:in <main>'
org/jruby/RubyKernel.java:973:inload'
uri:classloader:/META-INF/jruby.home/bin/rake:1:in `' Tasks: TOP
=> test_java => //java/client/test/org/openqa/selenium/atoms:test:run => //java/client/test/org/openqa/selenium/atoms:test
The parameter 'services'? I can't find for the life of me where that complaint is coming from. Would appreciate anyone with a more indepth knowledge of rake/buck etc than myself.

Related

Trying to read a webpage in Hound, I get a compilation error for Hound.start_session

I started a new project and configured it like so:
mix new example
cd example
I emptied ´lib/example.ex´ and placed the following code there:
Application.start :hound
defmodule Example do
use Hound.Helpers
def run do
Hound.start_session
navigate_to "http://akash.im"
IO.inspect page_title()
# Automatically invoked if the session owner process crashes
Hound.end_session
end
end
Example.run
This is the sample code provided at https://github.com/HashNuke/hound/blob/master/notes/simple-browser-automation.md
Then I installed Selenium server via brew install selenium-server-standalone (I'm on MacOS), started it via brew services start selenium-server-standalone and added config :hound, driver: "selenium" to config/config.exs
I added Application.ensure_all_started(:hound) as the first line of test/test_helper.exs.
Finally, I added {:hound, "~> 1.0"} to mix.exs and ran mix test. That is when I get the following compilation error:
localhost:example alex$ mix test
===> Compiling parse_trans
===> Compiling mimerl
===> Compiling metrics
===> Compiling unicode_util_compat
===> Compiling idna
==> jason
Compiling 8 files (.ex)
Generated jason app
==> ssl_verify_fun
Compiling 7 files (.erl)
Generated ssl_verify_fun app
===> Compiling certifi
===> Compiling hackney
==> hound
Compiling 37 files (.ex)
Generated hound app
==> example
Compiling 1 file (.ex)
== Compilation error in file lib/example.ex ==
** (ArgumentError) argument error
(stdlib) :ets.lookup(Hound.SessionServer, #PID<0.592.0>)
(hound) lib/hound/session_server.ex:19: Hound.SessionServer.current_session_id/1
(hound) lib/hound/session_server.ex:13: Hound.SessionServer.session_for_pid/2
lib/example.ex:7: Example.run/0
localhost:example alex$ mix test
Compiling 1 file (.ex)
== Compilation error in file lib/example.ex ==
** (ArgumentError) argument error
(stdlib) :ets.lookup(Hound.SessionServer, #PID<0.160.0>)
(hound) lib/hound/session_server.ex:19: Hound.SessionServer.current_session_id/1
(hound) lib/hound/session_server.ex:13: Hound.SessionServer.session_for_pid/2
lib/example.ex:7: Example.run/0
Am I forgetting a step somewhere or configuring things incorrectly? Any help immensely appreciated, thanks!
I emptied lib/example.ex and placed the following code there:
defmodule Example do
...
end
Example.run
There is a difference between .ex files and .exs files. You decided to put that code in the application's main .ex file. Get rid of this line:
Example.run
Then, to execute Example.run() you do this:
.../example$ iex -S mix
iex(1)> Example.run
"Akash Manohar // #HashNuke"
:ok
Or, you can change the extension to .exs, then run the code with this:
.../example$ mix run lib/example.exs
On the other hand, if you want mix test to run a test, then you have to put the test in the test directory. For example:
defmodule ExampleTest do
use ExUnit.Case
use Hound.Helpers
test "page title is correct" do
Hound.start_session
navigate_to "http://akash.im"
#IO.inspect page_title()
assert page_title() == "Akash Manohar // #HashNuke"
Hound.end_session
end
end
In the hound exunit example here, the hound_session() call caused an error for me:
15:06:33.736 [error] GenServer Hound.SessionServer terminating
** (RuntimeError) could not create a new session: timeout, check webdriver is running
(hound) lib/hound/session_server.ex:101: Hound.SessionServer.create_session/2

Objective-C Travis failed for 'Test runner exited before starting test execution'

Here is my code in .travis.yml file,after run build is passing, but I found the TEST are failed. I have no idea about this and block me a few days, appreciate your help. THX
--- Error as below ---
2018-12-20 05:57:42.698 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: (CB8F382A-5B77-4BDA-BC4F-6EDF7B7DB822)
Beginning test session aaaaTests-CB8F382A-5B77-4BDA-BC4F-6EDF7B7DB822 at 2018-
12-20 05:57:42.698 with Xcode 10A255 on target <DVTiPhoneSimulator:
0x7f86387e49d0> {
SimDevice: iPhone 6 (B25EC6DB-0B2F-4920-B6C2-8560331BA779, iOS 9.1, Booted)
} (9.1 (13B143))
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 11.068 elapsed -- Testing started completed.
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 11.068 sec, +11.068 sec -- end
2018-12-20 05:57:53.746 xcodebuild[2394:8186] Error
Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit,
operation never finished bootstrapping - no restart will be attempted"
UserInfo={NSLocalizedDescription=Early unexpected exit, operation never
finished bootstrapping - no restart will be attempted,
NSUnderlyingError=0x7f86389df930 {Error
Domain=IDETestOperationsObserverErrorDomain Code=5 "Test runner exited before
starting test execution." UserInfo={NSLocalizedDescription=Test runner exited
before starting test execution., NSLocalizedRecoverySuggestion=If you believe
this error represents a bug, please attach the result bundle at
/Users/travis/Library/Developer/Xcode/DerivedData/aaaa-
bdscsxnorhzvygafnsqdiqoriugx/Logs/Test/Run-aaaa-2018.12.20_05-57-22-
+0000.xcresult}}}
Testing failed:
aaaa.app (2488) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. Underlying error: Test runner exited before starting test execution.)
** TEST FAILED **
The command "set -o pipefail && xcodebuild -workspace aaaa.xcworkspace -scheme aaaa -destination platform\=iOS\ Simulator,OS\=9.1,name\=iPhone\ 6 build test | xcpretty" exited with 65.
Done. Your build exited with 1.
---My code as below---
language: objective-c
osx_image: xcode10
xcode_workspace: aaaa.xcworkspace
xcode_scheme: aaaa
xcode_destination: platform=iOS Simulator,OS=9.1,name=iPhone 6
before_install:
- pod repo update
- npm install ios-sim -g
- ios-sim start --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-6, 9.1"
The issue can fix by below step:
change the version of osx_image in .travis.yml file and retry
// if xcode10.1 build failed, you can change to other version, like xcode9.4
osx_image: xcode10.1
Travis support xcode version list:
https://docs.travis-ci.com/user/languages/objective-c/

Chef-client dying mid run

We recently started having trouble with chef-client dying in the middle of a run after taking a lot more time stuck on various parts of the run-list that normally proceeded much quicker. I've been on my home wifi and my colleague has been on the work wifi, which has been having some connectivity problems of its own.
If your ssh connection gets interrupted to a machine while chef-client is running, does that crash the run in seemingly inexplicable ways? I am using PutTY to connect from my Win7 and my colleague is using the Apple Terminal App.
All the machines we've been running this on are Ubuntu 12.04 (in EC2) and have plenty of disk space left over - they're only utilizing ~1GB with ~5GB free.
Here is the output of the log from /var/log/chef/client.log (set with the log_location directive in /etc/chef/client.rb as described here).
[2014-01-08T00:27:07+00:00] WARN: Nodejs user is nodejs
[2014-01-08T00:27:07+00:00] WARN: Cloning resource attributes for group[nodejs] from prior resource (CHEF-3694)
[2014-01-08T00:27:07+00:00] WARN: Previous group[nodejs]: /var/chef/cache/cookbooks/nodejs/recipes/default.rb:26:in `from_file'
[2014-01-08T00:27:07+00:00] WARN: Current group[nodejs]: /var/chef/cache/cookbooks/spicoli-app/recipes/default.rb:38:in `from_file'
[2014-01-08T00:27:07+00:00] WARN: Cloning resource attributes for user[nodejs] from prior resource (CHEF-3694)
[2014-01-08T00:27:07+00:00] WARN: Previous user[nodejs]: /var/chef/cache/cookbooks/nodejs/recipes/default.rb:34:in `from_file'
[2014-01-08T00:27:07+00:00] WARN: Current user[nodejs]: /var/chef/cache/cookbooks/spicoli-app/recipes/default.rb:46:in `from_file'
[2014-01-08T00:27:30+00:00] WARN: Environment is _default
[2014-01-08T00:27:30+00:00] WARN: Nodejs user is nodejs
[2014-01-08T02:04:54+00:00] ERROR: Running exception handlers
[2014-01-08T02:04:54+00:00] ERROR: Exception handlers complete
[2014-01-08T02:04:54+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-01-08T02:04:55+00:00] ERROR: Input/output error - <STDOUT>
[2014-01-08T02:04:57+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
And the error stacktrace just has this:
Generated at 2014-01-08 02:04:54 +0000
Errno::EIO: Input/output error - <STDOUT>
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/base.rb:91:in `write'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/base.rb:91:in `puts'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/base.rb:91:in `puts'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/error_descriptor.rb:61:in `display_section'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/error_descriptor.rb:44:in `block (2 levels) in display'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/error_descriptor.rb:43:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/error_descriptor.rb:43:in `block in display'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/error_descriptor.rb:42:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/error_descriptor.rb:42:in `display'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/base.rb:130:in `display_error'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/base.rb:161:in `resource_failed'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/formatters/doc.rb:159:in `resource_failed'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/event_dispatch/dispatcher.rb:29:in `block in resource_failed'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/event_dispatch/dispatcher.rb:29:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/event_dispatch/dispatcher.rb:29:in `resource_failed'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource.rb:637:in `rescue in run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource.rb:643:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:49:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:80:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:433:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:500:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:199:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:193:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:193:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application.rb:208:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/client.rb:312:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/client.rb:304:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/client.rb:304:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application.rb:66:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23:in `<main>'
Which is a really generic error! But it does seem to indicate an interruption to STDOUT output, which kind of makes sense with a client disconnection.
Edit: As requested, here are the contents of the client.rb file (names obfuscated, naturally.)
$ cat /etc/chef/client.rb
log_level :auto
log_location "/var/log/chef/client.log"
chef_server_url "https://api.opscode.com/organizations/myapp"
validation_client_name "my-validator"
node_name "my-app-node"
Edit 2: Attempt using sudo su -s /bin/bash root -c "screen chef-client"
Screen terminated while I was at lunch and recorded a timeout on the ShellOut command for npm install. This was after chef-client was sitting stuck on this operation for over an hour.
[2014-01-09T16:39:07+00:00] WARN: Environment is _default
[2014-01-09T16:39:07+00:00] WARN: Nodejs user is nodejs
[2014-01-09T18:16:28+00:00] ERROR: Running exception handlers
[2014-01-09T18:16:28+00:00] ERROR: Exception handlers complete
[2014-01-09T18:16:28+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-01-09T18:16:31+00:00] ERROR: execute[npm-install-app] (spicoli-app::default line 110) had an error: Mixlib::ShellOut::CommandTimeout: command timed out:
---- Begin output of npm --registry http://my.npm.repo.amazonaws.com:5984/registry/_design/app/_rewrite install --cache /home/nodejs/.npm --tmp /home/nodejs/tmp
--- snip: install messages from npm ---
[2014-01-09T18:16:33+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
This is a totally different error than before. The stacktrace.out file also explicitly mentions ShellOut, so it is entirely different as well. Most oddly, when I run the same npm command from the command line, in finishes in under a minute.
So I'm not sure there is a way to further diagnose the previous failure, but I would welcome other suggestions. For input on this new failure, I asked this followup question.
If your ssh connection gets interrupted to a machine while chef-client is running, does that crash the run in seemingly inexplicable ways?
Well, the stacktrace seems to imply that something like that is happening. The message says "Errno::EIO: Input/output error - <STDOUT>" which is consistent with what I'd expect to see if STDOUT was going over an SSH channel that had been closed.
I suggest 2 things:
Run chef-client with all console output redirected to a file; e.g. add > /tmp/log 2>&1 to the end of the command. (The redirection needs to happen on the remote machine.)
Add -l debug to the command to increase the level of logging, as covered in Opscode's technical FAQ. This could reveal clues that are currently being hidden.
Looking at your second update, this has the hallmarks of some kind of firewall or network related problem.

xcodebuild failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' via Jenkins

error: failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' -- failed to get the task for process 34796
Hi,
When I run the command:
/usr/bin/xcodebuild -scheme my_scheme_name -configuration Debug build test
I get the following error:
error: failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' -- failed to get the task for process 34796
This only happens when the command is executed via Jenkins. Doesn't happen when I execute it from command line.
Has anyone else run into something like this?
The build itself builds an objective c library and the tests are SenTestCases. It's not an iOS app - it's an objective c library to be used in various apps
I used sudo DevToolsSecurity -enable to get past this problem.

Rails: Error on rake jobs:work, but Delayed Job not installed

All:
My error logs show heroku crashing on a rake task, rake jobs:work.
The problem is, I don't have a rake task called jobs or work. I only have one, called cron.
In that task, there's no Delayed Job stuff at all, and nowhere does the word 'jobs' or 'work' appear.
I've also looked in the Config files, and no trace of anything about Delayed Job. It's also not in Vendor/plugins.
Any ideas where the hidden rake task might be?
here's the error code:
2012-01-03T20:28:45+00:00 heroku[worker.3]: State changed from crashed to created
2012-01-03T20:28:45+00:00 heroku[worker.3]: State changed from created to starting
2012-01-03T20:28:48+00:00 heroku[worker.3]: Starting process with command `rake jobs:work`
2012-01-03T20:28:48+00:00 app[worker.3]: (in /app)
2012-01-03T20:28:48+00:00 heroku[worker.3]: State changed from starting to up
2012-01-03T20:28:49+00:00 app[worker.3]: rake aborted!
2012-01-03T20:28:49+00:00 app[worker.3]: Don't know how to build task 'jobs:work'
2012-01-03T20:28:49+00:00 app[worker.3]:
2012-01-03T20:28:49+00:00 app[worker.3]: (See full trace by running task with --trace)
2012-01-03T20:28:50+00:00 heroku[worker.3]: State changed from up to crashed
2012-01-03T20:28:51+00:00 heroku[worker.3]: Process exited
2012-01-03T20:28:53+00:00 app[web.9]:
Here's the --trace code
MacBook-Air:patientapp dougsmith$ heroku rake jobs:work --trace
(in /app)
rake aborted!
Don't know how to build task 'jobs:work'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/app/.bundle/gems/ruby/1.8/bin/rake:19:in `load'
/app/.bundle/gems/ruby/1.8/bin/rake:19
MacBook-Air:patientapp dougsmith$
Do you have 1 or more Heroku worker dyno/s configured?
Looks like Heroku default Procfile run the command
worker bundle exec rake jobs:work
for Rails apps. Probably, editing/creating a procfile without this command makes the trick.
More info:
https://devcenter.heroku.com/articles/procfile
This happened to me. I found that delayed job had been in use before I started work on the site. A worker dyno was still configured for it. After removing that dyno the error went away.