Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"PhantomJS timed out, possibly due to a missing Mocha run() call" regression #1700

Closed
eddies opened this issue May 15, 2015 · 1 comment · Fixed by #1725
Closed

"PhantomJS timed out, possibly due to a missing Mocha run() call" regression #1700

eddies opened this issue May 15, 2015 · 1 comment · Fixed by #1725

Comments

@eddies
Copy link

eddies commented May 15, 2015

I'm getting a

Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.

after upgrading mocha from 2.1.0 to 2.2.0 (or any of the 2.2.x series, including the most recent 2.2.5 release).

I've managed to track it to 521b7e4, specifically, lines 4485-4488:

    // Discard the resolution if this test has already failed asynchronously
    if (self.state) return;

Commenting out if (self.state) return; eliminates the error (I've tested against mocha 2.2.0 and 2.2.5).

Steps to reproduce:

Disclaimer: I never used mocha, grunt, yeoman, bower, or npm prior to two weeks ago, so I fully accept that the problem lies solely with how I'm testing rather than a problem with mocha itself. That said, I noticed this problem using Yeoman's generator-webapp after updating mocha in bower.json from 1.14.0 to 2.2.4. Dropping to v2.1.0 fixed the issue.
I've pushed a stripped-down, minimal version of an "app" that reproduces the problem: https://github.com/eddies/mocha-test-case

git clone git@github.com:eddies/mocha-test-case.git
cd mocha-test-case
npm install && bower install
grunt test

Comment out line 4512 of bower_components/mocha/mocha.js and re-run grunt test for the test to now pass.

jbnicolai pushed a commit that referenced this issue Jun 5, 2015
This fixes #1700 and closes #1701.
Thanks to: Edwin Shin [eddies].
jbnicolai pushed a commit that referenced this issue Jun 5, 2015
Removes return statement irt #1700.
@jbnicolai
Copy link

Thanks @eddies. Testcase confirmed and fix implemented in #1725.

boneskull added a commit to boneskull/mocha that referenced this issue Jun 30, 2015
* commit '3b02d830c0c5f20c5be9acaa9ef45b824bcbf965': (29 commits)
  Add cross-frame compatible Error checking for fail
  Remove moot `version` property from bower.json
  HISTORY: fix typo in 2.2.5
  HISTORY: improve 2.2.5 changelog
  removing duplicate flags adding additional iojs flags
  Prevent default browser behavior for failure/pass links
  Removes return statement irt mochajs#1700.
  Removes accidentally commited test.js
  Add support of --harmony_arrow_functions V8 option
  Release 2.2.5
  Upgrade jsdiff to v1.4.0
  fix 'location is not defined' error
  Update json-stream.js
  Sanity check: update fixtures/regression/issue-1327.js to be closer to orig test
  Fix diff colors
  use a valid SPDX license identifier
  Add integration tests
  Handling of error.htmlMessage in the HTML reporter
  Split message and stack into two separate variables
  fix(utils/stringify): fix issue mochajs#1660
  ...

Conflicts:
	test/acceptance/misc/asyncOnly.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants