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

events.js:72 [throw er; // Unhandled 'error' event] #76

Closed
assisthiago opened this issue Sep 24, 2015 · 10 comments
Closed

events.js:72 [throw er; // Unhandled 'error' event] #76

assisthiago opened this issue Sep 24, 2015 · 10 comments

Comments

@assisthiago
Copy link

This was my commands to update meteor:

➜  gdd git:(cucumber) meteor refresh 
➜  gdd git:(cucumber) meteor update 
This project is already at Meteor 1.2.0.1, the latest release.

Changes to your project's package version selections from updating package versions:

xolvio:cucumber  upgraded from 0.13.8 to 0.14.1


The following top-level dependencies were not updated to the very latest version available:
 * natestrauser:select2 3.5.1 (4.0.0_1 is available)

Newer versions of the following indirect dependencies are available:
 * babrahams:editable-json 0.4.3 (0.6.0 is available)
 * meteorhacks:aggregate 1.2.1 (1.3.0 is available)
 * percolate:velocityjs 1.1.0 (1.2.1_1 is available)
 * practicalmeteor:chai 1.9.2_3 (2.1.0_1 is available)
 * practicalmeteor:loglevel 1.1.0_3 (1.2.0_2 is available)
 * softwarerero:accounts-t9n 1.0.9 (1.1.4 is available)
To update one or more of these packages, pass their names to `meteor update`.
➜  gdd git:(cucumber) ✗ export VELOCITY_DEBUG=1
➜  gdd git:(cucumber) ✗ meteor
[[[[[ ~/Documents/workspace/gettydata/gdd ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
I20150924-17:41:29.605(-3)? [velocity] adding velocity core
I20150924-17:41:29.608(-3)? [xolvio:cucumber] Cucumber hub is loading
I20150924-17:41:29.608(-3)? [velocity] Register framework cucumber with regex ^tests/cucumber/((?!node_modules/).)+\.(feature|js|coffee|litcoffee|coffee\.md)$
I20150924-17:41:32.222(-3)? [velocity] Server startup
I20150924-17:41:32.224(-3)? [velocity] app dir /Users/thiagoassis/Documents/workspace/gettydata/gdd
I20150924-17:41:32.225(-3)? [velocity] config = {
I20150924-17:41:32.225(-3)?   "cucumber": {
I20150924-17:41:32.225(-3)?     "regex": "^tests/cucumber/((?!node_modules/).)+\\.(feature|js|coffee|litcoffee|coffee\\.md)$",
I20150924-17:41:32.225(-3)?     "name": "cucumber",
I20150924-17:41:32.225(-3)?     "_regexp": {}
I20150924-17:41:32.225(-3)?   }
I20150924-17:41:32.226(-3)? }
I20150924-17:41:32.226(-3)? [velocity] resetting the world
I20150924-17:41:32.228(-3)? [velocity] frameworks with disable auto reset: []
I20150924-17:41:32.247(-3)? [velocity] Add paths to watcher [ '/Users/thiagoassis/Documents/workspace/gettydata/gdd/tests' ]
I20150924-17:41:32.252(-3)? [velocity] 1 mirror(s) requested
I20150924-17:41:32.316(-3)? [velocity] Mirror process forked with pid 24873
I20150924-17:41:32.316(-3)? [velocity] cucumber is starting a mirror at http://localhost:54111/.
I20150924-17:41:32.339(-3)? [velocity] You can see the mirror logs at: tail -f /Users/thiagoassis/Documents/workspace/gettydata/gdd/.meteor/local/log/cucumber.log
=> Started your app.

=> App running at: http://localhost:3000/
I20150924-17:41:32.431(-3)? [velocity] Search framework for path tests/cucumber/package.json
I20150924-17:41:32.432(-3)? [velocity] No framework registered for tests/cucumber/package.json
I20150924-17:41:32.494(-3)? [velocity] Search framework for path tests/cucumber/features/apis.feature
I20150924-17:41:32.495(-3)? [velocity] Target framework for tests/cucumber/features/apis.feature is cucumber
I20150924-17:41:32.498(-3)? [velocity] Search framework for path tests/cucumber/features/countries.feature
I20150924-17:41:32.499(-3)? [velocity] Target framework for tests/cucumber/features/countries.feature is cucumber
I20150924-17:41:32.501(-3)? [velocity] Search framework for path tests/cucumber/features/fields.feature
I20150924-17:41:32.501(-3)? [velocity] Target framework for tests/cucumber/features/fields.feature is cucumber
I20150924-17:41:32.502(-3)? [velocity] Search framework for path tests/cucumber/features/login.feature
I20150924-17:41:32.503(-3)? [velocity] Target framework for tests/cucumber/features/login.feature is cucumber
I20150924-17:41:32.504(-3)? [velocity] Search framework for path tests/cucumber/features/sites.feature
I20150924-17:41:32.504(-3)? [velocity] Target framework for tests/cucumber/features/sites.feature is cucumber
I20150924-17:41:32.542(-3)? [velocity] Search framework for path tests/cucumber/features/users.feature
I20150924-17:41:32.543(-3)? [velocity] Target framework for tests/cucumber/features/users.feature is cucumber
I20150924-17:41:32.543(-3)? [velocity] Search framework for path tests/cucumber/fixtures/base_fixtures.js
I20150924-17:41:32.543(-3)? [velocity] Target framework for tests/cucumber/fixtures/base_fixtures.js is cucumber
I20150924-17:41:32.544(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/api_steps.js
I20150924-17:41:32.544(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/api_steps.js is cucumber
I20150924-17:41:32.546(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/country_steps.js
I20150924-17:41:32.546(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/country_steps.js is cucumber
I20150924-17:41:32.548(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/field_steps.js
I20150924-17:41:32.548(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/field_steps.js is cucumber
I20150924-17:41:32.549(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/global_steps.js
I20150924-17:41:32.549(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/global_steps.js is cucumber
I20150924-17:41:32.550(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/login_steps.js
I20150924-17:41:32.550(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/login_steps.js is cucumber
I20150924-17:41:32.552(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/users_steps.js
I20150924-17:41:32.552(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/users_steps.js is cucumber
I20150924-17:41:32.559(-3)? [velocity] File scan complete, now watching /tests
I20150924-17:41:32.559(-3)? [velocity] Triggering queued startup functions
I20150924-17:43:38.709(-3)? [velocity] Mirror registered. Handshaking with mirror...
I20150924-17:43:38.865(-3)? [velocity] Connected to mirror, setting state to ready { framework: 'cucumber',
I20150924-17:43:38.866(-3)?   host: 'http://localhost:54111/',
I20150924-17:43:38.866(-3)?   port: '54111' }
@assisthiago
Copy link
Author

And my cucumber.log:

events.js:72
        throw er; // Unhandled 'error' event
              ^
TypeError: Object function (a, b, c, d, e, f, g, h, i, j) {
          var context = this;
          var args = _.toArray(arguments);
          var callback = args.pop();
          var isPending = false;
          var isFail = false;
          if (!(typeof callback === 'function')) {
            throw new Error('Cucumber has not passed a callback to the step definition.');
          }
          var future = new Future();
          Fiber(function () {
            var resolver = _.once(future.resolver());
            resolver.pending = function (reason) {
              isPending = true;
              callback.pending(reason);
              resolver();
            }
            resolver.fail = function (reason) {
              isFail = true;
              callback.fail(reason);
              resolver();
            }
            currentStepCallback = resolver;
            try {
              // Support for callback
              var hasCallback = stepDefinition.length > args.length;
              if (hasCallback) {
                args.push(resolver);
              }

              var result = stepDefinition.apply(context, args);
              // Support for returning promise
              if (result && typeof result.then === 'function') {
                result.then(
                  function (result) {
                    resolver(null, result);
                  },
                  function (error) {
                    resolver(error);
                  }
                );
              } else {
                if (!hasCallback) {
                  resolver(null);
                }
              }
            } catch (error) {
              resolver(error);
            }
          }).run();

          future.resolve(function () {
            if (!(isPending || isFail)) {
              callback.apply(this, arguments);
            }
            currentStepCallback = null;
          });
        } has no method 'test'
  at Array.forEach (native)
  at process._tickDomainCallback (node.js:492:13)

[chimp] Finished running async processes with errors
[chimp] run complete with errors Cucumber steps failed
[chimp] Could not get Cucumber Results from run result:
[ undefined, [ undefined, null ] ]
[xolvio:cucumber] Bad response from Chimp server.

@samhatoum
Copy link
Member

Thanks. The cucumber log is missing a lot of info. Is that the whole file?

@assisthiago
Copy link
Author

=> Using velocity:METEOR@1.2.0.1_1 as requested (overriding Meteor 1.2.0.1)

[[[[[ ~/Documents/workspace/gettydata/gdd ]]]]]

=> Started proxy.
[velocity] adding velocity core
[xolvio:cucumber] Mirror server is initializing
[xolvio:cucumber] Starting Chimp
[xolvio:cucumber] Starting Chimp with /Users/thiagoassis/.meteor/packages/xolvio_cucumber/.0.14.1.1fir6ea++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/bin/chimp [ '/Users/thiagoassis/.meteor/packages/xolvio_cucumber/.0.14.1.1fir6ea++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/bin/chimp',
  '-r',
  '/Users/thiagoassis/Documents/workspace/gettydata/gdd/tests/cucumber/features',
  '--snippets',
  '--ddp=http://localhost:54111/',
  '--log=error',
  '--debug',
  '--tags=@dev,@watch,@focus',
  '--server',
  '--serverPort=8866' ] { cwd: '/Users/thiagoassis/Documents/workspace/gettydata/gdd/tests/cucumber',
  stdio: 'inherit',
  env: 
   { METEOR_SHELL_DIR: '/private/var/folders/yy/548wwx6j0n31hd029q_l35380000gn/T/meteor-test-runwdvnsy/.meteor/local/shell',
     MIRROR_PORT: '54111',
     SHELL: '/bin/zsh',
     TERM: 'xterm-256color',
     IS_MIRROR: 'true',
     HOST: 'http://localhost:54111/',
     TMPDIR: '/var/folders/yy/548wwx6j0n31hd029q_l35380000gn/T/',
     Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.GM7MyktBhM/Render',
     HANDSHAKE: 'true',
     OLDPWD: '/Users/thiagoassis/.meteor/packages/velocity_meteor-tool/1.1.8_1/mt-os.osx.x86_64',
     MOBILE_DDP_URL: 'http://localhost:54111',
     ZSH: '/Users/thiagoassis/.oh-my-zsh',
     USER: 'thiagoassis',
     SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.VFcWbNRtX2/Listeners',
     __CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0',
     PAGER: 'less',
     LSCOLORS: 'Gxfxcxdxbxegedabagacad',
     PATH: '/Users/thiagoassis/.meteor/packages/velocity_meteor-tool/.1.1.8_1.15wvd5w++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin:/Users/thiagoassis/.meteor/packages/meteor-tool/.1.1.8.1mnatmw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
     METEOR_SETTINGS: '{"public":{}}',
     PWD: '/Users/thiagoassis/Documents/workspace/gettydata/gdd',
     PARENT_URL: 'http://localhost:3000/',
     MONGO_URL: 'mongodb://127.0.0.1:3001/meteor-cucumber',
     NODE_PATH: '',
     XPC_FLAGS: '0x0',
     NODE_ENV: 'development',
     ROOT_URL: 'http://localhost:54111/',
     APP_ID: 'uijpgdarvoozjwvj68',
     XPC_SERVICE_NAME: '0',
     METEOR_PARENT_PID: '24874',
     SHLVL: '1',
     HOME: '/Users/thiagoassis',
     VELOCITY_DEBUG: '1',
     METEOR_PRINT_ON_LISTEN: 'true',
     LESS: '-R',
     LOGNAME: 'thiagoassis',
     LC_CTYPE: 'en_US.UTF-8',
     FRAMEWORK: 'cucumber',
     HTTP_FORWARDED_COUNT: '2',
     PORT: '23290',
     MONGO_OPLOG_URL: 'mongodb://127.0.0.1:3001/local',
     VELOCITY_MAIN_APP_PATH: '/Users/thiagoassis/Documents/workspace/gettydata/gdd',
     ROOT_URL_PATH: '',
     MOBILE_ROOT_URL: 'http://localhost:54111' } }
[xolvio:cucumber] Chimp process forked with pid 24913
=> Started your app.

=> App running at: http://localhost:54111/
[velocity] Mirror started. Connecting via DDP to parent
[velocity] Mirror connected to parent. Registering mirror...
[velocity] Established connection with Velocity.
[chimp] Running /Users/thiagoassis/.meteor/packages/velocity_meteor-tool/.1.1.8_1.15wvd5w++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm install
[chimp] stdout: 
[chimp] stderr: 
[chimp] Chimp server is running on port 8866 http://localhost:54111/
[chimp] Handshaking with DDP server
[xolvio:cucumber] Received handshake from Chimp.
[xolvio:cucumber] Connecting to hub
[chimp] Handshake complete, closing DDP connection
[xolvio:cucumber] Connected to hub.
[xolvio:cucumber] Find and run triggered { '0': 
   { name: 'users_steps.js',
     absolutePath: '/Users/thiagoassis/Documents/workspace/gettydata/gdd/tests/cucumber/features/step_definitions/users_steps.js',
     relativePath: 'tests/cucumber/features/step_definitions/users_steps.js',
     targetFramework: 'cucumber',
     lastModified: 1443127292552,
     _id: '/Users/thiagoassis/Documents/workspace/gettydata/gdd/tests/cucumber/features/step_definitions/users_steps.js' } }
[xolvio:cucumber] Running in batch-features mode.
[xolvio:cucumber] Cucumber is running
[chimp] interrupting
[chimp] no processes to interrupt
[chimp] rerunning
[chimp] Running...
[chimp] interrupting
[chimp] no processes to interrupt
[chimp][selenium] Selenium object created
[chimp][selenium] Start
[chimp][selenium] Installing Selenium + drivers if needed

[chimp][selenium] hub can be seen at http://localhost:54173/wd/hub
[chimp][session-manager] options are { port: '54173', browser: 'chrome', deviceName: undefined }
[chimp][session-manager] created a new SessionManager { port: '54173', browser: 'chrome', deviceName: undefined }
[chimp][cucumber] Running with [ 'node',
  '/Users/thiagoassis/.meteor/packages/xolvio_cucumber/.0.14.1.1fir6ea++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/.bin/cucumber.js',
  '-r',
  'features',
  '-r',
  '/Users/thiagoassis/.meteor/packages/xolvio_cucumber/.0.14.1.1fir6ea++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumberjs/world.js',
  '-r',
  '/Users/thiagoassis/.meteor/packages/xolvio_cucumber/.0.14.1.1fir6ea++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumberjs/hooks.js',
  '-r',
  '/Users/thiagoassis/Documents/workspace/gettydata/gdd/tests/cucumber/features',
  '--snippets',
  'true',
  '--tags',
  '@dev,@watch,@focus',
  '--format',
  'pretty' ]
[chimp][world] Using the jasmine-expect assertion library

[chimp][world] creating DDP connection

[chimp][hooks] Starting BeforeFeatures

[chimp][hooks] getting browser

[chimp][session-manager] options are { port: '54173', browser: 'chrome', deviceName: undefined }

[chimp][session-manager] created a new SessionManager { port: '54173', browser: 'chrome', deviceName: undefined }

[chimp][hooks] custom chimp.js not found, loading defaults

[chimp][hooks] webdriverOptions are  {"waitforTimeout":10000,"desiredCapabilities":{"browserName":"chrome","platform":"ANY","name":""},"host":"localhost","port":"54173","logLevel":"silent","sync":true}

[chimp][session-manager] creating webdriver remote 

[chimp][session-manager] checking connection to selenium server

[chimp][session-manager] requesting sessions from http://localhost:54173/wd/hub/sessions

[chimp][session-manager] received data {"state":"success","sessionId":null,"hCode":1162114589,"value":[],"class":"org.openqa.selenium.remote.Response","status":0}
[chimp][session-manager] Did not find any open selenium sessions, not reusing a session

[chimp][session-manager] monkey patching the browser object

[chimp][hooks] init browser
[chimp][session-manager] initializing browser

[chimp][hooks] init browser callback

[chimp][hooks] set timeoutsAsyncScript

[chimp][hooks] setup DDP

[chimp][hooks] connecting via DDP to http://localhost:54111/

[chimp][hooks] connecting via DDP had no error

[chimp][hooks] Finished BeforeFeatures
[chimp][hooks] User-defined BeforeFeatures not found, finishing up


Feature: API


  As a User
  I want to test the CRUD of the system
  In order to check the system's validation


[chimp][world] setting up world

  �[36m@dev @api�[0m
  Scenario: Load the gdd's log in page           �[2m�[37m# features/apis.feature:11�[0m


events.js:72
        throw er; // Unhandled 'error' event
              ^
TypeError: Object function (a, b, c, d, e, f, g, h, i, j) {
          var context = this;
          var args = _.toArray(arguments);
          var callback = args.pop();
          var isPending = false;
          var isFail = false;
          if (!(typeof callback === 'function')) {
            throw new Error('Cucumber has not passed a callback to the step definition.');
          }
          var future = new Future();
          Fiber(function () {
            var resolver = _.once(future.resolver());
            resolver.pending = function (reason) {
              isPending = true;
              callback.pending(reason);
              resolver();
            }
            resolver.fail = function (reason) {
              isFail = true;
              callback.fail(reason);
              resolver();
            }
            currentStepCallback = resolver;
            try {
              // Support for callback
              var hasCallback = stepDefinition.length > args.length;
              if (hasCallback) {
                args.push(resolver);
              }

              var result = stepDefinition.apply(context, args);
              // Support for returning promise
              if (result && typeof result.then === 'function') {
                result.then(
                  function (result) {
                    resolver(null, result);
                  },
                  function (error) {
                    resolver(error);
                  }
                );
              } else {
                if (!hasCallback) {
                  resolver(null);
                }
              }
            } catch (error) {
              resolver(error);
            }
          }).run();

          future.resolve(function () {
            if (!(isPending || isFail)) {
              callback.apply(this, arguments);
            }
            currentStepCallback = null;
          });
        } has no method 'test'
  at Array.forEach (native)
  at process._tickDomainCallback (node.js:492:13)

[chimp][cucumber] Closed with code 7
[chimp][cucumber] Cucumber not in a stopping state
[chimp] Finished running async processes with errors
[chimp] run complete with errors Cucumber steps failed
[chimp] Could not get Cucumber Results from run result:
[ undefined, [ undefined, null ] ]
[chimp] Responding to /run request with:
undefined
[chimp] finished rerun
[xolvio:cucumber] Bad response from Chimp server.
{ statusCode: 200,
  content: '',
  headers: 
   { 'content-type': 'application/json; charset=utf-8',
     'cache-control': 'no-cache',
     'content-length': '0',
     date: 'Thu, 24 Sep 2015 20:43:53 GMT',
     connection: 'keep-alive' },
  data: null }
[chimp] interrupting
[chimp] 2 processes to interrupt
[chimp][cucumber] interrupting cucumber
[chimp][cucumber] kill called on cucumber process with pid 24921
[chimp][cucumber] checking if process exists
[chimp][cucumber] cucumber process does not exists, ignoring
[chimp][selenium] interrupt called
[chimp][selenium] interrupt is not killing selenium because clean-selenium-server not set
[chimp] Finished interrupting processes

@samhatoum
Copy link
Member

Thanks. Little tip, if you put triple back quotes at the start and end of your paste, it will look cleaner

@assisthiago
Copy link
Author

Thanks for the tip!

@samhatoum
Copy link
Member

Did you do this:

https://chimp.readme.io/docs/v0140-breaking-changes

If so, please also show me your step defs

@assisthiago
Copy link
Author

No, i didn't.

@samhatoum
Copy link
Member

do :)

@assisthiago
Copy link
Author

Sorry for the delay, Sam.

IT WORKED! Now i'm running with CHIMP_ASYNC=true
Later, i'll try to remove all the postfixes and returns.

Thanks a lot for your help man!
Have a good day to you and your team.

@samhatoum
Copy link
Member

:) awesome to hear

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

No branches or pull requests

2 participants