question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"PhantomJS has crashed" problem when upgrade to PhantomJS 2.1.1

See original GitHub issue

Got problem like

$ bundle exec rake spec:javascript
Running `"/usr/local/bin/phantomjs" "" "/Users/terry/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/jasmine-rails-0.12.4/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "file:///Users/terry/git/less-site/tmp/jasmine/runner.html?spec="`
Running: file:///Users/terry/git/less-site/tmp/jasmine/runner.html?spec=
Starting...
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.

Downgrade PhantomJS to 1.9.8 solved the problem.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jgarber623commented, Oct 18, 2016

@searls Did a bit more digging in on this one and found the actual problem in my code.

In a particular spec file, I had code similar to:

describe('some bit of functionality', function() {
  it('does a thing.', function() {
    //
  });
});

That empty assertion callback was causing PhantomJS 2.1.1 to crash. It did not crash PhantomJS 1.9.8. The takeaway here is that empty describe callback functions appear to be okay (for now), but empty it callback functions should be avoided.

describe('some bit of functionality', function() {
  // this is okay
});

describe('some bit of functionality', function() {
  it('does a thing.', function() {
    // you're in for bad times
  });
});

I’m not sure if this will solve anyone else’s problems, but it was the root problem in my codebase.

(Hat tip to @ju-Skinner for his help debugging this one.)

1reaction
thekindofmecommented, Feb 2, 2017

In my case the issue was resolved by simply adding the missing () to the end of a method call (it was coffeescript).

- expect( @meter.poll ).toBeFalsy
+ expect( @meter.poll ).toBeFalsy()
Read more comments on GitHub >

github_iconTop Results From Across the Web

"PhantomJS has crashed" problem when upgrade to PhantomJS 2.1.1
"PhantomJS has crashed" problem when upgrade to PhantomJS 2.1.1. ... Got problem like $ bundle exec rake spec:javascript Running `"/usr/local/bin/phantomjs" ...
Read more >
Current build is failing because of PhantomJS - Google Groups
I'm upgrading our Travis build to use a more recent NodeJS version, to match what I have on my laptop. I don't think...
Read more >
Poltergeist/PhantomJS crashing in Gitlab CI - Stack Overflow
1 with no issues. I then migrated over to poltergeist supporting PhantomJS as my javascript driver. I had to make a few changes...
Read more >
Troubleshooting - PhantomJS
On Windows, the default proxy setting may cause a massive network latency (see Known Issues in the release note). The workaround is to...
Read more >
production.ERROR: PhantomJS - Invalid response - Self-Hosted
Those generally seem to have issues, in my experience. ... It's a stand-alone, precompiled binary of PhantomJS 2.1.1 built specifically for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found