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

I am trying to use protractor-retry but it is giving me the error - spawn node_modules/@angular-devkit/build-angular/src/utils/run-module-worker.js EACCES #80

Open
vinodboruah opened this issue Aug 30, 2020 · 4 comments

Comments

@vinodboruah
Copy link

I had configured the protractor-retry in protractor.conf.js as like -

**// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');
var HtmlReporter = require('protractor-beautiful-reporter');
var retry = require('protractor-retry').retry;
let dir = 'report';
var pro = require('protractor')
    /**
     * @type { import("protractor").Config }
     */
exports.config = {
    allScriptsTimeout: 300000,
    specs: [
        //  './src/prepare/workflow/wf-share/*.e2e-spec.ts',
        // './src/prepare/workflow/Workflow-Category/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-schedule/listworkflowschedules.e2e-spec.ts',
        // './src/prepare/workflow/workflow-schedule/addworkflowschedules.e2e-spec.ts',
        // './src/prepare/workflow/workflow-schedule/bulkworkflowschedules.e2e-spec.ts',
        // './src/prepare/workflow/workflow-listing/running-wf-listing.e2e-spec.ts',
        // './src/govern/data-quality-functions/rule-list.e2e-spec.ts',
        // './src/govern/rulesets/ruleset-listing/*.e2e-spec.ts'
        // './src/govern/rulesets/create-edit-ruleset/*.e2e-spec.ts',
        // './src/govern/rules/rule-list.e2e-spec.ts'
        // './src/prepare/workflow/workflow-actions/avro-entity-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/catalog-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/cdc-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/customjava-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/DBImport-Action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/decision-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/deleteEntity-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/email-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/eml-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/entityLevelDataQuality-action/*.e2e-spec.ts',
        // './src/prepare/workflow/workflow-actions/fileMove-Action/*.e2e-spec.ts',
        './src/prepare/workflow/workflow-actions/file-watch-action/*.e2e-spec.ts'
        
    ],
    capabilities: {
        'browserName': 'chrome',
        Build: 'protractor-retry-'+process.env.TRAVIS_BRANCH +'-'+process.env.TRAVIS_BUILD_NUMBER,
        name: process.env.TRAVIS_BRANCH +'-'+process.env.TRAVIS_BUILD_NUMBER,
        'chromeOptions': {
            'args': ['--disable-browser-side-navigation']
        },
        // allows different specs to run in parallel.
        // If this is set to be true, specs will be sharded by file
        // (i.e. all files to be run by this set of capabilities will run in parallel).
        // Default is false.
        shardTestFiles: true,

        // Maximum number of browser instances that can run in parallel for this
        // set of capabilities. This is only needed if shardTestFiles is true.
        // Default is 1.
        maxInstances: 3
    },
    onCleanUp: function (results,files) {
        retry.onCleanUp(results,files);
    },
    random: false,
    directConnect: true,
    baseUrl: 'http://localhost:4200/',
    framework: 'jasmine',
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 500000,
        print: function() {}
    },




    
    onPrepare: function() {
        retry.onPrepare();
        require('ts-node').register({
            project: require('path').join(__dirname, './tsconfig.json')
        });
        pro.browser.manage().window().maximize();
        jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
        var AllureReporter = require('jasmine-allure-reporter');
        // @ts-ignore
        jasmine.getEnv().addReporter(new AllureReporter({
            resultsDir: 'allure-results'
        }));
    },
    afterLaunch: function() {
        return retry.afterLaunch(3);
    }
}** 

I tried executing my protractor test in centos node by command ng e2e and when it tries to execute the failed spec it throws below error
Re-running tests , attempt : 1
Re-running the following test files : /home/vinod/zdp/core/zdp-ui/e2e/src/prepare/workflow/Workflow-Category/listcategory.e2e-spec.ts

[17:08:50] E/launcher - spawn node_modules/@angular-devkit/build-angular/src/utils/run-module-worker.js EACCES
[17:08:50] E/launcher - Error: spawn node_modules/@angular-devkit/build-angular/src/utils/run-module-worker.js EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

@vinodboruah vinodboruah changed the title I am trying to use protractor-retry but it is giving me the error - I am trying to use protractor-retry but it is giving me the error - spawn node_modules/@angular-devkit/build-angular/src/utils/run-module-worker.js EACCES Sep 1, 2020
@dreuxl
Copy link
Contributor

dreuxl commented Sep 4, 2020

Hi @vinodboruah , did u try removing the "files" param from you cleanup function?

onCleanUp: function (results,files) {
        retry.onCleanUp(results,files);
    }

@vinodboruah
Copy link
Author

@dreuxl yes I tried with -
onCleanUp: function (results) {
retry.onCleanUp(results);
}
but then also it fails to execute successfully

@subashhshrestha
Copy link

I am facing a similar problem. Is there any progress on it?
Environment: Ubuntu

@kmanikandanmca2008
Copy link

+1 Facing same issue with angular v11
Any help is appreciated.

retry

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

4 participants