-
Notifications
You must be signed in to change notification settings - Fork 154
"PhantomJS has crashed" problem when upgrade to PhantomJS 2.1.1 #191
Comments
Could you create an example project that demonstrates the problem? Perhaps consider pushing a fork of https://github.com/searls/jasmine-rails-exploratory-tests that reproduces the issue? |
I'm getting the same or similar error -- though I'm on ARM, not x86. How do I run the tests on the exploratory-tests repository?
|
I can't make much of it, but here's my log when i do it with debug=true: https://gist.github.com/jywarren/c83f582a2c2387cdbfc6925722398881 |
Same problem on my machine (linux, phantomjs 2.1.1). I think CircleCi experiences same problem https://gist.github.com/mtomov/b5469ad032bc09cdb833d11fb1751c02 |
+1 Same problem, having issues on Mac and Linux. Any updates on this? Sorry should have read from the command line first. |
@mtomov: Circle uses 1.9.8 by default which works. This is a pretty serious issue though, I too have Will be downgrading to 1.9.8 for now. |
@zacblazic you can control the version of phantomjs that's used by locking to a specific version of the phantomjs gem, right? Can anyone on this thread reproduce the issue with an example project? I just spent 30 minutes locally trying to and I couldn't, using PhantomJS 2.1.1 installed via homebrew. |
Version 0.12.2 exhibited the problem described here: testdouble/jasmine-rails#191
+1'ing this issue. On Friday, with PhantomJS 2.1.1 installed via Homebrew and jasmine-rails 0.14.1, my test suite ran without error. Come Monday morning, I start experiencing the PhantomJS crashes reported by @terryyin and others. My step-by-step to get to a working test suite:
The above will use a system-level PhantomJS. I didn't try these steps using a version of PhantomJS installed by the gem to |
Hey @jgarber623 are you able to provide a failing example project? I can't even get to that point |
@searls The app and hardware I experienced the issue on are private/employer-managed, so I can't share that code directly. I can see about replicating the problem on other hardware, but that might not necessarily address how the problem (for me, anyway) started over the course of a weekend when my computer sat unused. 🤔 It's a very curious problem, for sure. (And thanks for jasmine-rails, by the way! 😁 ) |
@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:
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
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.) |
@jgarber623 what if the |
@searls Ran a couple quick experiments:
The top four examples all crash PhantomJS. The last one does not. |
I don't have any empty / pending / etc tests in my test suite, but phantomjs still crashes as described. |
I'm on PhantomJS 2.1.1 and
However the issue turned out not to be related to the test case itself but some compatibility error in my javascript application code. To see if you have any errors open |
In my case the issue was resolved by simply adding the missing - expect( @meter.poll ).toBeFalsy
+ expect( @meter.poll ).toBeFalsy() |
I'm pretty sure that this #194 fixed the issue for me. CircleCI also passes with that. Thanks a lot! |
Got problem like
Downgrade PhantomJS to 1.9.8 solved the problem.
The text was updated successfully, but these errors were encountered: