{"action":"created","issue":{"url":"https://api.github.com/repos/xolvio/chimp/issues/75","labels_url":"https://api.github.com/repos/xolvio/chimp/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/xolvio/chimp/issues/75/comments","events_url":"https://api.github.com/repos/xolvio/chimp/issues/75/events","html_url":"https://github.com/xolvio/chimp/issues/75","id":108189546,"number":75,"title":"\"undefined is not a function\" error whenever try to use any WebDriverIO .then() function, specifically with client.execute(...).then()","user":{"login":"ejlofgren","id":4163941,"avatar_url":"https://avatars.githubusercontent.com/u/4163941?v=3","gravatar_id":"","url":"https://api.github.com/users/ejlofgren","html_url":"https://github.com/ejlofgren","followers_url":"https://api.github.com/users/ejlofgren/followers","following_url":"https://api.github.com/users/ejlofgren/following{/other_user}","gists_url":"https://api.github.com/users/ejlofgren/gists{/gist_id}","starred_url":"https://api.github.com/users/ejlofgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejlofgren/subscriptions","organizations_url":"https://api.github.com/users/ejlofgren/orgs","repos_url":"https://api.github.com/users/ejlofgren/repos","events_url":"https://api.github.com/users/ejlofgren/events{/privacy}","received_events_url":"https://api.github.com/users/ejlofgren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-24T18:40:37Z","updated_at":"2015-09-24T18:42:19Z","closed_at":null,"body":"First, apologies if this turns out to be a n00b error, but I've been unable to solve this ever since I started using Chimp, which is a really great tool!\r\n\r\nI'm using Windows 10 and installed the latest version of chimp today (Sep 24, 2015) for this test case (npm install chimp) and when running I get this error:\r\n```\r\n> .\\node_modules\\.bin\\chimp\r\n[chimp] Running...\r\n\r\nFeature: Test case for trying to use .then results in error.\r\n\r\n  As a human\r\n  I want to be able to use .then()\r\n\r\n\r\n  Scenario:                                                       # features\\why_is_client_execute_then_not_working_test_case.feature:6\r\n    Given I have visited https://github.com/xolvio/chimp          # features\\why_is_client_execute_then_not_working_test_case.feature:7\r\n    When I try to use .then() I get an error in the chimp console # features\\why_is_client_execute_then_not_working_test_case.feature:8\r\n      TypeError: undefined is not a function\r\n        at World.<anonymous> (features\\support\\step_defs.js:12:24)\r\n\r\n\r\n\r\n\r\n(::) failed steps (::)\r\n\r\nTypeError: undefined is not a function\r\n  at World.<anonymous> (features\\support\\step_defs.js:12:24)\r\n\r\n\r\nFailing scenarios:\r\nfeatures\\why_is_client_execute_then_not_working_test_case.feature:6 # Scenario:\r\n\r\n1 scenario (1 failed)\r\n2 steps (1 failed, 1 passed)\r\n\r\n[chimp] Finished running async processes with errors\r\n[chimp] run complete with errors Cucumber steps failed\r\nError in chimp init Cucumber steps failed\r\n```\r\n\r\nThe error above occurs with this code, line 12 is the line that has .then():\r\n\r\n\r\nFile: step_defs.js\r\n```\r\nmodule.exports = function() {\r\n    this.Given(/^I have visited https:\\/\\/github\\.com\\/xolvio\\/chimp$/, function () {\r\n        client.url(\"https://github.com/xolvio/chimp\");\r\n\r\n    });\r\n\r\n    this.When(/^I try to use \\.then\\(\\) I get an error in the chimp console$/, function () {\r\n        // Example code from http://webdriver.io/api/protocol/execute.html\r\n        client.execute(function(a, b, c, d) {\r\n            // browser context - you may not access neither client nor console\r\n            return a + b + c + d;\r\n        }, 1, 2, 3, 4).then(function(ret) {\r\n            // node.js context - client and console are available\r\n            console.log(ret.value); // outputs: 10\r\n        });\r\n    });\r\n\r\n};\r\n```\r\n\r\nFile: why_is_client_execute_then_not_working_test_case.feature\r\n```\r\nFeature: Test case for trying to use .then results in error.\r\n\r\n  As a human\r\n  I want to be able to use .then()\r\n  \r\n    Scenario:\r\n    Given I have visited https://github.com/xolvio/chimp\r\n    When I try to use .then() I get an error in the chimp console    \r\n```\r\n\r\nLet me know if there's any more information you need. I would really like to figure out why I'm unable to use .then() at all.\r\n\r\nIn case it helps, here's the output from \"npm install chimp\" and then  in case it provides any helpful info:\r\n```\r\n> npm install chimp\r\nnpm WARN optional dep failed, continuing fsevents@0.3.8\r\nnpm WARN deprecated URIjs@1.15.0: package renamed to \"urijs\" (lower-case), please update accordingly\r\n-\r\n> fibers@1.0.7 install C:\\Users\\elofgren\\Desktop\\temp\\chimp_install_test\\node_modules\\chimp\\node_modules\\fibers\r\n> node build.js || nodejs build.js\r\n\r\n`win32-x64-v8-3.28` exists; testing\r\nBinary is fine; exiting\r\nchimp@0.15.4 node_modules\\chimp\r\n├── freeport@1.0.5\r\n├── progress@1.1.8\r\n├── chai-as-promised@5.1.0\r\n├── chimp-widgets@0.2.0\r\n├── child-process-debug@0.0.7\r\n├── saucelabs@0.1.1\r\n├── colors@1.1.2\r\n├── minimist@1.2.0\r\n├── async@0.9.2\r\n├── underscore@1.8.3\r\n├── exit@0.1.2\r\n├── loglevel@1.4.0\r\n├── xolvio-jasmine-expect@1.0.0 (jasmine-core@2.3.4)\r\n├── bluebird@2.10.1\r\n├── chai@3.0.0 (assertion-error@1.0.1, type-detect@1.0.0, deep-eql@0.1.3)\r\n├── chokidar@1.0.6 (arrify@1.0.0, path-is-absolute@1.0.0, is-glob@1.1.3, async-each@0.1.6, glob-parent@1.3.0, is-binary-path@1.0.1, readdirp@1.4.0, anymatch@1.3.0)\r\n├── fs-extra@0.24.0 (path-is-absolute@1.0.0, jsonfile@2.2.2, graceful-fs@4.1.2, rimraf@2.4.3)\r\n├── request@2.62.0 (aws-sign2@0.5.0, forever-agent@0.6.1, stringstream@0.0.4, caseless@0.11.0, oauth-sign@0.8.0, tunnel-agent@0.4.1, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.3, combined-stream@1.0.5, qs@5.1.0, form-data@1.0.0-rc3, mime-types@2.1.7, http-signature@0.11.0, bl@1.0.0, har-validator@1.8.0, tough-cookie@2.0.0, hawk@3.1.0)\r\n├── ddp@0.11.1 (ddp-ejson@0.8.1-3, ddp-underscore-patched@0.8.1-2, faye-websocket@0.9.4, request@2.53.0)\r\n├── fibers@1.0.7\r\n├── selenium-standalone@4.6.1 (commander@2.6.0, minimist@1.1.0, which@1.1.1, mkdirp@0.5.0, URIjs@1.15.0, async@1.2.1, request@2.51.0, unzip@0.1.11, lodash@3.9.3)\r\n├── hapi@8.8.0 (cryptiles@2.0.4, peekaboo@1.0.0, ammo@1.0.0, accept@1.0.0, items@1.1.0, topo@1.0.2, kilt@1.1.1, catbox-memory@1.1.1, statehood@2.1.1, boom@2.7.2, shot@1.5.3, call@2.0.1, qs@4.0.0, iron@2.1.2, wreck@6.0.0, hoek@2.14.0, catbox@4.3.0, mimos@2.0.2, h2o2@4.0.1, vision@2.0.1, inert@2.1.5, subtext@1.1.1, joi@6.4.1, heavy@3.0.0)\r\n├── xolvio-sync-webdriverio@4.0.5 (xolvio-fiber-utils@2.0.3, meteor-promise@0.4.8, webdriverio@3.2.4)\r\n├── cucumber@0.5.3 (stack-chain@1.3.3, walkdir@0.0.10, nopt@3.0.4, coffee-script@1.10.0, underscore.string@3.2.2, cucumber-html@0.2.3, pogo@0.10.0, browserify@5.11.1, gherkin@2.12.2)\r\n└── phantomjs-bin@1.0.1\r\n```\r\n\r\nAny help or pointers are appreciated, thanks!"},"comment":{"url":"https://api.github.com/repos/xolvio/chimp/issues/comments/143015748","html_url":"https://github.com/xolvio/chimp/issues/75#issuecomment-143015748","issue_url":"https://api.github.com/repos/xolvio/chimp/issues/75","id":143015748,"user":{"login":"samhatoum","id":2021955,"avatar_url":"https://avatars.githubusercontent.com/u/2021955?v=3","gravatar_id":"","url":"https://api.github.com/users/samhatoum","html_url":"https://github.com/samhatoum","followers_url":"https://api.github.com/users/samhatoum/followers","following_url":"https://api.github.com/users/samhatoum/following{/other_user}","gists_url":"https://api.github.com/users/samhatoum/gists{/gist_id}","starred_url":"https://api.github.com/users/samhatoum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samhatoum/subscriptions","organizations_url":"https://api.github.com/users/samhatoum/orgs","repos_url":"https://api.github.com/users/samhatoum/repos","events_url":"https://api.github.com/users/samhatoum/events{/privacy}","received_events_url":"https://api.github.com/users/samhatoum/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T18:42:19Z","updated_at":"2015-09-24T18:42:19Z","body":"Chimp is now synchronous by default. This will make your life much easier in the long run"}}