Skip to content

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

@vinodboruah

Description

@vinodboruah

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions