johnbintz / jasmine-headless-webkit

This project is dead. You should use Karma instead. I do.
http://karma-runner.github.io/
196 stars 99 forks source link

no implicit conversion from nil to integer (TypeError) #151

Open monkeywidget opened 12 years ago

monkeywidget commented 12 years ago

Similar to issue #133 https://github.com/johnbintz/jasmine-headless-webkit/issues/133

I'm on RHEL6, and trying to run jasmine-headless-webkit so I can get my jasmine tests into a Jenkins CI installation.

I see this error and I have no idea where to go next.

In general, what does [jasmine-headless-webkit] no implicit conversion from nil to integer (TypeError) ...imply is happening?

Am I missing a package or gem? I've included a list of my Qt and Xvfb packages below.

Note that I did have to link "qmake" to the qmake installed:

ln -s /usr/bin/qmake-qt4 /usr/bin/qmake

Here's what my command looks like: $ xvfb-run jasmine-headless-webkit -c -j test/jasmine.yml [WARNING] MultiJson is using the default adapter (ok_json). We recommend loading a different JSON library to improve performance. loaded the Generic plugin can't make "generic.orientation" because no QAccelerometer sensors exist

Test ordering seed: --seed 6536 [jasmine-headless-webkit] no implicit conversion from nil to integer (TypeError) /usr/local/rvm/gems/ruby-1.8.7-p358/gems/jasmine-headless-webkit-0.8.4/lib/jasmine/headless/command_line.rb:18:in exit' /usr/local/rvm/gems/ruby-1.8.7-p358/gems/jasmine-headless-webkit-0.8.4/lib/jasmine/headless/command_line.rb:18:inrun!' /usr/local/rvm/gems/ruby-1.8.7-p358/gems/jasmine-headless-webkit-0.8.4/bin/jasmine-headless-webkit:10 /usr/local/rvm/gems/ruby-1.8.7-p358/bin/jasmine-headless-webkit:19:in `load' /usr/local/rvm/gems/ruby-1.8.7-p358/bin/jasmine-headless-webkit:19 /usr/local/rvm/gems/ruby-1.8.7-p358/bin/ruby_noexec_wrapper:14 [builder@jejunum-jasmine snf-ui]$ xvfb-run bundle exec jasmine-headless-webkit -c -j test/jasmine.yml Could not locate Gemfile

[builder@jejunum-jasmine snf-ui]$ rpm -qa | grep qt qt-x11-4.7.4-0.el6.x86_64 qt-devel-4.7.4-0.el6.x86_64 qt-mobility-1.1.3-2.el6.x86_64 qt-sqlite-4.7.4-0.el6.x86_64 qtwebkit-2.1.1-1.el6.x86_64 qt-4.7.4-0.el6.x86_64 qtwebkit-devel-2.1.1-1.el6.x86_64 [builder@jejunum-jasmine snf-ui]$ rpm -qa | grep xorg xorg-x11-proto-devel-7.4-35.el6.noarch xorg-x11-xauth-1.0.2-7.1.el6.x86_64 xorg-x11-server-common-1.10.4-6.el6.x86_64 xorg-x11-xkb-utils-7.4-6.el6.x86_64 xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64 xorg-x11-drv-ati-firmware-6.13.0-6.el6.noarch [builder@jejunum-jasmine snf-ui]$

Thanks in advance!

monkeywidget commented 12 years ago

I've altered jasmine-headless-webkit-0.8.4/lib/jasmine/headless/command_line.rb -

          if options[:do_list]
            FilesList.reset!

            files_list = FilesList.new(:config => runner.jasmine_config)
            files_list.files.each { |file| puts file }
          else
            $stderr.puts "BLAH!!"
            if runner && runner.run
              exit runner.run
            elsif runner
              $stderr.puts "runner but no runner.run"
            else
              $stderr.puts "runner failed!"
            end
          end

now the error is:

$ DISPLAY=:0 jasmine-headless-webkit --runner-out jhw-out.html
BLAH!!
[WARNING] MultiJson is using the default adapter (ok_json). We recommend loading a different JSON library to improve performance.
loaded the Generic plugin
can't make "generic.orientation" because no QAccelerometer sensors exist

Test ordering seed: --seed 9789
runner but no runner.run
$
monkeywidget commented 12 years ago

UPDATE: I've pulled out the command run in the "system" call in runner.rb . Looks like /jasmine-webkit-specrunner is failing:

$ DISPLAY=:0 /usr/local/rvm/gems/ruby-1.8.7-p358/gems/jasmine-headless-webkit-0.8.4/ext/jasmine-webkit-specrunner/jasmine-webkit-specrunner jhw-out.html loaded the Generic plugin can't make "generic.orientation" because no QAccelerometer sensors exist Segmentation fault

running gdb: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff747ed64 in ?? () from /usr/lib64/libQtWebKit.so.4 Missing separate debuginfos, use: debuginfo-install dbus-libs-1.2.24-4.el6_0.x86_64 expat-2.0.1-9.1.el6.x86_64 fontconfig-2.8.0-3.el6.x86_64 freetype-2.3.11-6.el6_0.2.x86_64 glib2-2.22.5-5.el6.x86_64 glibc-2.12-1.25.el6.x86_64 keyutils-libs-1.4-1.el6.x86_64 krb5-libs-1.8.2-3.el6.x86_64 libICE-1.0.6-1.el6.x86_64 libSM-1.1.0-7.1.el6.x86_64 libX11-1.3-2.el6.x86_64 libXau-1.0.5-1.el6.x86_64 libXcursor-1.1.10-2.el6.x86_64 libXdamage-1.1.2-1.el6.x86_64 libXext-1.1-3.el6.x86_64 libXfixes-4.0.4-1.el6.x86_64 libXi-1.3-3.el6.x86_64 libXinerama-1.1-1.el6.x86_64 libXrandr-1.3.0-4.el6.x86_64 libXrender-0.9.5-1.el6.x86_64 libXtst-1.0.99.2-3.el6.x86_64 libXxf86vm-1.1.0-1.el6.x86_64 libasyncns-0.8-1.1.el6.x86_64 libcom_err-1.41.12-3.el6.x86_64 libdrm-2.4.23-1.el6.x86_64 libgcc-4.4.5-6.el6.x86_64 libpng-1.2.44-1.el6.x86_64 libselinux-2.0.94-2.el6.x86_64 libsndfile-1.0.20-3.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64 libuuid-2.17.2-6.el6.x86_64 libxcb-1.5-1.el6.x86_64 mesa-libGL-7.10-1.el6.x86_64 mesa-libGLU-7.10-1.el6.x86_64 openssl-1.0.0-4.el6.x86_64 pulseaudio-libs-0.9.21-13.el6.x86_64 qt-4.7.4-0.el6.x86_64 qt-mobility-1.1.3-2.el6.x86_64 qt-x11-4.7.4-0.el6.x86_64 qtwebkit-2.1.1-1.el6.x86_64 sqlite-3.6.20-1.el6.x86_64 tcp_wrappers-libs-7.6-56.3.el6.x86_64 zlib-1.2.3-25.el6.x86_64 (gdb)

It would be swell if there was something detecting this kind of Qt or driver problem in jasmine-headless-webkit , or -specrunner .

arapehl commented 11 years ago

Has this been solve? I just installed jasmine-headless-webkit on Mountain Lion and the latest qt (4.8.3) with homebrew and I'm getting the same error.

timdiggins commented 11 years ago

For future reference think that @arapehl's problem with Mountain Lion is actually qt compatibility - you need to install qt 4.7 see https://github.com/johnbintz/jasmine-headless-webkit/issues/101