Skip to content
This repository has been archived by the owner on Dec 27, 2018. It is now read-only.

Spacejam: Unknown error with exit code 'null' #50

Closed
dpankros opened this issue Feb 12, 2016 · 16 comments
Closed

Spacejam: Unknown error with exit code 'null' #50

dpankros opened this issue Feb 12, 2016 · 16 comments

Comments

@dpankros
Copy link

I need some help figuring out what's going on with this. I just installed spacejam for all users (sudo -H npm install -g spacejam) and tried spacejam test-packages ./ and I get:

$ spacejam test-packages ./
spacejam: spawning meteor
[[[[[ Tests ]]]]]

=> Started proxy.
=> Started MongoDB.
spacejam: meteor mongodb is ready
spacejam: killing meteor
spacejam: Unknown error with exit code 'null'. Exiting.

This package works fine and all tests pass using meteor test-packages ./ Worse, it does the same for all packages. That makes me pretty confident it's a installation or configuration issue, but I'm sure where to look. Any ideas? I've tried all sorts of combinations of options, like using the system phantomjs, etc, to no avail.

@rbabayoff
Copy link
Member

@dpankros I have nothing to go on here. Questions:

  1. What OS r u on?
  2. What version of meteor?
  3. Is the package open source? Can I try it with your package?

@dpankros
Copy link
Author

OSX 10.11.3
Meteor 1.2.1
My branch of the package is at: https://github.com/dpankros/meteor-schema-index
I ran into this problem trying to figure out the issue with this pull request: Meteor-Community-Packages/meteor-schema-index#4

As I said previously, if I run spacejam on ANY package it fails (not just this one) and it's always the same error. mtp ./ or meteor test-packages ./ work just fine.

For example, packages internal for my company (we have at least 10) fail on my machine if I use spacejam, but the same packages work just fine on our CI server. (CI server is running ubuntu)

Any other info I can provide?

@schoepke
Copy link

schoepke commented May 3, 2016

Did you get it to work somehow?
If not, could this be related to issue #30 ?

I know that issue is about Windows but I've been having similar hickups and it could be caused by ps process handling peculiarities on OSX as well.

Have you tried running spacejam with the --loglevel debug option?
Maybe the log output help pinpointing what function or spawned process fails.

@dpankros
Copy link
Author

dpankros commented May 3, 2016

Nope. It's still broken.

$ spacejam --loglevel trace test-packages ./
Spacejam.constructor()
CLI.constructor()
CLI.exec()
command: test-packages
CLI.exec() options: { loglevel: 'trace', packages: [ './' ] }
Spacejam.testPackages() { loglevel: 'trace', packages: [ './' ] }
{ 'phantomjs-script': 'phantomjs-test-in-console',
  'phantomjs-options': '--load-images=no --ssl-protocol=TLSv1',
  loglevel: 'trace',
  packages: [ './' ] }
Meteor.testPackages() { '0': 
   { 'phantomjs-script': 'phantomjs-test-in-console',
     'phantomjs-options': '--load-images=no --ssl-protocol=TLSv1',
     loglevel: 'trace',
     packages: [ './' ] } }
meteor options: { dir: '.',
  port: 4096,
  packages: [ './' ],
  'driver-package': 'test-in-console',
  'meteor-ready-text': '=> App running at:',
  'meteor-error-text': 'Waiting for file change.',
  'phantomjs-script': 'phantomjs-test-in-console',
  'phantomjs-options': '--load-images=no --ssl-protocol=TLSv1',
  loglevel: 'trace' }
meteor cwd=/xxxxx/xxxxxxx/xxxxxx/packages/meteor-autojoin
Meteor._globPackages() { '0': [ './' ] }
meteor args= [ 'test-packages',
  '--driver-package',
  'test-in-console',
  '--port',
  4096,
  './' ]
ChildProcess.constructor()
ChildProcess.spawn() meteor [ 'test-packages',
  '--driver-package',
  'test-in-console',
  '--port',
  4096,
  './' ]
spacejam: spawning meteor
[[[[[ Tests ]]]]]

=> Started proxy.
=> Started MongoDB.
MeteorMongodb.constructor() { '0': 13352 }
MeteorMongodb.findAllChildren() {}
@meteorPid 13352
spacejam: meteor mongodb is ready
ChildProcess.process.on 'exit': @command=meteor @killed=false code=1
ChildProcess.kill() signal=SIGTERM @command=meteor @killed=false
spacejam: killing meteor
MeteorMongodb.process.on 'exit': code=1
MeteorMongodb.kill() killed= false
Spacejam.onMeteorMongodbKillDone() null
spacejam: Unknown error with exit code 'null'. Exiting.

@rbabayoff
Copy link
Member

@dpankros can you try and reinstall meteor? Some issues have been solved this way.

@DominikGuzei
Copy link

DominikGuzei commented Aug 9, 2016

I have a similar problem … using 1.6.2-rc.4 version of spacejam:

W20160809-13:14:43.888(2)? (STDERR) MochaRunner.runServerTests: failures: 0
spacejam: phantomjs exited with code: 0
spacejam: killing meteor
spacejam: Unknown error with exit code 'null'. Exiting.

@thiagodelgado111
Copy link

Same here running on OSX
Meteor 1.4
Mongo 3.2.6

It seems that the process explorer package can't find mongod process
Found meteor mongod child with pid: undefined

Details:

Spacejam.constructor()
CLI.constructor()
CLI.exec()
command: test
CLI.exec() options: { 'driver-package': 'practicalmeteor:mocha-console-runner',
  loglevel: 'debug',
  coverage: 'out_lcovonly',
  packages: [],
  command: 'test' }
Spacejam.testPackages() { 'driver-package': 'practicalmeteor:mocha-console-runner',
  loglevel: 'debug',
  coverage: 'out_lcovonly',
  packages: [],
  command: 'test' }
{ 'phantomjs-script': 'phantomjs-test-in-console-with-coverage.js',
  'phantomjs-options': '--load-images=no --ssl-protocol=TLSv1',
  'driver-package': 'practicalmeteor:mocha-console-runner',
  loglevel: 'debug',
  coverage: 'out_lcovonly',
  packages: [],
  command: 'test' }
Meteor.runTestCommand() { '0': 'test',
  '1':
   { 'phantomjs-script': 'phantomjs-test-in-console-with-coverage.js',
     'phantomjs-options': '--load-images=no --ssl-protocol=TLSv1',
     'driver-package': 'practicalmeteor:mocha-console-runner',
     loglevel: 'debug',
     coverage: 'out_lcovonly',
     packages: [],
     command: 'test' } }
meteor options: { dir: '.',
  port: 4096,
  packages: [],
  'driver-package': 'practicalmeteor:mocha-console-runner',
  'meteor-ready-text': '=> App running at:',
  'meteor-error-text': 'Waiting for file change.',
  'phantomjs-script': 'phantomjs-test-in-console-with-coverage.js',
  'phantomjs-options': '--load-images=no --ssl-protocol=TLSv1',
  loglevel: 'debug',
  coverage: 'out_lcovonly',
  command: 'test' }
meteor cwd=/code/app
Meteor.getTestArgs() { dir: '.',
  port: 4096,
  packages: [],
  'driver-package': 'practicalmeteor:mocha-console-runner',
  'meteor-ready-text': '=> App running at:',
  'meteor-error-text': 'Waiting for file change.',
  'phantomjs-script': 'phantomjs-test-in-console-with-coverage.js',
  'phantomjs-options': '--load-images=no --ssl-protocol=TLSv1',
  loglevel: 'debug',
  coverage: 'out_lcovonly',
  command: 'test' }
meteor args= [ 'test',
  '--driver-package',
  'practicalmeteor:mocha',
  '--port',
  4096 ]
ChildProcess.constructor()
ChildProcess.spawn() meteor [ 'test',
  '--driver-package',
  'practicalmeteor:mocha',
  '--port',
  4096 ]
spacejam: spawning meteor
[[[[[ Tests ]]]]]

=> Started proxy.
=> Started MongoDB.
MeteorMongodb.constructor() { '0': 18009 }
MeteorMongodb.findAllChildren() {}
@meteorPid 18009
spacejam: meteor mongodb is ready
Found meteor mongod child with pid:  undefined

@thiagodelgado111
Copy link

BTW, I've tried that package from node console manually and it couldn't find the mongod process either

@BenAychh
Copy link

I was having the same issue on OSX (El Capitan). Installing the RC seemed to fix it for me but now spacejam never exits after running the tests. I get down to the line (STDERR) MochaRunner.runServerTests: failures: 0 but it never exits. (It is also no longer showing the individuals results of the tests in my console.

@dpankros
Copy link
Author

@rbabayoff BTW, reinstalling meteor didn't affect the behavior in any way.

@DominikGuzei
Copy link

DominikGuzei commented Aug 23, 2016

Is there any update on this issue? i have tried any combination of spacejam and node and practicalmeteor:mocha version but the issue remains. The tests are passing correctly for me but spacejam always exits like this (no matter what the actual test results were):

--------------------------------------------------
---------------------RESULTS----------------------
PASSED: 33
FAILED: 0
SKIPPED: 0
TOTAL: 33
--------------------------------------------------
--------------------------------------------------

W20160823-12:58:11.205(2)? (STDERR) MochaRunner.runServerTests: failures: 0
spacejam: phantomjs exited with code: 0
spacejam: killing meteor
spacejam: Unknown error with exit code 'null'. Exiting.

The problem here is that the return code is always 0 which makes it unusable on a CI server

@thiagodelgado111
Copy link

any update on this one?

@DominikGuzei
Copy link

Yeah we still have that problem and consider switching away from spacejam because of it.

@noahadler
Copy link

I'm having this problem as well (OSX, tinytest). I'm trying to go through the code and see if I can come up with a patch, but I don't know if I will succeed. Is there a viable alternative to spacejam someone can recommend?

noahadler added a commit to noahadler/spacejam that referenced this issue Sep 20, 2016
@ughitsaaron
Copy link

+1 for this issue. Also having this problem.

@reywood
Copy link

reywood commented Feb 1, 2017

I created a fork of this repo with the changes in the pull request created by @noahadle. I also checked in the compiled JavaScript files so that the repo can be used directly with npm install. You can run meteor npm install --save-dev git+https://github.com/reywood/spacejam.git to install it and save it in your package.json file. Then, you can use it to run tests by running node_modules/.bin/spacejam test-packages ..

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants