rochejul / gulp-angular-protractor

Gulp plugin to run protractor tests
MIT License
25 stars 25 forks source link

Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:48107 for gulp protractor #34

Closed caneraydinbey closed 7 years ago

caneraydinbey commented 7 years ago
vegan@vegan:~/xxx-yyy/gateway$ gulp protractor qa
[10:52:58] Using gulpfile ~/xxx-yyy/gateway/gulpfile.js
[10:52:58] Starting 'protractor'...
[10:52:58] Starting 'qa'...
[10:52:58] Finished 'qa' after 76 μs
Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver

/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/http/index.js:174
      callback(new Error(message));
               ^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:48107
    at ClientRequest.<anonymous> (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/http/index.js:174:16)
    at emitOne (events.js:90:13)
    at ClientRequest.emit (events.js:182:7)
    at Socket.socketErrorListener (_http_client.js:306:9)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at emitErrorNT (net.js:1265:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
    at Function.webdriver.WebDriver.createSession (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
    at new Driver (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/chrome.js:810:36)
    at [object Object].DirectDriverProvider.getNewDriver (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/protractor/lib/driverProviders/direct.js:68:16)
    at [object Object].Runner.createBrowser (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/protractor/lib/runner.js:186:37)
    at /home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/protractor/lib/runner.js:276:21
    at _fulfilled (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:759:13)
    at /home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
[10:52:58] gulp-notify: [JHipster Gulp Build] Error: protractor exited with code 1
[10:52:58] Finished 'protractor' after 641 ms
[10:52:58] E2E Tests failed

i get this error when i run gulp protractor qa

[![enter image description here][1]][1]

it says

       at new Driver (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/chrome.js:810:36)

it opens a chrome browser when i run but it stays at there browser.

the path is

/home/vegan/xxx/gateway/node_modules/selenium-webdriver

i do

webdriver-manager update but it doesnot work

Why does thi happen?

image

UPDATE

this is in packagejson in selenumwebdriver

{
  "_args": [
    [
      "selenium-webdriver@https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.48.2.tgz",
      "/home/vegan/xxx-yyyy/gateway"
    ]
  ],
  "_from": "selenium-webdriver@2.48.2",
  "_id": "selenium-webdriver@2.48.2",
  "_inCache": true,
  "_location": "/selenium-webdriver",
  "_phantomChildren": {
    "bufferutil": "1.2.1",
    "options": "0.0.6",
    "ultron": "1.0.2",
    "utf-8-validate": "1.2.2",
    "xmlbuilder": "4.2.1"
  },
  "_requested": {
    "name": "selenium-webdriver",
    "raw": "selenium-webdriver@https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.48.2.tgz",
    "rawSpec": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.48.2.tgz",
    "scope": null,
    "spec": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.48.2.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/gulp-protractor/protractor",
    "/protractor"
  ],
  "_resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.48.2.tgz",
  "_shasum": "b26a4631430d0a9f36284ee0cfe09676e8f348ca",
  "_shrinkwrap": null,
  "_spec": "selenium-webdriver@https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.48.2.tgz",
  "_where": "/home/vegan/xx-yyyy/gateway",
  "bugs": {
    "url": "https://github.com/SeleniumHQ/selenium/issues"
  },
  "dependencies": {
    "adm-zip": "0.4.4",
    "rimraf": "^2.2.8",
    "tmp": "0.0.24",
    "ws": "^0.8.0",
    "xml2js": "0.4.4"
  },
  "description": "The official WebDriver JavaScript bindings from the Selenium project",
  "devDependencies": {
    "express": "^4.11.2",
    "mocha": ">= 1.21.x",
    "multer": "^0.1.7",
    "promises-aplus-tests": "^2.1.0",
    "serve-index": "^1.6.1"
  },
  "engines": {
    "node": ">= 0.12.x"
  },
  "homepage": "https://github.com/SeleniumHQ/selenium",
  "keywords": [
    "automation",
    "selenium",
    "testing",
    "webdriver",
    "webdriverjs"
  ],
  "license": "Apache-2.0",
  "main": "./index",
  "name": "selenium-webdriver",
  "optionalDependencies": {},
  "readme": "# selenium-webdriver\n\nSelenium is a browser automation library. Most often used for testing\nweb-applications, Selenium may be used for any task that requires automating\ninteraction with the browser.\n\n## Installation\n\nSelenium supports Node `0.12.x` and `4.x`. Users on Node `0.12.x` must run with\nthe --harmony flag. Selenium may be installed via npm with\n\n    npm install selenium-webdriver\n\nOut of the box, Selenium includes everything you need to work with Firefox. You\nwill need to download additional components to work with the other major\nbrowsers. The drivers for Chrome, IE, PhantomJS, and Opera are all standalone\nexecutables that should be placed on your\n[PATH](http://en.wikipedia.org/wiki/PATH_%28variable%29). The SafariDriver\nbrowser extension should be installed in your browser before using Selenium; we\nrecommend disabling the extension when using the browser without Selenium or\ninstalling the extension in a profile only used for testing.\n\n| Browser           | Component                          |\n| ----------------- | ---------------------------------- |\n| Chrome            | [chromedriver(.exe)][chrome]       |\n| Internet Explorer | [IEDriverServer.exe][release]      |\n| PhantomJS         | [phantomjs(.exe)][phantomjs]       |\n| Opera             | [operadriver(.exe)][opera]         |\n| Safari            | [SafariDriver.safariextz][release] |\n\n## Usage\n\nThe sample below and others are included in the `example` directory. You may\nalso find the tests for selenium-webdriver informative.\n\n    var webdriver = require('selenium-webdriver'),\n        By = require('selenium-webdriver').By,\n        until = require('selenium-webdriver').until;\n\n    var driver = new webdriver.Builder()\n        .forBrowser('firefox')\n        .build();\n\n    driver.get('http://www.google.com/ncr');\n    driver.findElement(By.name('q')).sendKeys('webdriver');\n    driver.findElement(By.name('btnG')).click();\n    driver.wait(until.titleIs('webdriver - Google Search'), 1000);\n    driver.quit();\n\n### Using the Builder API\n\nThe `Builder` class is your one-stop shop for configuring new WebDriver\ninstances. Rather than clutter your code with branches for the various browsers,\nthe builder lets you set all options in one flow. When you call\n`Builder#build()`, all options irrelevant to the selected browser are dropped:\n\n    var webdriver = require('selenium-webdriver'),\n        chrome = require('selenium-webdriver/chrome'),\n        firefox = require('selenium-webdriver/firefox');\n\n    var driver = new webdriver.Builder()\n        .forBrowser('firefox')\n        .setChromeOptions(/* ... */)\n        .setFirefoxOptions(/* ... */)\n        .build();\n\nWhy would you want to configure options irrelevant to the target browser? The\n`Builder`'s API defines your _default_ configuration. You can change the target\nbrowser at runtime through the `SELENIUM_BROWSER` environment variable. For\nexample, the `example/google_search.js` script is configured to run against\nFirefox. You can run the example against other browsers just by changing the\nruntime environment\n\n    # cd node_modules/selenium-webdriver\n    node example/google_search\n    SELENIUM_BROWSER=chrome node example/google_search\n    SELENIUM_BROWSER=safari node example/google_search\n\n### The Standalone Selenium Server\n\nThe standalone Selenium Server acts as a proxy between your script and the\nbrowser-specific drivers. The server may be used when running locally, but it's\nnot recommend as it introduces an extra hop for each request and will slow\nthings down. The server is required, however, to use a browser on a remote host\n(most browser drivers, like the IEDriverServer, do not accept remote\nconnections).\n\nTo use the Selenium Server, you will need to install the\n[JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and\ndownload the latest server from [Selenium][release]. Once downloaded, run the\nserver with\n\n    java -jar selenium-server-standalone-2.45.0.jar\n\nYou may configure your tests to run against a remote server through the Builder\nAPI:\n\n    var driver = new webdriver.Builder()\n        .forBrowser('firefox')\n        .usingServer('http://localhost:4444/wd/hub')\n        .build();\n\nOr change the Builder's configuration at runtime with the `SELENIUM_REMOTE_URL`\nenvironment variable:\n\n    SELENIUM_REMOTE_URL=\"http://localhost:4444/wd/hub\" node script.js\n\nYou can experiment with these options using the `example/google_search.js`\nscript provided with `selenium-webdriver`.\n\n## Documentation\n\nAPI documentation is included in the `docs` directory and is also available\nonline from the [Selenium project][api]. Addition resources include\n\n- the #selenium channel on freenode IRC\n- the [selenium-users@googlegroups.com][users] list\n- [SeleniumHQ](http://www.seleniumhq.org/docs/) documentation\n\n## Contributing\n\nContributions are accepted either through [GitHub][gh] pull requests or patches\nvia the [Selenium issue tracker][issues]. You must sign our\n[Contributor License Agreement][cla] before your changes will be accepted.\n\n## Issues\n\nPlease report any issues using the [Selenium issue tracker][issues]. When using\nthe issue tracker\n\n- __Do__ include a detailed description of the problem.\n- __Do__ include a link to a [gist](http://gist.github.com/) with any\n    interesting stack traces/logs (you may also attach these directly to the bug\n    report).\n- __Do__ include a [reduced test case][reduction]. Reporting \"unable to find\n    element on the page\" is _not_ a valid report - there's nothing for us to\n    look into. Expect your bug report to be closed if you do not provide enough\n    information for us to investigate.\n- __Do not__ use the issue tracker to submit basic help requests. All help\n    inquiries should be directed to the [user forum][users] or #selenium IRC\n    channel.\n- __Do not__ post empty \"I see this too\" or \"Any updates?\" comments. These\n    provide no additional information and clutter the log.\n- __Do not__ report regressions on closed bugs as they are not actively\n    monitored for upates (especially bugs that are >6 months old). Please open a\n    new issue and reference the original bug in your report.\n\n## License\n\nLicensed to the Software Freedom Conservancy (SFC) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The SFC licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n\n[api]: http://seleniumhq.github.io/selenium/docs/api/javascript/\n[cla]: http :/ /go o.gl/qC50R\n[chrome]: http://chromedriver.storage.googleapis.com/index.html\n[gh]: https://github.com/SeleniumHQ/selenium/\n[issues]: https://github.com/SeleniumHQ/selenium/issues\n[opera]: https://github.com/operasoftware/operachromiumdriver/releases\n[phantomjs]: http://phantomjs.org/\n[reduction]: http://www.webkit.org/quality/reduction.html\n[release]: http://selenium-release.storage.googleapis.com/index.html\n[users]: https://groups.google.com/forum/#!forum/selenium-users\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/SeleniumHQ/selenium.git"
  },
  "scripts": {
    "test": "mocha --harmony -t 600000 --recursive test"
  },
  "version": "2.48.2"
}

those are versions

vegan@vegan:~/xx-yyyy/gateway$ node -v
v5.12.0
vegan@vegan:~/xx-yyyy/gateway$ npm -v
3.8.6

my friend also has this versions but he can run Also i could until lasst week. I dont know what happened. I deleted node modules, resetted all but did not work.

i dont know what i can give information about.

i also tried this

http://stackoverflow.com/a/34758398/6804200

changed configjson to this

{
  "webdriverVersions": {
      "seleniumServerJar": './node_modules/protractor/selenium/selenium-server-standalone-2.51.0.jar',
      "chromedriver": "2.21",
    "iedriver": "2.51.0"
  }
}

but nothng changed.

i did also npm update

gulp protractor is

gulp.task(
    'protractor', function () {

        configObj['args'] = [];//to be able to add multiple parameters

        if (argv.suite) {
            configObj['args'].push(
                '--suite',
                argv.suite
            );
        }

        return gulp.src([])
            .pipe(plumber({errorHandler: handleErrors}))
            .pipe(protractor(configObj))
            .on(
                'error', function () {
                        gutil.log('E2E Tests failed');
                        process.exit(1);
                    }
                );
        }
    );
var configObj = {
    configFile: config.test + 'protractor.conf.js'
};

protractorconf is

var HtmlScreenshotReporter = require("protractor-jasmine2-screenshot-reporter");
var JasmineReporters = require('jasmine-reporters');

var prefix = 'src/test/javascript/'.replace(/[^/]+/g, '..');

exports.config = {

    chromeDriver: prefix + 'node_modules/protractor/selenium/chromedriver',
    allScriptsTimeout: 240000,

    suites: {
        register: './e2e/account/register/*.js',
        login: './e2e/account/login/*.js'

    },

    capabilities: {
        'browserName': 'chrome'
    },

    directConnect: true,

    framework: 'jasmine2',

    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 240000
    },
    onPrepare: function () {

        var disableNgAnimate = function () {
            angular
                .module('disableNgAnimate', [])
                .run(
                    [
                        '$animate',
                        function ($animate) {
                            $animate.enabled(false);
                        }
                    ]
                );
        };

        var disableCssAnimate = function () {
            angular
                .module('disableCssAnimate', [])
                .run(
                    function () {
                        var style = document.createElement('style');
                        style.type = 'text/css';
                        style.innerHTML = 'body * {' +
                            '-webkit-transition: none !important;' +
                            '-moz-transition: none !important;' +
                            '-o-transition: none !important;' +
                            '-ms-transition: none !important;' +
                            'transition: none !important;' +
                            '}';
                        document.getElementsByTagName('head')[0].appendChild(style);
                    }
                );
        };

        browser.addMockModule('disableNgAnimate', disableNgAnimate);
        browser.addMockModule('disableCssAnimate', disableCssAnimate);

        browser.driver.manage().window().maximize();

    }
};

gulp tasks of qa

gulp.task('qa', function () {

    argv.baseUrl = qaurl;

    configObj['args'].push(
        '--baseUrl',
        argv.baseUrl
    );
});

i got this when i do npm install

npm WARN lifecycle gateway@0.0.0~postinstall: cannot run in wd %s %s (wd=%s) gateway@0.0.0 webdriver-manager update /home/vegan/xx-yyy/gateway npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17

vegan@vegan:~/xxx-/gateway$ sudo npm install --unsafe-perm

gateway@0.0.0 postinstall /home/vegan/xxxgateway webdriver-manager update

sh: 1: webdriver-manager: not found

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17 npm ERR! Linux 4.4.0-59-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--unsafe-perm" npm ERR! node v5.12.0 npm ERR! npm v3.8.6 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! gateway@0.0.0 postinstall: webdriver-manager update npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the gateway@0.0.0 postinstall script 'webdriver-manager update'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the gateway package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! webdriver-manager update npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs gateway npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls gateway npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/vegan/xxx/gateway/npm-debug.log

This is inside a spring boot project but this project doesnot have to be up in local because it is already up in server. So wwhen i run gulp, the browser should go to that url, qa url (in past it was going).. I tried both, upping my proejct or without it but still same.

vegan@vegan:~xx webdriver-manager upddae **WARNING:root:could not open file '/etc/apt/sources.list'

webdriver-manager: command not found**

Also i tried to delete node modules, gateway and tried again. but it is sme.


but if i do

vegan@vegan:~/xxx/gateway$ sudo npm install -g protractor npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue /usr/bin/webdriver-manager -> /usr/lib/node_modules/protractor/bin/webdriver-manager /usr/bin/protractor -> /usr/lib/node_modules/protractor/bin/protractor /usr/lib └─┬ protractor@5.0.0 ├── @types/node@6.0.62 ├── @types/q@0.0.32 ├── @types/selenium-webdriver@2.53.39 ├─┬ blocking-proxy@0.0.2 │ ├── es6-promise@4.0.5 │ ├── minimist@1.2.0 │ └─┬ selenium-webdriver@2.53.3 │ ├── adm-zip@0.4.4 │ ├── tmp@0.0.24 │ ├─┬ ws@1.1.1 │ │ ├── options@0.0.6 │ │ └── ultron@1.0.2 │ └─┬ xml2js@0.4.4 │ └── xmlbuilder@8.2.2 ├─┬ chalk@1.1.3 │ ├── ansi-styles@2.2.1 │ ├── escape-string-regexp@1.0.5 │ ├─┬ has-ansi@2.0.0 │ │ └── ansi-regex@2.1.1 │ ├── strip-ansi@3.0.1 │ └── supports-color@2.0.0 ├─┬ glob@7.1.1 │ ├── fs.realpath@1.0.0 │ ├─┬ inflight@1.0.6 │ │ └── wrappy@1.0.2 │ ├── inherits@2.0.3 │ ├─┬ minimatch@3.0.3 │ │ └─┬ brace-expansion@1.1.6 │ │ ├── balanced-match@0.4.2 │ │ └── concat-map@0.0.1 │ ├── once@1.4.0 │ └── path-is-absolute@1.0.1 ├─┬ jasmine@2.4.1 │ ├── exit@0.1.2 │ ├─┬ glob@3.2.11 │ │ └─┬ minimatch@0.3.0 │ │ ├── lru-cache@2.7.3 │ │ └── sigmund@1.0.1 │ └── jasmine-core@2.4.1 ├── jasminewd2@0.1.1 ├─┬ optimist@0.6.1 │ ├── minimist@0.0.10 │ └── wordwrap@0.0.3 ├── q@1.4.1 ├─┬ saucelabs@1.3.0 │ └─┬ https-proxy-agent@1.0.0 │ ├─┬ agent-base@2.0.1 │ │ └── semver@5.0.3 │ ├─┬ debug@2.6.0 │ │ └── ms@0.7.2 │ └── extend@3.0.0 ├─┬ selenium-webdriver@3.0.1 │ ├── adm-zip@0.4.7 │ ├── rimraf@2.5.4 │ ├─┬ tmp@0.0.30 │ │ └── os-tmpdir@1.0.2 │ └─┬ xml2js@0.4.17 │ ├── sax@0.6.1 │ └─┬ xmlbuilder@4.2.1 │ └── lodash@4.17.4 ├─┬ source-map-support@0.4.10 │ └── source-map@0.5.6 ├─┬ webdriver-js-extender@0.2.3 │ └── selenium-webdriver@2.53.3 └─┬ webdriver-manager@11.1.1 ├── adm-zip@0.4.7 ├─┬ del@2.2.2 │ ├─┬ globby@5.0.0 │ │ ├─┬ array-union@1.0.2 │ │ │ └── array-uniq@1.0.3 │ │ └── arrify@1.0.1 │ ├── is-path-cwd@1.0.0 │ ├─┬ is-path-in-cwd@1.0.0 │ │ └─┬ is-path-inside@1.0.0 │ │ └── path-is-inside@1.0.2 │ ├── object-assign@4.1.1 │ ├── pify@2.3.0 │ └─┬ pinkie-promise@2.0.1 │ └── pinkie@2.0.4 ├── ini@1.3.4 ├─┬ request@2.79.0 │ ├── aws-sign2@0.6.0 │ ├── aws4@1.5.0 │ ├── caseless@0.11.0 │ ├─┬ combined-stream@1.0.5 │ │ └── delayed-stream@1.0.0 │ ├── forever-agent@0.6.1 │ ├─┬ form-data@2.1.2 │ │ └── asynckit@0.4.0 │ ├─┬ har-validator@2.0.6 │ │ ├─┬ commander@2.9.0 │ │ │ └── graceful-readlink@1.0.1 │ │ └─┬ is-my-json-valid@2.15.0 │ │ ├── generate-function@2.0.0 │ │ ├─┬ generate-object-property@1.2.0 │ │ │ └── is-property@1.0.2 │ │ ├── jsonpointer@4.0.1 │ │ └── xtend@4.0.1 │ ├─┬ hawk@3.1.3 │ │ ├── boom@2.10.1 │ │ ├── cryptiles@2.0.5 │ │ ├── hoek@2.16.3 │ │ └── sntp@1.0.9 │ ├─┬ http-signature@1.1.1 │ │ ├── assert-plus@0.2.0 │ │ ├─┬ jsprim@1.3.1 │ │ │ ├── extsprintf@1.0.2 │ │ │ ├── json-schema@0.2.3 │ │ │ └── verror@1.3.6 │ │ └─┬ sshpk@1.10.2 │ │ ├── asn1@0.2.3 │ │ ├── assert-plus@1.0.0 │ │ ├── bcrypt-pbkdf@1.0.0 │ │ ├─┬ dashdash@1.14.1 │ │ │ └── assert-plus@1.0.0 │ │ ├── ecc-jsbn@0.1.1 │ │ ├─┬ getpass@0.1.6 │ │ │ └── assert-plus@1.0.0 │ │ ├── jodid25519@1.0.2 │ │ ├── jsbn@0.1.0 │ │ └── tweetnacl@0.14.5 │ ├── is-typedarray@1.0.0 │ ├── isstream@0.1.2 │ ├── json-stringify-safe@5.0.1 │ ├─┬ mime-types@2.1.14 │ │ └── mime-db@1.26.0 │ ├── oauth-sign@0.8.2 │ ├── qs@6.3.0 │ ├── stringstream@0.0.5 │ ├─┬ tough-cookie@2.3.2 │ │ └── punycode@1.4.1 │ ├── tunnel-agent@0.4.3 │ └── uuid@3.0.1 └── semver@5.3.0

this gives different error


vegan@vegan:~/xxx/gateway$ webdriver-manager update --chrome
/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cli/logger.js:66
    info(...msgs) {
         ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cli/index.js:8:10)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

But i am not sure about if gulp uses this or not.

rochejul commented 7 years ago

Hi

What is the gulp task qa ?

Does it run a server ?

What is your plugin version ?

What is your configuration ?

I try to understand your context and what you try to do

Many tanks

caneraydinbey commented 7 years ago

@rochejul i updated infomation, i added some information. thanks.

rochejul commented 7 years ago
vegan@vegan:~/xxx/gateway$ webdriver-manager update --chrome
/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cli/logger.js:66
    info(...msgs) {
         ^^^

SyntaxError: Unexpected token ...

'...' is used from ES6 (and ESnext) for destructuring the array.

That means the webdriver-manager uses now a recent nodejs version

Could you try to update to nodejs 6.5 and test it again ?

If it works, that means I have to check or force the node engine

Many thanks

caneraydinbey commented 7 years ago

I updated to latest, 7.40 @rochejul

vegan@vegan:~$ node -v
v7.4.0
vegan@vegan:~$ npm -v
4.0.5

but it gives error still

vegan@vegan:~/xxx-yyy/gateway$ gulp protractor qa /home/vegan/xxx-yyy/gateway/node_modules/node-sass/lib/binding.js:15 throw new Error(errors.missingBinary()); ^

Error: Missing binding /home/vegan/xxx-yyy/gateway/node_modules/node-sass/vendor/linux-x64-51/binding.node Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 7.x

Found bindings for the following environments:

  • Linux 64-bit with Node.js 5.x

This usually happens because your environment has changed since running npm install. Run npm rebuild node-sass to build the binding for your current environment. at module.exports (/home/vegan/xxx-yyy/gateway/node_modules/node-sass/lib/binding.js:15:13) at Object. (/home/vegan/xxx-yyy/gateway/node_modules/node-sass/lib/index.js:14:35) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/home/vegan/xxx-yyy/gateway/node_modules/gulp-sass/index.js:186:21)

rochejul commented 7 years ago

It seems now this is an issue on node-saas

Could you run first: npm rebuild node-sass And then rerun the tests ?

Many thanks

caneraydinbey commented 7 years ago

vegan@vegan:~/xxx-yyy/gateway$ npm rebuild node-sass

node-sass@3.13.1 install /home/vegan/xxx-yyy/gateway/node_modules/node-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/linux-x64-51_binding.node Download complete ] - : Binary saved to /home/vegan/xxx-yyy/gateway/node_modules/node-sass/vendor/linux-x64-51/binding.node Caching binary to /home/vegan/.npm/node-sass/3.13.1/linux-x64-51_binding.node

node-sass@3.13.1 postinstall /home/vegan/xxx-yyy/gateway/node_modules/node-sass node scripts/build.js

Binary found at /home/vegan/xxx-yyy/gateway/node_modules/node-sass/vendor/linux-x64-51/binding.node Testing binary Binary is fine node-sass@3.13.1 /home/vegan/xxx-yyy/gateway/node_modules/node-sass

vegan@vegan:~/xxx-yyy/gateway$ gulp protractor qa [00:27:29] Using gulpfile ~/xxx-yyy/gateway/gulpfile.js [00:27:29] Starting 'protractor'... [00:27:29] Starting 'qa'... [00:27:29] Finished 'qa' after 206 μs Using ChromeDriver directly... [launcher] Running 1 instances of WebDriver (node:17599) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/http/index.js:174 callback(new Error(message)); ^ Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:41748 at ClientRequest. (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/http/index.js:174:16) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:309:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1281:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/nexttick.js:98:9) From: Task: WebDriver.createSession() at Function.webdriver.WebDriver.acquireSession (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22) at Function.webdriver.WebDriver.createSession (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30) at new Driver (/home/vegan/xxx-yyy/gateway/node_modules/selenium-webdriver/chrome.js:810:36) at DirectDriverProvider.getNewDriver (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/protractor/lib/driverProviders/direct.js:68:16) at Runner.createBrowser (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/protractor/lib/runner.js:186:37) at /home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/protractor/lib/runner.js:276:21 at _fulfilled (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:797:54) at self.promiseDispatch.done (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:826:30) at Promise.promise.promiseDispatch (/home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:759:13) at /home/vegan/xxx-yyy/gateway/node_modules/gulp-protractor/node_modules/q/q.js:525:49 [launcher] Process exited with error code 1 [00:27:52] gulp-notify: [JHipster Gulp Build] Error: protractor exited with code 1 [00:27:52] Finished 'protractor' after 23 s [00:27:52] E2E Tests failed

@rochejul it did not work :(

rochejul commented 7 years ago

Do you try to connect to an existing Selenium server ? If so, can you ping ?

If you want to auto start / stop a local selenium server, you should use the option "autoStartStopServer".

See this example: https://github.com/rochejul/gulp-angular-protractor/tree/master/examples/example-02

Try to extend it as you need because your error mean there is no server

Regards

caneraydinbey commented 7 years ago

@rochejul

I changed my gulp to this

var gulpProtractorAngular = require('gulp-angular-protractor');

/to run individual suites pass gulp protractor suite suiteName for enviroment "gulp pratractor qa" for qa also "gulp protractor --suite logout qa" for both/ gulp.task( 'protractor', function (callback) {

    configObj['args'] =[];//to be able to add multiple parameters

    if (argv.suite) {
        configObj['args'].push (
            '--suite',
            argv.suite
        );
    }
    gulp
        .src([])
        .pipe(gulpProtractorAngular({
            'debug': false,
            'autoStartStopServer': true
        })).pipe(protractor(configObj))
        .on('error', function(e) {
            console.log(e);
        })
        .on('end', callback);

}

);

gulp.task('qa', function () {

argv.baseUrl = qaurl;

configObj['args'].push (
    '--baseUrl',
    argv.baseUrl
);

});

but errors are now

`vegan@vegan:~/xx/gateway$ gulp protractor qa module.js:472 throw err; ^

Error: Cannot find module 'gulp-angular-protractor' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/home/vegan/xx/gateway/gulpfile.js:411:29) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Liftoff.handleArguments (/usr/lib/node_modules/gulp/bin/gulp.js:116:3) at Liftoff. (/usr/lib/node_modules/gulp/node_modules/liftoff/index.js:198:16) at module.exports (/usr/lib/node_modules/gulp/node_modules/flagged-respawn/index.js:17:3) at Liftoff. (/usr/lib/node_modules/gulp/node_modules/liftoff/index.js:190:9)`

rochejul commented 7 years ago

Have you done a "npm install" first and declared welly the plugin ?

Could you please test first the example project to check if it works on your side ?

Many thanks

caneraydinbey commented 7 years ago

Yes i declared npm install @rochejul

`vegan@vegan:~/xx/gateway$ sudo npm install [sudo] password for vegan: npm WARN lifecycle gateway@0.0.0~postinstall: cannot run in wd %s %s (wd=%s) gateway@0.0.0 webdriver-manager update /home/vegan/xx/gateway npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) vegan@vegan:~/xx/gateway$ gulp protractor qa module.js:472 throw err; ^

Error: Cannot find module 'gulp-angular-protractor' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/home/vegan/xx/gateway/gulpfile.js:411:29) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Liftoff.handleArguments (/usr/lib/node_modules/gulp/bin/gulp.js:116:3) at Liftoff. (/usr/lib/node_modules/gulp/node_modules/liftoff/index.js:198:16) at module.exports (/usr/lib/node_modules/gulp/node_modules/flagged-respawn/index.js:17:3) at Liftoff. (/usr/lib/node_modules/gulp/node_modules/liftoff/index.js:190:9) `

i retrieved project via github of that

[](

vegan@vegan:~/gulp-angular-protractor/examples/example-01$ gulp protractor [10:02:50] Using gulpfile ~/gulp-angular-protractor/examples/example-01/Gulpfile.js [10:02:50] Starting 'webdriver_update'... [10:02:53] I/update - selenium standalone: file exists /home/vegan/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar [10:02:53] I/update - selenium standalone: v2.53.1 up to date [10:02:53] I/update - chromedriver: file exists /home/vegan/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26linux64.zip [10:02:53] I/update - chromedriver: unzipping chromedriver_2.26linux64.zip [10:02:53] I/update - chromedriver: setting permissions to 0755 for /home/vegan/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26 [10:02:53] I/update - chromedriver: v2.26 up to date [10:02:54] I/update - geckodriver: file exists /home/vegan/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.11.1-linux64.tar.gz [10:02:54] I/update - geckodriver: unzipping geckodriver-v0.11.1-linux64.tar.gz [10:02:55] I/update - geckodriver: setting permissions to 0755 for /home/vegan/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.11.1 [10:02:55] I/update - geckodriver: vv0.11.1 up to date [10:02:55] Finished 'webdriver_update' after 4.26 s [10:02:55] Starting 'protractor'... [10:02:55] gulp-angular-protractor - The plugin is retrieved and will start soon [10:02:55] gulp-angular-protractor - Basic use (as the gulp-protractor plugin). [10:02:55] gulp-angular-protractor - We have the config file to the following path: /home/vegan/gulp-angular-protractor/examples/example-01/protractor.conf.js (node:9925) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. [10:02:55] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [10:02:55] I/launcher - Running 1 instances of WebDriver [10:02:55] E/launcher - Error code: 135 [10:02:55] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444 [10:02:55] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444 at ClientRequest. (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:381:15) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:309:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1281:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) From: Task: WebDriver.createSession() at Function.createSession (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:329:24) at Builder.build (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/selenium-webdriver/builder.js:458:24) at Hosted.DriverProvider.getNewDriver (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/built/driverProviders/driverProvider.js:37:33) at Runner.createBrowser (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/built/runner.js:197:43) at /home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/built/runner.js:276:30 at _fulfilled (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/q/q.js:796:13) at /home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/q/q.js:556:49 at runSingle (/home/vegan/node_modules/gulp-angular-protractor/node_modules/protractor/node_modules/q/q.js:137:13) [10:02:55] E/launcher - Process exited with error code 135 { [Error: protractor exited with code 135] message: 'protractor exited with code 135', showStack: false, showProperties: true, plugin: 'gulp-angular-protractor', __safety: { toString: [Function: bound ] } } 33)

i installed it with npm

vegan@vegan:~$ sudo npm install --save-dev gulp-angular-protractor vegan@0.0.0 /home/vegan └─┬ gulp-angular-protractor@0.3.0 ├─┬ event-stream@3.1.5 │ ├── duplexer@0.1.1 │ ├── from@0.1.3 │ ├── map-stream@0.1.0 │ ├── pause-stream@0.0.11 │ ├── split@0.2.10 │ ├── stream-combiner@0.0.4 │ └── through@2.3.6 ├─┬ gulp-util@3.0.1 │ ├─┬ chalk@0.5.1 │ │ ├── ansi-styles@1.1.0 │ │ ├── escape-string-regexp@1.0.2 │ │ ├─┬ has-ansi@0.1.0 │ │ │ └── ansi-regex@0.2.1 │ │ ├─┬ strip-ansi@0.3.0 │ │ │ └── ansi-regex@0.2.1 │ │ └── supports-color@0.2.0 │ ├─┬ dateformat@1.0.11 │ │ ├── get-stdin@3.0.2 │ │ └─┬ meow@2.0.0 │ │ ├─┬ camelcase-keys@1.0.0 │ │ │ ├── camelcase@1.0.2 │ │ │ └── map-obj@1.0.0 │ │ ├─┬ indent-string@1.2.0 │ │ │ └─┬ repeating@1.1.1 │ │ │ └── is-finite@1.0.0 │ │ └── object-assign@1.0.0 │ ├── lodash@2.4.1 │ ├── lodash._reinterpolate@2.4.1 │ ├─┬ lodash.template@2.4.1 │ │ ├── lodash._escapestringchar@2.4.1 │ │ ├─┬ lodash.defaults@2.4.1 │ │ │ └── lodash._objecttypes@2.4.1 │ │ ├─┬ lodash.escape@2.4.1 │ │ │ ├─┬ lodash._escapehtmlchar@2.4.1 │ │ │ │ └── lodash._htmlescapes@2.4.1 │ │ │ └─┬ lodash._reunescapedhtml@2.4.1 │ │ │ └── lodash._htmlescapes@2.4.1 │ │ ├─┬ lodash.keys@2.4.1 │ │ │ ├── lodash._isnative@2.4.1 │ │ │ ├─┬ lodash._shimkeys@2.4.1 │ │ │ │ └── lodash._objecttypes@2.4.1 │ │ │ └─┬ lodash.isobject@2.4.1 │ │ │ └── lodash._objecttypes@2.4.1 │ │ ├── lodash.templatesettings@2.4.1 │ │ └── lodash.values@2.4.1 │ ├── minimist@1.1.0 │ ├─┬ multipipe@0.1.2 │ │ └─┬ duplexer2@0.0.2 │ │ └─┬ readable-stream@1.1.13 │ │ ├── core-util-is@1.0.1 │ │ ├── inherits@2.0.1 │ │ ├── isarray@0.0.1 │ │ └── string_decoder@0.10.31 │ └─┬ vinyl@0.4.6 │ ├── clone@0.2.0 │ └── clone-stats@0.0.1 ├── lodash@2.4.1 ├─┬ protractor@4.0.11 │ ├── @types/jasmine@2.5.38 │ ├── @types/node@6.0.51 │ ├── @types/q@0.0.32 │ ├── @types/selenium-webdriver@2.53.36 │ ├── adm-zip@0.4.7 │ ├─┬ chalk@1.1.3 │ │ ├── ansi-styles@2.2.1 │ │ ├── escape-string-regexp@1.0.5 │ │ ├─┬ has-ansi@2.0.0 │ │ │ └── ansi-regex@2.0.0 │ │ ├─┬ strip-ansi@3.0.1 │ │ │ └── ansi-regex@2.0.0 │ │ └── supports-color@2.0.0 │ ├─┬ glob@7.1.1 │ │ ├── fs.realpath@1.0.0 │ │ ├─┬ inflight@1.0.6 │ │ │ └── wrappy@1.0.2 │ │ ├── inherits@2.0.3 │ │ ├─┬ minimatch@3.0.3 │ │ │ └─┬ brace-expansion@1.1.6 │ │ │ ├── balanced-match@0.4.2 │ │ │ └── concat-map@0.0.1 │ │ ├─┬ once@1.4.0 │ │ │ └── wrappy@1.0.2 │ │ └── path-is-absolute@1.0.1 │ ├─┬ jasmine@2.4.1 │ │ ├── exit@0.1.2 │ │ ├─┬ glob@3.2.11 │ │ │ ├── inherits@2.0.3 │ │ │ └─┬ minimatch@0.3.0 │ │ │ ├── lru-cache@2.7.3 │ │ │ └── sigmund@1.0.1 │ │ └── jasmine-core@2.4.1 │ ├── jasminewd2@0.0.10 │ ├─┬ optimist@0.6.1 │ │ ├── minimist@0.0.10 │ │ └── wordwrap@0.0.3 │ ├── q@1.4.1 │ ├─┬ saucelabs@1.3.0 │ │ └─┬ https-proxy-agent@1.0.0 │ │ ├─┬ agent-base@2.0.1 │ │ │ └── semver@5.0.3 │ │ ├─┬ debug@2.3.3 │ │ │ └── ms@0.7.2 │ │ └── extend@3.0.0 │ ├─┬ selenium-webdriver@2.53.3 │ │ ├── adm-zip@0.4.4 │ │ ├── rimraf@2.5.4 │ │ ├── tmp@0.0.24 │ │ ├─┬ ws@1.1.1 │ │ │ ├── options@0.0.6 │ │ │ └── ultron@1.0.2 │ │ └─┬ xml2js@0.4.4 │ │ ├── sax@0.6.1 │ │ └── xmlbuilder@8.2.2 │ └─┬ source-map-support@0.4.6 │ └── source-map@0.5.6 ├─┬ through2@0.6.3 │ ├─┬ readable-stream@1.0.33 │ │ ├── core-util-is@1.0.1 │ │ ├── inherits@2.0.1 │ │ ├── isarray@0.0.1 │ │ └── string_decoder@0.10.31 │ └── xtend@4.0.0 └─┬ webdriver-manager@10.2.8 ├── adm-zip@0.4.7 ├─┬ chalk@1.1.3 │ ├── ansi-styles@2.2.1 │ ├── escape-string-regexp@1.0.5 │ ├─┬ has-ansi@2.0.0 │ │ └── ansi-regex@2.0.0 │ ├─┬ strip-ansi@3.0.1 │ │ └── ansi-regex@2.0.0 │ └── supports-color@2.0.0 ├─┬ del@2.2.2 │ ├─┬ globby@5.0.0 │ │ ├─┬ array-union@1.0.2 │ │ │ └── array-uniq@1.0.3 │ │ └── arrify@1.0.1 │ ├── is-path-cwd@1.0.0 │ ├─┬ is-path-in-cwd@1.0.0 │ │ └─┬ is-path-inside@1.0.0 │ │ └── path-is-inside@1.0.2 │ ├── object-assign@4.1.0 │ ├── pify@2.3.0 │ └─┬ pinkie-promise@2.0.1 │ └── pinkie@2.0.4 ├─┬ glob@7.1.1 │ ├── fs.realpath@1.0.0 │ ├─┬ inflight@1.0.6 │ │ └── wrappy@1.0.2 │ ├── inherits@2.0.3 │ ├─┬ minimatch@3.0.3 │ │ └─┬ brace-expansion@1.1.6 │ │ ├── balanced-match@0.4.2 │ │ └── concat-map@0.0.1 │ ├─┬ once@1.4.0 │ │ └── wrappy@1.0.2 │ └── path-is-absolute@1.0.1 ├── ini@1.3.4 ├── minimist@1.2.0 ├── q@1.4.1 ├─┬ request@2.79.0 │ ├── aws-sign2@0.6.0 │ ├── aws4@1.5.0 │ ├── caseless@0.11.0 │ ├─┬ combined-stream@1.0.5 │ │ └── delayed-stream@1.0.0 │ ├── extend@3.0.0 │ ├── forever-agent@0.6.1 │ ├─┬ form-data@2.1.2 │ │ └── asynckit@0.4.0 │ ├─┬ har-validator@2.0.6 │ │ ├─┬ commander@2.9.0 │ │ │ └── graceful-readlink@1.0.1 │ │ ├─┬ is-my-json-valid@2.15.0 │ │ │ ├── generate-function@2.0.0 │ │ │ ├─┬ generate-object-property@1.2.0 │ │ │ │ └── is-property@1.0.2 │ │ │ ├── jsonpointer@4.0.0 │ │ │ └── xtend@4.0.1 │ │ └─┬ pinkie-promise@2.0.1 │ │ └── pinkie@2.0.4 │ ├─┬ hawk@3.1.3 │ │ ├── boom@2.10.1 │ │ ├── cryptiles@2.0.5 │ │ ├── hoek@2.16.3 │ │ └── sntp@1.0.9 │ ├─┬ http-signature@1.1.1 │ │ ├── assert-plus@0.2.0 │ │ ├─┬ jsprim@1.3.1 │ │ │ ├── extsprintf@1.0.2 │ │ │ ├── json-schema@0.2.3 │ │ │ └── verror@1.3.6 │ │ └─┬ sshpk@1.10.1 │ │ ├── asn1@0.2.3 │ │ ├── assert-plus@1.0.0 │ │ ├── bcrypt-pbkdf@1.0.0 │ │ ├── dashdash@1.14.1 │ │ ├── ecc-jsbn@0.1.1 │ │ ├── getpass@0.1.6 │ │ ├── jodid25519@1.0.2 │ │ ├── jsbn@0.1.0 │ │ └── tweetnacl@0.14.3 │ ├── is-typedarray@1.0.0 │ ├── isstream@0.1.2 │ ├── json-stringify-safe@5.0.1 │ ├─┬ mime-types@2.1.13 │ │ └── mime-db@1.25.0 │ ├── oauth-sign@0.8.2 │ ├── qs@6.3.0 │ ├── stringstream@0.0.5 │ ├─┬ tough-cookie@2.3.2 │ │ └── punycode@1.4.1 │ ├── tunnel-agent@0.4.3 │ └── uuid@3.0.1 ├── rimraf@2.5.4 └── semver@5.3.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

also

vegan@vegan:~$ sudo npm install [sudo] password for vegan: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

rochejul commented 7 years ago

Example 1 try at the hand to run a standalone server and stop it

Please try instead the example 2 which is the real case of gulp-angular-protractor

Plus, fix your code because you do this:

 configObj['args'] =[];//to be able to add multiple parameters

    if (argv.suite) {
        configObj['args'].push (
            '--suite',
            argv.suite
        );
    }
    gulp
        .src([])
        .pipe(gulpProtractorAngular({
            'debug': false,
            'autoStartStopServer': true
        })).pipe(protractor(configObj))
        .on('error', function(e) {
            console.log(e);
        })
        .on('end', callback);

}

And you should do:

 var args =[];//to be able to add multiple parameters

    if (argv.suite) {
        args .push (
            '--suite',
            argv.suite
        );
    }
    gulp
        .src([])
        .pipe(gulpProtractorAngular({
           'configFile': 'protractor.conf.js', // Where you have your config object
            'debug': false,
            'autoStartStopServer': true,
            'args': args
        }))
        .on('error', function(e) {
            console.log(e);
        })
        .on('end', callback);

}

Regards

caneraydinbey commented 7 years ago

@rochejul I again got error

vegan@vegan:~/gulp-angular-protractor/examples/example-02$ gulp protractor [14:55:51] Using gulpfile ~/gulp-angular-protractor/examples/example-02/Gulpfile.js [14:55:51] Starting 'protractor'... [14:55:51] gulp-angular-protractor - The plugin is retrieved and will start soon [14:55:51] gulp-angular-protractor - We will try to start and stop automatically the WebDriver server [14:55:51] gulp-angular-protractor - The selenium address is: http://localhost:4444/wd/hub [14:55:51] gulp-angular-protractor - The selenium address used is: http://localhost:4444/wd/hub [14:55:51] gulp-angular-protractor - The selenium shutdown address used is: http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer [14:55:51] gulp-angular-protractor - We have the config file to the following path: /home/vegan/gulp-angular-protractor/examples/example-02/protractor.conf.js { TypeError: webDriver.webDriverUpdateAndStart is not a function at Stream. (/home/vegan/gulp-angular-protractor/examples/example-02/node_modules/gulp-angular-protractor/gulp-angular-protractor/gulp-stream.js:50:31) at _end (/home/vegan/gulp-angular-protractor/examples/example-02/node_modules/gulp-angular-protractor/node_modules/event-stream/node_modules/through/index.js:65:9) at Stream.stream.end (/home/vegan/gulp-angular-protractor/examples/example-02/node_modules/gulp-angular-protractor/node_modules/event-stream/node_modules/through/index.js:74:5) at DestroyableTransform.onend (/usr/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:523:10) at Object.onceWrapper (events.js:290:19) at emitNone (events.js:91:20) at DestroyableTransform.emit (events.js:185:7) at /usr/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:965:16 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'TypeError', message: 'webDriver.webDriverUpdateAndStart is not a function', stack: 'TypeError: webDriver.webDriverUpdateAndStart is not a function\n at Stream. (/home/vegan/gulp-angular-protractor/examples/example-02/node_modules/gulp-angular-protractor/gulp-angular-protractor/gulp-stream.js:50:31)\n at _end (/home/vegan/gulp-angular-protractor/examples/example-02/node_modules/gulp-angular-protractor/node_modules/event-stream/node_modules/through/index.js:65:9)\n at Stream.stream.end (/home/vegan/gulp-angular-protractor/examples/example-02/node_modules/gulp-angular-protractor/node_modules/event-stream/node_modules/through/index.js:74:5)\n at DestroyableTransform.onend (/usr/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:523:10)\n at Object.onceWrapper (events.js:290:19)\n at emitNone (events.js:91:20)\n at DestroyableTransform.emit (events.js:185:7)\n at /usr/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:965:16\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\n at process._tickCallback (internal/process/next_tick.js:98:9)', showStack: false, showProperties: true, plugin: 'gulp-angular-protractor' }

rochejul commented 7 years ago

Weird because it means we have not the expected WebDriver version

Can you zip me your example folder and attach it into the issue please ?

Thanks

caneraydinbey commented 7 years ago

@rochejul Here examples.tar.gz

rochejul commented 7 years ago

You have downloaded with 0.4.0 and an issue was found on this version: #38

Could you please download the 0.4.1 ?

Many thanks