SAP / jenkins-library

Jenkins shared library for Continuous Delivery pipelines.
https://www.project-piper.io
Apache License 2.0
778 stars 586 forks source link

karmaExecuteTests: QUnit is not defined #1957

Closed Nico31300 closed 2 years ago

Nico31300 commented 4 years ago

Hello,

I'm trying to implement project piper and more specifically the step karmaExecuteTests.

I installed a jenkins on a linux server with the docker:

docker run -it --rm -p 8079:80 -u $(id -u):$(id -g) -v "${PWD}":/cx-server/mount/ ppiper/cx-server-companion:latest init-cx-server
chmod +x ./cx-server
./cx-server start

Jenkinsfile

@Library('piper-lib-os') _
node() {
    stage('prepare') {
        checkout scm
        setupCommonPipelineEnvironment script:this
    }

    stage('Test')   {
      karmaExecuteTests script: this,
                    installCommand: "npm config set strict-ssl false && npm config set @sap:registry https://npm.sap.com && npm install --quiet"
    }
}

I think i missed something .... but i cannot find what :(

karma.conf.js

module.exports = function (config) {

  config.set({
    frameworks: ['ui5'],

    ui5: {
      url: "https://sapui5.hana.ondemand.com"
    },

    // level of logging
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
    logLevel: config.LOG_DEBUG,

    customLaunchers: {
        'chromeSel': {
            base: 'WebDriver',
            config: { hostname: 'selenium', port: 4444 },
            browserName: 'chrome'
        }
    },

    hostname: 'karma',
    port: 9876,

    // start these browsers
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
    browsers: ['chromeSel'],

    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: true

  })
}

package.json

{
    "name": "com.devops.test",
    "version": "2.0.0",
    "description": "Project description",
    "devDependencies": {
        "karma-chrome-launcher" : "latest",
        "karma-webdriver-launcher" : "latest",
        "karma-ui5" : "latest",
        "karma": "^5.1.1"
    },
    "scripts": {
        "karma": "karma start"
    }
}

When i execute the step, i got the following error: QUnit is not defined

Do you have an idea of my mistake ?

Logs:

``` [Pipeline] withDockerContainer Jenkins seems to be running inside container 0ebc5c817a1bc3886f5c4f8ce53c88bbee417ef92110cec6aa85c0a47cce1f44 $ docker run -t -d -u 1000:986 --env NO_PROXY=localhost,selenium,$NO_PROXY --env no_proxy=localhost,selenium,$no_proxy --env PIPER_SELENIUM_HOSTNAME=karma --env PIPER_SELENIUM_WEBDRIVER_HOSTNAME=selenium --env PIPER_SELENIUM_WEBDRIVER_PORT=4444 --env http_proxy --env https_proxy --env HTTP_PROXY --env HTTPS_PROXY --network-alias karma --network sidecar-4fa7bff8-3876-470a-ba8d-c4c8c03ffe94 -w /var/jenkins_home/workspace/devops_new_master --volumes-from 0ebc5c817a1bc3886f5c4f8ce53c88bbee417ef92110cec6aa85c0a47cce1f44 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** node:lts-stretch cat $ docker top 1d7231b3ef9ba119d669e44e30b848e40d11f4f092b0bc6f091b6117e17aa900 -eo pid,comm [Pipeline] { [Pipeline] echo [INFO][dockerExecute] Running with sidecar container. [Pipeline] sh + node --version v12.18.3 + npm --version 6.14.6 [Pipeline] echo Unstash content: buildDescriptor [Pipeline] unstash [Pipeline] echo Unstash failed: buildDescriptor (No such saved stash ‘buildDescriptor’) [Pipeline] echo Unstash content: tests [Pipeline] unstash [Pipeline] echo Unstash failed: tests (No such saved stash ‘tests’) [Pipeline] sh + cd . + npm config set strict-ssl false + npm config set @sap:registry https://npm.sap.com + npm install --quiet npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN com.devops.test@2.0.0 No repository field. npm WARN com.devops.test@2.0.0 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/@ui5/cli/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) audited 1340 packages in 106.109s 1 package is looking for funding run `npm fund` for details found 0 vulnerabilities [Pipeline] sh + cd . + npm run karma > com.devops.test@2.0.0 karma /var/jenkins_home/workspace/devops_new_master > karma start 24 08 2020 10:08:06.977:DEBUG [config]: Loading config /var/jenkins_home/workspace/devops_new_master/karma.conf.js 24 08 2020 10:08:06.980:DEBUG [config]: autoWatch set to false, because of singleRun 24 08 2020 10:08:06.981:DEBUG [karma-server]: Final config Config { LOG_DISABLE: 'OFF', LOG_ERROR: 'ERROR', LOG_WARN: 'WARN', LOG_INFO: 'INFO', LOG_DEBUG: 'DEBUG', frameworks: [ 'ui5' ], protocol: 'http:', port: 9876, listenAddress: '0.0.0.0', hostname: 'karma', httpsServerConfig: {}, basePath: '/var/jenkins_home/workspace/devops_new_master', files: [], browserConsoleLogOptions: { level: 'debug', format: '%b %T: %m', terminal: true }, customContextFile: null, customDebugFile: null, customClientContextFile: null, exclude: [ '/var/jenkins_home/workspace/devops_new_master/karma.conf.js' ], logLevel: 'DEBUG', colors: true, autoWatch: false, autoWatchBatchDelay: 250, restartOnFileChange: false, usePolling: true, reporters: [ 'progress' ], singleRun: true, browsers: [ 'chromeSel' ], captureTimeout: 60000, pingTimeout: 5000, proxies: {}, proxyValidateSSL: true, preprocessors: [Object: null prototype] {}, preprocessor_priority: {}, urlRoot: '/', upstreamProxy: undefined, reportSlowerThan: 0, loggers: [ { type: 'console', layout: { type: 'pattern', pattern: '%[%d{DATE}:%p [%c]: %]%m' } } ], transports: [ 'polling', 'websocket' ], forceJSONP: false, plugins: [ 'karma-*', [Object: null prototype] { 'launcher:chromeSel': [ 'factory', [Function] ] } ], client: { args: [], useIframe: true, runInParent: false, captureConsole: true, clearContext: true }, defaultClient: { args: [], useIframe: true, runInParent: false, captureConsole: true, clearContext: true }, browserDisconnectTimeout: 2000, browserDisconnectTolerance: 0, browserNoActivityTimeout: 30000, processKillTimeout: 2000, concurrency: Infinity, failOnEmptyTestSuite: true, retryLimit: 2, detached: false, crossOriginAttribute: true, browserSocketTimeout: 20000, cmd: 'start', configFile: '/var/jenkins_home/workspace/devops_new_master/karma.conf.js', ui5: { url: 'https://sapui5.hana.ondemand.com' }, customLaunchers: { chromeSel: { base: 'WebDriver', config: { hostname: 'selenium', port: 4444 }, browserName: 'chrome' } } } 24 08 2020 10:08:06.982:DEBUG [plugin]: Loading karma-* from /var/jenkins_home/workspace/devops_new_master/node_modules 24 08 2020 10:08:06.983:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-chrome-launcher. 24 08 2020 10:08:06.989:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-coverage. 24 08 2020 10:08:07.180:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-junit-reporter. 24 08 2020 10:08:07.194:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-qunit. 24 08 2020 10:08:07.195:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5. 24 08 2020 10:08:07.420:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-webdriver-launcher. 24 08 2020 10:08:07.531:DEBUG [plugin]: Loading inlined plugin (defining launcher:chromeSel). 24 08 2020 10:08:07.540:DEBUG [web-server]: Instantiating middleware 24 08 2020 10:08:07.594:INFO [karma-server]: Karma v5.1.1 server started at http://karma:9876/ 24 08 2020 10:08:07.594:INFO [launcher]: Launching browsers chromeSel with concurrency unlimited 24 08 2020 10:08:07.601:INFO [launcher]: Starting browser chrome via Remote WebDriver 24 08 2020 10:08:07.601:DEBUG [launcher]: null -> BEING_CAPTURED 24 08 2020 10:08:07.602:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-8540939 24 08 2020 10:08:07.603:DEBUG [WebDriver]: WebDriver config: {"hostname":"selenium","port":4444} 24 08 2020 10:08:07.603:DEBUG [WebDriver]: Browser capabilities: {"platform":"ANY","testName":"Karma test","tags":[],"version":"","base":"WebDriver","browserName":"chrome"} 24 08 2020 10:08:08.490:DEBUG [WebDriver]: Session ID: 7cf575afcf21a3803eb34e4ead567beb 24 08 2020 10:08:08.521:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/client.html 24 08 2020 10:08:08.548:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/karma.js 24 08 2020 10:08:08.608:DEBUG [karma-server]: A browser has connected on socket NtLLOXqwJmJ8zJEMAAAA 24 08 2020 10:08:08.613:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=NtLLOXqwJmJ8zJEMAAAA 24 08 2020 10:08:08.628:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: undefined -> CONNECTED 24 08 2020 10:08:08.628:INFO [Chrome 84.0.4147.105 (Linux x86_64)]: Connected on socket NtLLOXqwJmJ8zJEMAAAA with id 8540939 24 08 2020 10:08:08.629:DEBUG [launcher]: BEING_CAPTURED -> CAPTURED 24 08 2020 10:08:08.629:DEBUG [launcher]: chrome via Remote WebDriver (id 8540939) captured in 1.034 secs 24 08 2020 10:08:08.630:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: CONNECTED -> CONFIGURING 24 08 2020 10:08:08.637:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/favicon.ico 24 08 2020 10:08:08.642:DEBUG [middleware:karma]: custom files null null null 24 08 2020 10:08:08.642:DEBUG [middleware:karma]: Serving static request /context.html 24 08 2020 10:08:08.643:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/context.html 24 08 2020 10:08:08.655:DEBUG [middleware:source-files]: Requesting /base/node_modules/karma-ui5/dist/browser-bundle.js?9782f34985d6e25e47acb897b972985465a0852f 24 08 2020 10:08:08.655:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5/dist/browser-bundle.js 24 08 2020 10:08:08.655:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5/dist/browser-bundle.js 24 08 2020 10:08:08.657:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/context.js 24 08 2020 10:08:08.684:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.html 24 08 2020 10:08:08.684:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 24 08 2020 10:08:08.684:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 24 08 2020 10:08:08.694:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.html 24 08 2020 10:08:08.694:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 24 08 2020 10:08:08.694:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 24 08 2020 10:08:08.704:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/qunit/qunit-redirect.js 24 08 2020 10:08:08.705:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/qunit/qunit-redirect.js 24 08 2020 10:08:08.723:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.js 24 08 2020 10:08:08.723:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.js 24 08 2020 10:08:08.723:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 24 08 2020 10:08:08.806:DEBUG [middleware:source-files]: Requesting /base/webapp/test/unit/unitTests.qunit.html 24 08 2020 10:08:08.806:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.html 24 08 2020 10:08:08.806:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.html 24 08 2020 10:08:08.820:DEBUG [middleware:source-files]: Requesting /base/resources/sap-ui-core.js 24 08 2020 10:08:08.820:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap-ui-core.js 24 08 2020 10:08:08.825:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/thirdparty/qunit-2.css 24 08 2020 10:08:08.825:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/thirdparty/qunit-2.css 24 08 2020 10:08:08.828:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/thirdparty/qunit-2.js 24 08 2020 10:08:08.828:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/thirdparty/qunit-2.js 24 08 2020 10:08:08.832:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/qunit/qunit-junit.js 24 08 2020 10:08:08.832:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/qunit/qunit-junit.js 24 08 2020 10:08:08.833:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/qunit/qunit-coverage.js 24 08 2020 10:08:08.833:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/qunit/qunit-coverage.js 24 08 2020 10:08:08.835:DEBUG [middleware:source-files]: Requesting /base/webapp/test/unit/unitTests.qunit.js 24 08 2020 10:08:08.835:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.js 24 08 2020 10:08:08.835:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Chrome 84.0.4147.105 (Linux x86_64) ERROR Uncaught ReferenceError: QUnit is not defined at webapp/test/unit/unitTests.qunit.js:2:1 ReferenceError: QUnit is not defined at webapp/test/unit/unitTests.qunit.js:2:1 24 08 2020 10:08:08.879:DEBUG [middleware:source-files]: Requesting /base/webapp/test/integration/opaTests.qunit.html 24 08 2020 10:08:08.880:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/integration/opaTests.qunit.html 24 08 2020 10:08:08.880:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/integration/opaTests.qunit.html 24 08 2020 10:08:08.882:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: CONFIGURING -> CONNECTED 24 08 2020 10:08:08.884:DEBUG [launcher]: CAPTURED -> BEING_KILLED 24 08 2020 10:08:08.885:DEBUG [launcher]: BEING_KILLED -> BEING_FORCE_KILLED 24 08 2020 10:08:08.885:DEBUG [karma-server]: Run complete, exiting. 24 08 2020 10:08:08.885:DEBUG [launcher]: Disconnecting all browsers 24 08 2020 10:08:08.885:DEBUG [launcher]: BEING_FORCE_KILLED -> BEING_FORCE_KILLED 24 08 2020 10:08:08.886:DEBUG [proxy]: Destroying proxy agents 24 08 2020 10:08:08.888:DEBUG [middleware:source-files]: Requesting /base/resources/sap-ui-core.js 24 08 2020 10:08:08.889:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap-ui-core.js 24 08 2020 10:08:08.890:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/thirdparty/qunit-2.css 24 08 2020 10:08:08.890:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/thirdparty/qunit-2.css 24 08 2020 10:08:08.891:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/thirdparty/qunit-2.js 24 08 2020 10:08:08.892:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/thirdparty/qunit-2.js 24 08 2020 10:08:08.893:DEBUG [middleware:source-files]: Requesting /base/resources/sap/ui/qunit/qunit-junit.js 24 08 2020 10:08:08.893:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/resources/sap/ui/qunit/qunit-junit.js 24 08 2020 10:08:08.894:DEBUG [middleware:source-files]: Requesting /base/webapp/test/integration/opaTests.qunit.js 24 08 2020 10:08:08.894:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/integration/opaTests.qunit.js 24 08 2020 10:08:08.894:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/integration/opaTests.qunit.js Error: socket hang up at connResetException (internal/errors.js:610:14) at TLSSocket.socketCloseListener (_http_client.js:400:25) at TLSSocket.emit (events.js:327:22) at net.js:674:12 at TCP.done (_tls_wrap.js:567:7) Error: socket hang up at connResetException (internal/errors.js:610:14) at TLSSocket.socketCloseListener (_http_client.js:400:25) at TLSSocket.emit (events.js:327:22) at net.js:674:12 at TCP.done (_tls_wrap.js:567:7) Error: socket hang up at connResetException (internal/errors.js:610:14) at TLSSocket.socketCloseListener (_http_client.js:400:25) at TLSSocket.emit (events.js:327:22) at net.js:674:12 at TCP.done (_tls_wrap.js:567:7) Error: socket hang up at connResetException (internal/errors.js:610:14) at TLSSocket.socketCloseListener (_http_client.js:400:25) at TLSSocket.emit (events.js:327:22) at net.js:674:12 at TCP.done (_tls_wrap.js:567:7) 24 08 2020 10:08:08.955:INFO [WebDriver]: Killed Karma test. 24 08 2020 10:08:08.956:DEBUG [launcher]: Process chrome via Remote WebDriver exited with code 0 and signal null 24 08 2020 10:08:08.957:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-8540939 24 08 2020 10:08:08.961:DEBUG [launcher]: Finished all browsers 24 08 2020 10:08:08.962:DEBUG [launcher]: BEING_FORCE_KILLED -> FINISHED 24 08 2020 10:08:08.962:DEBUG [launcher]: FINISHED -> FINISHED npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! com.devops.test@2.0.0 karma: `karma start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the com.devops.test@2.0.0 karma script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. ```

Thank you very much

CCFenner commented 4 years ago

Karma

Please make sure your tests run with Karma also locally, debugging is much easier here. QUnit is not defined could indicate that QUnit and Karma is not loaded in the correct order.

@mlenkeit are you familiar with this issue?

NPM settings

I would suggest to move the NPM settings to a .npmrc file in your repository.

npm config set strict-ssl false && npm config set @sap:registry https://npm.sap.com
Nico31300 commented 4 years ago

Hello,

Thank you for your answers

NPM settings I would suggest to move the NPM settings to a .npmrc file in your repository.

Thank you i did that

Please make sure your tests run with Karma also locally

I try to run it locally and on the beginning it was not working due to ../../../resources/sap/ui/thirdparty/qunit-2.js instead of ../../resources/sap/ui/thirdparty/qunit-2.js. Now it's working locally, and i only have the issue with project piper.

Do you see something wrong in my file karma.conf.js ?

module.exports = function (config) {

  config.set({
    frameworks: ['ui5'],    
    //UI5 framework
    ui5: {
      url: "https://openui5.hana.ondemand.com"
    },
    // level of logging
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
    logLevel: config.LOG_DEBUG,

    customLaunchers: {
        'chromeSel': {
            base: 'WebDriver',
            config: { hostname: 'selenium', port: 4444 },
            browserName: 'chrome'
        }
    },

    hostname: 'karma',
    port: 9876,

    // start these browsers
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
    browsers: ['chromeSel'],

    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: true
  })
}
Nico31300 commented 4 years ago

My UI5 sample project if you want to check https://github.com/Nico31300/devops

Nico31300 commented 4 years ago

For your information i work behind a proxy, i have just done a test on my personal computer and all works fine. It should be a proxy issue so... i will check what i can do for that.

CCFenner commented 4 years ago

The test run also for me locally:

Shell

./node_modules/.bin/karma start --browsers Chrome --hostname localhost

Also with a Docker-Compose mock for the pipeline setup it runs successful:

docker-compose.yml

version: '3'
services:
  selenium:
    image: selenium/standalone-chrome
    ports:
      - "4444:4444"
  karma:
    image: node:12-stretch
    depends_on:
      - selenium
    user: node
    working_dir: /home/node/app
    volumes:
      - .:/home/node/app
    command:
      - /bin/sh
      - -c
      - |
          /usr/local/bin/npm install
          /usr/local/bin/npm run karma

Shell

docker-compose up --abort-on-container-exit

The docker-compose is executing the tests the same way as the Jenkins does.

What is the exact issue now?

CCFenner commented 4 years ago

The HTTP*_PROXY env vars are propagated to the Docker containers, so if the slave is setup correct, that should be fine.

$ docker run -t -d -u 1000:986 --env NO_PROXY=localhost,selenium,$NO_PROXY --env no_proxy=localhost,selenium,$no_proxy --env PIPER_SELENIUM_HOSTNAME=karma --env PIPER_SELENIUM_WEBDRIVER_HOSTNAME=selenium --env PIPER_SELENIUM_WEBDRIVER_PORT=4444 --env http_proxy --env https_proxy --env HTTP_PROXY --env HTTPS_PROXY --network-alias karma --network sidecar-4fa7bff8-3876-470a-ba8d-c4c8c03ffe94 -w /var/jenkins_home/workspace/devops_new_master --volumes-from 0ebc5c817a1bc3886f5c4f8ce53c88bbee417ef92110cec6aa85c0a47cce1f44 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** node:lts-stretch cat

Nico31300 commented 4 years ago

The exact issue is now:

Logs:

``` Started by user admin Rebuilds build #110 > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to https://github.com/Nico31300/devops > git config remote.origin.url https://github.com/Nico31300/devops # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 > git config --get remote.origin.url # timeout=10 using GIT_ASKPASS to set credentials Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10 Seen branch in repository origin/master Seen 1 remote branch Obtained Jenkinsfile from 0e4627b380d5d326e1d61a5210f0b52ec75cc9da Running in Durability level: MAX_SURVIVABILITY Loading library piper-lib-os@master Attempting to resolve master from remote references... > git --version # timeout=10 Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git ls-remote -h -- https://github.com/SAP/jenkins-library.git # timeout=10 Found match: refs/heads/master revision 8169d56ef76e0385b2edd7fb85463aa8d32b21cf No credentials specified > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/SAP/jenkins-library.git # timeout=10 Fetching without tags Fetching upstream changes from https://github.com/SAP/jenkins-library.git > git --version # timeout=10 Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git fetch --no-tags --force --progress -- https://github.com/SAP/jenkins-library.git +refs/heads/*:refs/remotes/origin/* # timeout=10 Checking out Revision 8169d56ef76e0385b2edd7fb85463aa8d32b21cf (master) > git config core.sparsecheckout # timeout=10 > git checkout -f 8169d56ef76e0385b2edd7fb85463aa8d32b21cf # timeout=10 Commit message: "Groovy: Load step defaults also from stages section in defaults (#1943)" > git rev-list --no-walk 8169d56ef76e0385b2edd7fb85463aa8d32b21cf # timeout=10 [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in /var/jenkins_home/workspace/devops_new_master [Pipeline] { [Pipeline] stage [Pipeline] { (prepare) [Pipeline] checkout using credential nico github > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/Nico31300/devops # timeout=10 Fetching without tags Fetching upstream changes from https://github.com/Nico31300/devops > git --version # timeout=10 using GIT_ASKPASS to set credentials Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git fetch --no-tags --force --progress -- https://github.com/Nico31300/devops +refs/heads/*:refs/remotes/origin/* # timeout=10 Checking out Revision 0e4627b380d5d326e1d61a5210f0b52ec75cc9da (master) > git config core.sparsecheckout # timeout=10 > git checkout -f 0e4627b380d5d326e1d61a5210f0b52ec75cc9da # timeout=10 Commit message: "Update package.json" > git rev-list --no-walk 1432e261809b5e4651606bdff8f725b000983045 # timeout=10 [Pipeline] libraryResource [Pipeline] readYaml [Pipeline] echo --- Begin library step of: setupCommonPipelineEnvironment --- [Pipeline] fileExists [Pipeline] readYaml [Pipeline] libraryResource [Pipeline] writeFile [Pipeline] echo --- Begin library step of: piperLoadGlobalExtensions --- [Pipeline] echo --- End library step of: piperLoadGlobalExtensions --- [Pipeline] stash Stashed 5 file(s) [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [setupCommonPipelineEnvironment] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] echo --- End library step of: setupCommonPipelineEnvironment --- [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Test) [Pipeline] echo --- Begin library step of: karmaExecuteTests --- [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [karmaExecuteTests] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] echo --- Begin library step of: seleniumExecuteTests --- [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [seleniumExecuteTests] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] echo --- Begin library step of: dockerExecute --- [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [dockerExecute] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] sh + docker ps -q [Pipeline] isUnix [Pipeline] sh + docker pull node:lts-stretch lts-stretch: Pulling from library/node Digest: sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090 Status: Image is up to date for node:lts-stretch docker.io/library/node:lts-stretch [Pipeline] sh + docker network create sidecar-11012af4-693e-4632-862d-9f415e49da55 ab9ccec431463fe241015d9d29cce253a133eba97d1c906a54c7728aedaa55d8 [Pipeline] isUnix [Pipeline] sh + docker pull selenium/standalone-chrome Using default tag: latest latest: Pulling from selenium/standalone-chrome Digest: sha256:19ede8d919f1e3bd9c8e13c0cd7e399e04506def2ba0a667886756238b9688ab Status: Image is up to date for selenium/standalone-chrome:latest docker.io/selenium/standalone-chrome:latest [Pipeline] isUnix [Pipeline] sh + docker run -d --env NO_PROXY=localhost,karma,localhost,.corp,gheprivate.intra.corp,cx-nexus --env no_proxy=localhost,karma, --env http_proxy --env https_proxy --env HTTP_PROXY --env HTTPS_PROXY --volume /dev/shm:/dev/shm --network-alias selenium --network sidecar-11012af4-693e-4632-862d-9f415e49da55 selenium/standalone-chrome [Pipeline] isUnix [Pipeline] sh + docker inspect -f . node:lts-stretch . [Pipeline] withDockerContainer Jenkins seems to be running inside container 0ebc5c817a1bc3886f5c4f8ce53c88bbee417ef92110cec6aa85c0a47cce1f44 $ docker run -t -d -u 1000:986 --env NO_PROXY=localhost,selenium,$NO_PROXY --env no_proxy=localhost,selenium,$no_proxy --env PIPER_SELENIUM_HOSTNAME=karma --env PIPER_SELENIUM_WEBDRIVER_HOSTNAME=selenium --env PIPER_SELENIUM_WEBDRIVER_PORT=4444 --env http_proxy --env https_proxy --env HTTP_PROXY --env HTTPS_PROXY --network-alias karma --network sidecar-11012af4-693e-4632-862d-9f415e49da55 -w /var/jenkins_home/workspace/devops_new_master --volumes-from 0ebc5c817a1bc3886f5c4f8ce53c88bbee417ef92110cec6aa85c0a47cce1f44 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** node:lts-stretch cat $ docker top 5e7489d48ba162acf6edb33739d8eac4577ece1bfcfd75253382cb00f7bdc13c -eo pid,comm [Pipeline] { [Pipeline] echo [INFO][dockerExecute] Running with sidecar container. [Pipeline] sh + node --version v12.18.3 + npm --version 6.14.6 [Pipeline] echo Unstash content: buildDescriptor [Pipeline] unstash [Pipeline] echo Unstash failed: buildDescriptor (No such saved stash ‘buildDescriptor’) [Pipeline] echo Unstash content: tests [Pipeline] unstash [Pipeline] echo Unstash failed: tests (No such saved stash ‘tests’) [Pipeline] sh + cd . + npm install --quiet npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN ajv-errors@1.0.1 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN com.devops.test@2.0.0 No repository field. npm WARN com.devops.test@2.0.0 No license field. added 2 packages from 43 contributors, updated 1 package and audited 681 packages in 54.697s 2 packages are looking for funding run `npm fund` for details found 12 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details [Pipeline] sh + cd . + npm run karma > com.devops.test@2.0.0 karma /var/jenkins_home/workspace/devops_new_master > karma start 26 08 2020 14:34:40.785:DEBUG [config]: Loading config /var/jenkins_home/workspace/devops_new_master/karma.conf.js 26 08 2020 14:34:40.788:DEBUG [config]: autoWatch set to false, because of singleRun 26 08 2020 14:34:40.789:DEBUG [karma-server]: Final config Config { LOG_DISABLE: 'OFF', LOG_ERROR: 'ERROR', LOG_WARN: 'WARN', LOG_INFO: 'INFO', LOG_DEBUG: 'DEBUG', frameworks: [ 'ui5' ], protocol: 'http:', port: 9876, listenAddress: '0.0.0.0', hostname: 'karma', httpsServerConfig: {}, basePath: '/var/jenkins_home/workspace/devops_new_master', files: [], browserConsoleLogOptions: { level: 'debug', format: '%b %T: %m', terminal: true }, customContextFile: null, customDebugFile: null, customClientContextFile: null, exclude: [ '/var/jenkins_home/workspace/devops_new_master/karma.conf.js' ], logLevel: 'DEBUG', colors: true, autoWatch: false, autoWatchBatchDelay: 250, restartOnFileChange: false, usePolling: true, reporters: [ 'junit' ], singleRun: true, browsers: [ 'chromeSel' ], captureTimeout: 60000, pingTimeout: 5000, proxies: {}, proxyValidateSSL: true, preprocessors: [Object: null prototype] {}, preprocessor_priority: {}, urlRoot: '/', upstreamProxy: undefined, reportSlowerThan: 0, loggers: [ { type: 'console', layout: { type: 'pattern', pattern: '%[%d{DATE}:%p [%c]: %]%m' } } ], transports: [ 'polling', 'websocket' ], forceJSONP: false, plugins: [ 'karma-*', [Object: null prototype] { 'launcher:chromeSel': [ 'factory', [Function] ] } ], client: { args: [], useIframe: true, runInParent: false, captureConsole: true, clearContext: true }, defaultClient: { args: [], useIframe: true, runInParent: false, captureConsole: true, clearContext: true }, browserDisconnectTimeout: 2000, browserDisconnectTolerance: 0, browserNoActivityTimeout: 30000, processKillTimeout: 2000, concurrency: Infinity, failOnEmptyTestSuite: true, retryLimit: 2, detached: false, crossOriginAttribute: true, browserSocketTimeout: 20000, cmd: 'start', configFile: '/var/jenkins_home/workspace/devops_new_master/karma.conf.js', ui5: { url: 'https://openui5.hana.ondemand.com' }, customLaunchers: { chromeSel: { base: 'WebDriver', config: { hostname: 'selenium', port: 4444 }, browserName: 'chrome' } }, junitReporter: { outputFile: 'test-results-karma.xml', suite: '' } } 26 08 2020 14:34:40.789:DEBUG [plugin]: Loading karma-* from /var/jenkins_home/workspace/devops_new_master/node_modules 26 08 2020 14:34:40.790:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-chrome-launcher. 26 08 2020 14:34:40.796:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-junit-reporter. 26 08 2020 14:34:40.810:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5. 26 08 2020 14:34:41.075:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-webdriver-launcher. 26 08 2020 14:34:41.192:DEBUG [plugin]: Loading inlined plugin (defining launcher:chromeSel). 26 08 2020 14:34:41.200:DEBUG [web-server]: Instantiating middleware 26 08 2020 14:34:41.201:DEBUG [reporter]: Trying to load reporter: junit 26 08 2020 14:34:41.201:DEBUG [reporter]: Trying to load color-version of reporter: junit (junit_color) 26 08 2020 14:34:41.202:DEBUG [reporter]: Couldn't load color-version. 26 08 2020 14:34:41.233:INFO [karma-server]: Karma v5.1.1 server started at http://karma:9876/ 26 08 2020 14:34:41.233:INFO [launcher]: Launching browsers chromeSel with concurrency unlimited 26 08 2020 14:34:41.238:INFO [launcher]: Starting browser chrome via Remote WebDriver 26 08 2020 14:34:41.238:DEBUG [launcher]: null -> BEING_CAPTURED 26 08 2020 14:34:41.238:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-38869107 26 08 2020 14:34:41.239:DEBUG [WebDriver]: WebDriver config: {"hostname":"selenium","port":4444} 26 08 2020 14:34:41.239:DEBUG [WebDriver]: Browser capabilities: {"platform":"ANY","testName":"Karma test","tags":[],"version":"","base":"WebDriver","browserName":"chrome"} 26 08 2020 14:34:42.128:DEBUG [WebDriver]: Session ID: 46e6a17cd2e8b3ebee2114b36270d1ee 26 08 2020 14:34:42.158:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/client.html 26 08 2020 14:34:42.182:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/karma.js 26 08 2020 14:34:42.237:DEBUG [karma-server]: A browser has connected on socket DE1qeGUpTxRWxXtrAAAA 26 08 2020 14:34:42.240:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/favicon.ico 26 08 2020 14:34:42.258:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: undefined -> CONNECTED 26 08 2020 14:34:42.258:INFO [Chrome 84.0.4147.105 (Linux x86_64)]: Connected on socket DE1qeGUpTxRWxXtrAAAA with id 38869107 26 08 2020 14:34:42.259:DEBUG [launcher]: BEING_CAPTURED -> CAPTURED 26 08 2020 14:34:42.259:DEBUG [launcher]: chrome via Remote WebDriver (id 38869107) captured in 1.025 secs 26 08 2020 14:34:42.260:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: CONNECTED -> CONFIGURING 26 08 2020 14:34:42.261:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=DE1qeGUpTxRWxXtrAAAA 26 08 2020 14:34:42.275:DEBUG [middleware:karma]: custom files null null null 26 08 2020 14:34:42.275:DEBUG [middleware:karma]: Serving static request /context.html 26 08 2020 14:34:42.275:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/context.html 26 08 2020 14:34:42.291:DEBUG [middleware:source-files]: Requesting /base/node_modules/karma-ui5/dist/browser-bundle.js?5a933fbe8988b09de858701008541db22d7c63ba 26 08 2020 14:34:42.291:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5/dist/browser-bundle.js 26 08 2020 14:34:42.292:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5/dist/browser-bundle.js 26 08 2020 14:34:42.293:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/context.js 26 08 2020 14:34:42.325:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.html 26 08 2020 14:34:42.326:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:34:42.326:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:34:42.336:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.html 26 08 2020 14:34:42.336:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:34:42.337:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:34:42.348:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-redirect.js 26 08 2020 14:34:42.348:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-redirect.js 26 08 2020 14:34:42.367:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.js 26 08 2020 14:34:42.367:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.js 26 08 2020 14:34:42.368:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:34:42.447:DEBUG [middleware:source-files]: Requesting /base/webapp/test/unit/unitTests.qunit.html 26 08 2020 14:34:42.447:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.html 26 08 2020 14:34:42.447:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.html 26 08 2020 14:34:42.465:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap-ui-core.js 26 08 2020 14:34:42.465:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap-ui-core.js 26 08 2020 14:34:42.469:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/thirdparty/qunit-2.css 26 08 2020 14:34:42.470:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/thirdparty/qunit-2.css 26 08 2020 14:34:42.473:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/thirdparty/qunit-2.js 26 08 2020 14:34:42.473:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/thirdparty/qunit-2.js 26 08 2020 14:34:42.476:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-junit.js 26 08 2020 14:34:42.476:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-junit.js 26 08 2020 14:34:42.478:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-coverage.js 26 08 2020 14:34:42.478:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-coverage.js 26 08 2020 14:34:42.479:DEBUG [middleware:source-files]: Requesting /base/webapp/test/unit/unitTests.qunit.js 26 08 2020 14:34:42.479:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.js 26 08 2020 14:34:42.479:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:34:42.515:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-junit.js 26 08 2020 14:34:42.515:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-junit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:34:42.552:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-coverage.js 26 08 2020 14:34:42.552:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-coverage.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:34:42.596:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: CONFIGURING -> CONNECTED 26 08 2020 14:34:42.598:DEBUG [launcher]: CAPTURED -> BEING_KILLED 26 08 2020 14:34:42.598:DEBUG [launcher]: BEING_KILLED -> BEING_FORCE_KILLED 26 08 2020 14:34:42.598:DEBUG [karma-server]: Run complete, exiting. 26 08 2020 14:34:42.598:DEBUG [launcher]: Disconnecting all browsers 26 08 2020 14:34:42.599:DEBUG [launcher]: BEING_FORCE_KILLED -> BEING_FORCE_KILLED 26 08 2020 14:34:42.599:DEBUG [proxy]: Destroying proxy agents 26 08 2020 14:34:42.662:INFO [WebDriver]: Killed Karma test. 26 08 2020 14:34:42.663:DEBUG [launcher]: Process chrome via Remote WebDriver exited with code 0 and signal null 26 08 2020 14:34:42.663:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-38869107 26 08 2020 14:34:42.668:DEBUG [launcher]: Finished all browsers 26 08 2020 14:34:42.668:DEBUG [launcher]: BEING_FORCE_KILLED -> FINISHED 26 08 2020 14:34:42.669:DEBUG [launcher]: FINISHED -> FINISHED npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! com.devops.test@2.0.0 karma: `karma start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the com.devops.test@2.0.0 karma script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/node/.npm/_logs/2020-08-26T14_34_42_689Z-debug.log [Pipeline] error [Pipeline] } $ docker stop --time=1 5e7489d48ba162acf6edb33739d8eac4577ece1bfcfd75253382cb00f7bdc13c $ docker rm -f 5e7489d48ba162acf6edb33739d8eac4577ece1bfcfd75253382cb00f7bdc13c [Pipeline] // withDockerContainer [Pipeline] isUnix [Pipeline] sh + docker stop 89198b6a6dce9b85b6f4debde8c98612e5578b1085e8e878ddadef0376d3a5f0 89198b6a6dce9b85b6f4debde8c98612e5578b1085e8e878ddadef0376d3a5f0 + docker rm -f 89198b6a6dce9b85b6f4debde8c98612e5578b1085e8e878ddadef0376d3a5f0 89198b6a6dce9b85b6f4debde8c98612e5578b1085e8e878ddadef0376d3a5f0 [Pipeline] sh + docker network remove sidecar-11012af4-693e-4632-862d-9f415e49da55 sidecar-11012af4-693e-4632-862d-9f415e49da55 [Pipeline] libraryResource [Pipeline] echo ---------------------------------------------------------- --- An error occurred in the library step: dockerExecute ---------------------------------------------------------- The following parameters were available to the step: *** *** to show step parameters, set verbose:true in general pipeline configuration *** WARNING: this may reveal sensitive information. *** *** The error was: *** hudson.AbortException: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. *** Further information: * Documentation of library step dockerExecute: https://sap.github.io/jenkins-library/steps/dockerExecute/ * Source code of library step dockerExecute: https://github.com/SAP/jenkins-library/blob/master/vars/dockerExecute.groovy * Library documentation: https://sap.github.io/jenkins-library/ * Library repository: https://github.com/SAP/jenkins-library/ ---------------------------------------------------------- --- End library step of: dockerExecute --- [Pipeline] libraryResource [Pipeline] echo ---------------------------------------------------------- --- An error occurred in the library step: seleniumExecuteTests ---------------------------------------------------------- The following parameters were available to the step: *** *** to show step parameters, set verbose:true in general pipeline configuration *** WARNING: this may reveal sensitive information. *** *** The error was: *** hudson.AbortException: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. *** Further information: * Documentation of library step seleniumExecuteTests: https://sap.github.io/jenkins-library/steps/seleniumExecuteTests/ * Source code of library step seleniumExecuteTests: https://github.com/SAP/jenkins-library/blob/master/vars/seleniumExecuteTests.groovy * Library documentation: https://sap.github.io/jenkins-library/ * Library repository: https://github.com/SAP/jenkins-library/ ---------------------------------------------------------- --- End library step of: seleniumExecuteTests --- [Pipeline] libraryResource [Pipeline] echo ---------------------------------------------------------- --- An error occurred in the library step: karmaExecuteTests ---------------------------------------------------------- The following parameters were available to the step: *** *** to show step parameters, set verbose:true in general pipeline configuration *** WARNING: this may reveal sensitive information. *** *** The error was: *** hudson.AbortException: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. *** Further information: * Documentation of library step karmaExecuteTests: https://sap.github.io/jenkins-library/steps/karmaExecuteTests/ * Source code of library step karmaExecuteTests: https://github.com/SAP/jenkins-library/blob/master/vars/karmaExecuteTests.groovy * Library documentation: https://sap.github.io/jenkins-library/ * Library repository: https://github.com/SAP/jenkins-library/ ---------------------------------------------------------- --- End library step of: karmaExecuteTests --- [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. ```

Nico31300 commented 4 years ago

On the previous log i added in the karma.conf.js

reporters: ['junit'],
    junitReporter: {
        outputFile: 'test-results-karma.xml',
        suite: ''
    }

and i don't have error message about qunit

if i remove this parameter

Logs:

```log Started by user admin Rebuilds build #110 > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to https://github.com/Nico31300/devops > git config remote.origin.url https://github.com/Nico31300/devops # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 > git config --get remote.origin.url # timeout=10 using GIT_ASKPASS to set credentials Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10 Seen branch in repository origin/master Seen 1 remote branch Obtained Jenkinsfile from 4a80b6a89d952e359e7118985aab494103880096 Running in Durability level: MAX_SURVIVABILITY Loading library piper-lib-os@master Attempting to resolve master from remote references... > git --version # timeout=10 Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git ls-remote -h -- https://github.com/SAP/jenkins-library.git # timeout=10 Found match: refs/heads/master revision 8169d56ef76e0385b2edd7fb85463aa8d32b21cf No credentials specified > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/SAP/jenkins-library.git # timeout=10 Fetching without tags Fetching upstream changes from https://github.com/SAP/jenkins-library.git > git --version # timeout=10 Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git fetch --no-tags --force --progress -- https://github.com/SAP/jenkins-library.git +refs/heads/*:refs/remotes/origin/* # timeout=10 Checking out Revision 8169d56ef76e0385b2edd7fb85463aa8d32b21cf (master) > git config core.sparsecheckout # timeout=10 > git checkout -f 8169d56ef76e0385b2edd7fb85463aa8d32b21cf # timeout=10 Commit message: "Groovy: Load step defaults also from stages section in defaults (#1943)" > git rev-list --no-walk 8169d56ef76e0385b2edd7fb85463aa8d32b21cf # timeout=10 [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in /var/jenkins_home/workspace/devops_new_master [Pipeline] { [Pipeline] stage [Pipeline] { (prepare) [Pipeline] checkout using credential nico github > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/Nico31300/devops # timeout=10 Fetching without tags Fetching upstream changes from https://github.com/Nico31300/devops > git --version # timeout=10 using GIT_ASKPASS to set credentials Setting http proxy: fr0-proxylan-vip.eu.airbus.corp:3128 > git fetch --no-tags --force --progress -- https://github.com/Nico31300/devops +refs/heads/*:refs/remotes/origin/* # timeout=10 Checking out Revision 4a80b6a89d952e359e7118985aab494103880096 (master) > git config core.sparsecheckout # timeout=10 > git checkout -f 4a80b6a89d952e359e7118985aab494103880096 # timeout=10 Commit message: "Update karma.conf.js" > git rev-list --no-walk 0e4627b380d5d326e1d61a5210f0b52ec75cc9da # timeout=10 [Pipeline] libraryResource [Pipeline] readYaml [Pipeline] echo --- Begin library step of: setupCommonPipelineEnvironment --- [Pipeline] fileExists [Pipeline] readYaml [Pipeline] libraryResource [Pipeline] writeFile [Pipeline] echo --- Begin library step of: piperLoadGlobalExtensions --- [Pipeline] echo --- End library step of: piperLoadGlobalExtensions --- [Pipeline] stash Stashed 5 file(s) [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [setupCommonPipelineEnvironment] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] echo --- End library step of: setupCommonPipelineEnvironment --- [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Test) [Pipeline] echo --- Begin library step of: karmaExecuteTests --- [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [karmaExecuteTests] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] echo --- Begin library step of: seleniumExecuteTests --- [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [seleniumExecuteTests] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] echo --- Begin library step of: dockerExecute --- [Pipeline] timeout Timeout set to expire in 10 sec [Pipeline] { [Pipeline] httpRequest [Pipeline] } [Pipeline] // timeout [Pipeline] echo [dockerExecute] Telemetry Report with listener failed: java.net.SocketException: Connection reset [Pipeline] sh + docker ps -q [Pipeline] isUnix [Pipeline] sh + docker pull node:lts-stretch lts-stretch: Pulling from library/node Digest: sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090 Status: Image is up to date for node:lts-stretch docker.io/library/node:lts-stretch [Pipeline] sh + docker network create sidecar-d6af0544-0f4e-4ffc-8c0a-4c563814f1dd 4f5d6cbbcf9999d8952cc84dd7f69f044ce41288c80250f6de78d54c859ac2a1 [Pipeline] isUnix [Pipeline] sh + docker pull selenium/standalone-chrome Using default tag: latest latest: Pulling from selenium/standalone-chrome Digest: sha256:19ede8d919f1e3bd9c8e13c0cd7e399e04506def2ba0a667886756238b9688ab Status: Image is up to date for selenium/standalone-chrome:latest docker.io/selenium/standalone-chrome:latest [Pipeline] isUnix [Pipeline] sh + docker run -d --env NO_PROXY=localhost,karma,localhost,.corp,gheprivate.intra.corp,cx-nexus --env no_proxy=localhost,karma, --env http_proxy --env https_proxy --env HTTP_PROXY --env HTTPS_PROXY --volume /dev/shm:/dev/shm --network-alias selenium --network sidecar-d6af0544-0f4e-4ffc-8c0a-4c563814f1dd selenium/standalone-chrome [Pipeline] isUnix [Pipeline] sh + docker inspect -f . node:lts-stretch . [Pipeline] withDockerContainer Jenkins seems to be running inside container 0ebc5c817a1bc3886f5c4f8ce53c88bbee417ef92110cec6aa85c0a47cce1f44 $ docker run -t -d -u 1000:986 --env NO_PROXY=localhost,selenium,$NO_PROXY --env no_proxy=localhost,selenium,$no_proxy --env PIPER_SELENIUM_HOSTNAME=karma --env PIPER_SELENIUM_WEBDRIVER_HOSTNAME=selenium --env PIPER_SELENIUM_WEBDRIVER_PORT=4444 --env http_proxy --env https_proxy --env HTTP_PROXY --env HTTPS_PROXY --network-alias karma --network sidecar-d6af0544-0f4e-4ffc-8c0a-4c563814f1dd -w /var/jenkins_home/workspace/devops_new_master --volumes-from 0ebc5c817a1bc3886f5c4f8ce53c88bbee417ef92110cec6aa85c0a47cce1f44 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** node:lts-stretch cat $ docker top cee07161cda678d1a05b888c03ee72ac975d0952de590a0795421e61ad04ba09 -eo pid,comm [Pipeline] { [Pipeline] echo [INFO][dockerExecute] Running with sidecar container. [Pipeline] sh + node --version v12.18.3 + npm --version 6.14.6 [Pipeline] echo Unstash content: buildDescriptor [Pipeline] unstash [Pipeline] echo Unstash failed: buildDescriptor (No such saved stash ‘buildDescriptor’) [Pipeline] echo Unstash content: tests [Pipeline] unstash [Pipeline] echo Unstash failed: tests (No such saved stash ‘tests’) [Pipeline] sh + cd . + npm install --quiet npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN ajv-errors@1.0.1 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN com.devops.test@2.0.0 No repository field. npm WARN com.devops.test@2.0.0 No license field. audited 681 packages in 54.331s 2 packages are looking for funding run `npm fund` for details found 12 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details [Pipeline] sh + cd . + npm run karma > com.devops.test@2.0.0 karma /var/jenkins_home/workspace/devops_new_master > karma start 26 08 2020 14:40:15.793:DEBUG [config]: Loading config /var/jenkins_home/workspace/devops_new_master/karma.conf.js 26 08 2020 14:40:15.797:DEBUG [config]: autoWatch set to false, because of singleRun 26 08 2020 14:40:15.798:DEBUG [karma-server]: Final config Config { LOG_DISABLE: 'OFF', LOG_ERROR: 'ERROR', LOG_WARN: 'WARN', LOG_INFO: 'INFO', LOG_DEBUG: 'DEBUG', frameworks: [ 'ui5' ], protocol: 'http:', port: 9876, listenAddress: '0.0.0.0', hostname: 'karma', httpsServerConfig: {}, basePath: '/var/jenkins_home/workspace/devops_new_master', files: [], browserConsoleLogOptions: { level: 'debug', format: '%b %T: %m', terminal: true }, customContextFile: null, customDebugFile: null, customClientContextFile: null, exclude: [ '/var/jenkins_home/workspace/devops_new_master/karma.conf.js' ], logLevel: 'DEBUG', colors: true, autoWatch: false, autoWatchBatchDelay: 250, restartOnFileChange: false, usePolling: true, reporters: [ 'progress' ], singleRun: true, browsers: [ 'chromeSel' ], captureTimeout: 60000, pingTimeout: 5000, proxies: {}, proxyValidateSSL: true, preprocessors: [Object: null prototype] {}, preprocessor_priority: {}, urlRoot: '/', upstreamProxy: undefined, reportSlowerThan: 0, loggers: [ { type: 'console', layout: { type: 'pattern', pattern: '%[%d{DATE}:%p [%c]: %]%m' } } ], transports: [ 'polling', 'websocket' ], forceJSONP: false, plugins: [ 'karma-*', [Object: null prototype] { 'launcher:chromeSel': [ 'factory', [Function] ] } ], client: { args: [], useIframe: true, runInParent: false, captureConsole: true, clearContext: true }, defaultClient: { args: [], useIframe: true, runInParent: false, captureConsole: true, clearContext: true }, browserDisconnectTimeout: 2000, browserDisconnectTolerance: 0, browserNoActivityTimeout: 30000, processKillTimeout: 2000, concurrency: Infinity, failOnEmptyTestSuite: true, retryLimit: 2, detached: false, crossOriginAttribute: true, browserSocketTimeout: 20000, cmd: 'start', configFile: '/var/jenkins_home/workspace/devops_new_master/karma.conf.js', ui5: { url: 'https://openui5.hana.ondemand.com' }, customLaunchers: { chromeSel: { base: 'WebDriver', config: { hostname: 'selenium', port: 4444 }, browserName: 'chrome' } } } 26 08 2020 14:40:15.798:DEBUG [plugin]: Loading karma-* from /var/jenkins_home/workspace/devops_new_master/node_modules 26 08 2020 14:40:15.799:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-chrome-launcher. 26 08 2020 14:40:15.805:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-junit-reporter. 26 08 2020 14:40:15.819:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5. 26 08 2020 14:40:16.088:DEBUG [plugin]: Loading plugin /var/jenkins_home/workspace/devops_new_master/node_modules/karma-webdriver-launcher. 26 08 2020 14:40:16.202:DEBUG [plugin]: Loading inlined plugin (defining launcher:chromeSel). 26 08 2020 14:40:16.211:DEBUG [web-server]: Instantiating middleware 26 08 2020 14:40:16.257:INFO [karma-server]: Karma v5.1.1 server started at http://karma:9876/ 26 08 2020 14:40:16.258:INFO [launcher]: Launching browsers chromeSel with concurrency unlimited 26 08 2020 14:40:16.262:INFO [launcher]: Starting browser chrome via Remote WebDriver 26 08 2020 14:40:16.262:DEBUG [launcher]: null -> BEING_CAPTURED 26 08 2020 14:40:16.263:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-57244594 26 08 2020 14:40:16.264:DEBUG [WebDriver]: WebDriver config: {"hostname":"selenium","port":4444} 26 08 2020 14:40:16.264:DEBUG [WebDriver]: Browser capabilities: {"platform":"ANY","testName":"Karma test","tags":[],"version":"","base":"WebDriver","browserName":"chrome"} 26 08 2020 14:40:17.183:DEBUG [WebDriver]: Session ID: c40122704c736a7e8b7b95a9428d247b 26 08 2020 14:40:17.211:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/client.html 26 08 2020 14:40:17.249:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/karma.js 26 08 2020 14:40:17.309:DEBUG [karma-server]: A browser has connected on socket orW9Xp2s6pVeke_qAAAA 26 08 2020 14:40:17.313:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/favicon.ico 26 08 2020 14:40:17.318:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=orW9Xp2s6pVeke_qAAAA 26 08 2020 14:40:17.333:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: undefined -> CONNECTED 26 08 2020 14:40:17.333:INFO [Chrome 84.0.4147.105 (Linux x86_64)]: Connected on socket orW9Xp2s6pVeke_qAAAA with id 57244594 26 08 2020 14:40:17.334:DEBUG [launcher]: BEING_CAPTURED -> CAPTURED 26 08 2020 14:40:17.334:DEBUG [launcher]: chrome via Remote WebDriver (id 57244594) captured in 1.076 secs 26 08 2020 14:40:17.334:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: CONNECTED -> CONFIGURING 26 08 2020 14:40:17.344:DEBUG [middleware:karma]: custom files null null null 26 08 2020 14:40:17.344:DEBUG [middleware:karma]: Serving static request /context.html 26 08 2020 14:40:17.345:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/context.html 26 08 2020 14:40:17.356:DEBUG [middleware:source-files]: Requesting /base/node_modules/karma-ui5/dist/browser-bundle.js?5a933fbe8988b09de858701008541db22d7c63ba 26 08 2020 14:40:17.356:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5/dist/browser-bundle.js 26 08 2020 14:40:17.356:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/node_modules/karma-ui5/dist/browser-bundle.js 26 08 2020 14:40:17.357:DEBUG [web-server]: serving: /var/jenkins_home/workspace/devops_new_master/node_modules/karma/static/context.js 26 08 2020 14:40:17.390:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.html 26 08 2020 14:40:17.390:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:40:17.390:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:40:17.402:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.html 26 08 2020 14:40:17.402:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:40:17.402:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.html 26 08 2020 14:40:17.416:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-redirect.js 26 08 2020 14:40:17.416:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-redirect.js 26 08 2020 14:40:17.431:DEBUG [middleware:source-files]: Requesting /base/webapp/test/testsuite.qunit.js 26 08 2020 14:40:17.431:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.js 26 08 2020 14:40:17.431:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/testsuite.qunit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:40:17.477:DEBUG [middleware:source-files]: Requesting /base/webapp/test/unit/unitTests.qunit.html 26 08 2020 14:40:17.477:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.html 26 08 2020 14:40:17.477:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.html 26 08 2020 14:40:17.491:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap-ui-core.js 26 08 2020 14:40:17.491:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap-ui-core.js 26 08 2020 14:40:17.493:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/thirdparty/qunit-2.css 26 08 2020 14:40:17.493:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/thirdparty/qunit-2.css 26 08 2020 14:40:17.495:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/thirdparty/qunit-2.js 26 08 2020 14:40:17.495:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/thirdparty/qunit-2.js 26 08 2020 14:40:17.496:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-junit.js 26 08 2020 14:40:17.496:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-junit.js 26 08 2020 14:40:17.497:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-coverage.js 26 08 2020 14:40:17.498:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-coverage.js 26 08 2020 14:40:17.499:DEBUG [middleware:source-files]: Requesting /base/webapp/test/unit/unitTests.qunit.js 26 08 2020 14:40:17.499:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.js 26 08 2020 14:40:17.502:DEBUG [web-server]: serving (cached): /var/jenkins_home/workspace/devops_new_master/webapp/test/unit/unitTests.qunit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:40:17.531:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/thirdparty/qunit-2.css 26 08 2020 14:40:17.531:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/thirdparty/qunit-2.css Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:40:17.565:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-junit.js 26 08 2020 14:40:17.565:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-junit.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) 26 08 2020 14:40:17.601:DEBUG [middleware:source-files]: Requesting /base/webapp/resources/sap/ui/qunit/qunit-coverage.js 26 08 2020 14:40:17.601:DEBUG [middleware:source-files]: Fetching /var/jenkins_home/workspace/devops_new_master/webapp/resources/sap/ui/qunit/qunit-coverage.js Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Chrome 84.0.4147.105 (Linux x86_64) ERROR Uncaught ReferenceError: QUnit is not defined at webapp/test/unit/unitTests.qunit.js:2:1 ReferenceError: QUnit is not defined at webapp/test/unit/unitTests.qunit.js:2:1 26 08 2020 14:40:17.646:DEBUG [Chrome 84.0.4147.105 (Linux x86_64)]: CONFIGURING -> CONNECTED 26 08 2020 14:40:17.648:DEBUG [launcher]: CAPTURED -> BEING_KILLED 26 08 2020 14:40:17.648:DEBUG [launcher]: BEING_KILLED -> BEING_FORCE_KILLED 26 08 2020 14:40:17.649:DEBUG [karma-server]: Run complete, exiting. 26 08 2020 14:40:17.649:DEBUG [launcher]: Disconnecting all browsers 26 08 2020 14:40:17.650:DEBUG [launcher]: BEING_FORCE_KILLED -> BEING_FORCE_KILLED 26 08 2020 14:40:17.650:DEBUG [proxy]: Destroying proxy agents 26 08 2020 14:40:17.719:INFO [WebDriver]: Killed Karma test. 26 08 2020 14:40:17.720:DEBUG [launcher]: Process chrome via Remote WebDriver exited with code 0 and signal null 26 08 2020 14:40:17.720:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-57244594 26 08 2020 14:40:17.722:DEBUG [launcher]: Finished all browsers 26 08 2020 14:40:17.722:DEBUG [launcher]: BEING_FORCE_KILLED -> FINISHED 26 08 2020 14:40:17.722:DEBUG [launcher]: FINISHED -> FINISHED npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! com.devops.test@2.0.0 karma: `karma start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the com.devops.test@2.0.0 karma script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/node/.npm/_logs/2020-08-26T14_40_17_740Z-debug.log [Pipeline] error [Pipeline] } $ docker stop --time=1 cee07161cda678d1a05b888c03ee72ac975d0952de590a0795421e61ad04ba09 $ docker rm -f cee07161cda678d1a05b888c03ee72ac975d0952de590a0795421e61ad04ba09 [Pipeline] // withDockerContainer [Pipeline] isUnix [Pipeline] sh + docker stop 16c1c087b653e2a0516f76ec46b811b37d297ab68748c3ad6371c95c689adc0b 16c1c087b653e2a0516f76ec46b811b37d297ab68748c3ad6371c95c689adc0b + docker rm -f 16c1c087b653e2a0516f76ec46b811b37d297ab68748c3ad6371c95c689adc0b 16c1c087b653e2a0516f76ec46b811b37d297ab68748c3ad6371c95c689adc0b [Pipeline] sh + docker network remove sidecar-d6af0544-0f4e-4ffc-8c0a-4c563814f1dd sidecar-d6af0544-0f4e-4ffc-8c0a-4c563814f1dd [Pipeline] libraryResource [Pipeline] echo ---------------------------------------------------------- --- An error occurred in the library step: dockerExecute ---------------------------------------------------------- The following parameters were available to the step: *** *** to show step parameters, set verbose:true in general pipeline configuration *** WARNING: this may reveal sensitive information. *** *** The error was: *** hudson.AbortException: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. *** Further information: * Documentation of library step dockerExecute: https://sap.github.io/jenkins-library/steps/dockerExecute/ * Source code of library step dockerExecute: https://github.com/SAP/jenkins-library/blob/master/vars/dockerExecute.groovy * Library documentation: https://sap.github.io/jenkins-library/ * Library repository: https://github.com/SAP/jenkins-library/ ---------------------------------------------------------- --- End library step of: dockerExecute --- [Pipeline] libraryResource [Pipeline] echo ---------------------------------------------------------- --- An error occurred in the library step: seleniumExecuteTests ---------------------------------------------------------- The following parameters were available to the step: *** *** to show step parameters, set verbose:true in general pipeline configuration *** WARNING: this may reveal sensitive information. *** *** The error was: *** hudson.AbortException: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. *** Further information: * Documentation of library step seleniumExecuteTests: https://sap.github.io/jenkins-library/steps/seleniumExecuteTests/ * Source code of library step seleniumExecuteTests: https://github.com/SAP/jenkins-library/blob/master/vars/seleniumExecuteTests.groovy * Library documentation: https://sap.github.io/jenkins-library/ * Library repository: https://github.com/SAP/jenkins-library/ ---------------------------------------------------------- --- End library step of: seleniumExecuteTests --- [Pipeline] libraryResource [Pipeline] echo ---------------------------------------------------------- --- An error occurred in the library step: karmaExecuteTests ---------------------------------------------------------- The following parameters were available to the step: *** *** to show step parameters, set verbose:true in general pipeline configuration *** WARNING: this may reveal sensitive information. *** *** The error was: *** hudson.AbortException: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. *** Further information: * Documentation of library step karmaExecuteTests: https://sap.github.io/jenkins-library/steps/karmaExecuteTests/ * Source code of library step karmaExecuteTests: https://github.com/SAP/jenkins-library/blob/master/vars/karmaExecuteTests.groovy * Library documentation: https://sap.github.io/jenkins-library/ * Library repository: https://github.com/SAP/jenkins-library/ ---------------------------------------------------------- --- End library step of: karmaExecuteTests --- [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: [karmaExecuteTests] ERROR: The execution of the karma tests failed, see the log for details. Finished: FAILURE ```

Nico31300 commented 4 years ago

Thanks for hide logs, i didn't know how to do it.

What is strange for me is the step karmaExecuteTests is well executed on my personal computer (with project piper also), on the jenkins project i have the same git repository configured.

I only get this issue when i build jenkins project on my company (over proxy).

I'm sorry it's difficult for you to analyze ....

CCFenner commented 4 years ago

@marcusholl @stippi2 any ideas on this?

stippi2 commented 4 years ago

To be honest, I am completely clueless. :-(

marcusholl commented 4 years ago

Also completely clueless. :-(

github-actions[bot] commented 2 years ago

Issue got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.