PhantomJS crashes when setting file field value. #183

jarmo opened this Issue Feb 22, 2013 · 2 comments


None yet

3 participants

jarmo commented Feb 22, 2013

I have created an issue before at #158. There you fixed one of the problems, but it seems that it is not fixed completely. As also mentioned on the previous issue i had problems on Travis-CI too.

Now i took the moment to run specs on my vagrant VM and reproduce them.

The following specs are crashing PhantomJS intermittently (not always and not when running only failing spec):

Steps to reproduce:

  1. Install Vagrant
  2. Install and start Vagrant box:
vagrant box add lucid32
vagrant init lucid32
vagrant up
  1. SSH into vagrant box:
vagrant ssh
  1. Run the following commands inside of the vagrant VM:
sudo apt-get update
sudo apt-get install -y build-essential chrpath git-core libssl-dev libfontconfig1-dev curl libxslt1-dev libxml2-dev

curl -L -O ""
mkdir phantomjs
tar -xvjf phantomjs-latest.tar.bz2 -C phantomjs
cat phantomjs/phantomjs.version
chmod +x phantomjs/phantomjs
export PATH=~/phantomjs:$PATH
cat phantomjs/phantomjs.version
phantomjs --version

git clone git://
cd watir-webdriver
git submodule update --init

\curl -L | bash -s stable --ruby
source ~/.rvm/scripts/rvm
ruby --version
bundle install

export DISPLAY=ignored_really
echo "\$DEBUG=true" >> spec/spec_helper.rb
  1. Run file field specs inside of VM:
bundle exec rspec spec/watirspec/filefield_spec.rb

You may also run specific spec by appending a line number like so:

bundle exec rspec spec/watirspec/filefield_spec.rb:127

As mentioned above, running only crashing test would not crash PhantomJS - there is some state retained in PhantomJS between the specs.

Running these specs will crash PhantomJS almost always and you will see a message similar to this:

PhantomJS has crashed. Please read the crash reporting guide at and file a bug report at with the crash dump file attached: /tmp/3e1184fb-b0de-1a80-23ae5b12-49abfbd6.dmp

Please note that $DEBUG=true inside of spec/spec_helper.rb will output a lot of debug information.

detro commented Jul 24, 2013

I initially thought I could investigate this (and hopefully solve it) for 1.0.4 but I can't: you have done a great job at documenting how to reproduce it, I need to give it the proper time and dedication.

Also, from the error message you have reported at the end, it seems related to the intermittent crashes that PhantomJS has (a known issue): if that is the case, I know already I don't have a solution for that yet.

Anyway, I'll remove this work from 1.0.4 and dedicate proper time to it after that.
Too many people's fixes are already in 1.0.4 to delay it any longer.

Stay tuned.
And thanks for the detailed instructions.

deflomu commented Jan 9, 2015

This issue still exists. Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment