Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Karma test fails to connect to launched 'chrome' instance

Status
Not open for further replies.

cloudytechi147

Systems Engineer
Oct 14, 2021
3
0
0
IN
I have a Karma test running on a node.js Jenkins unit, npm times out to associate with the Chrome case (on selenium centre).
Until yesterday this turned out great, there were no progressions done to any of the arrangement records, so I speculate a basic foundation availability disappointment.
Note that the tests run totally fine locally, utilizing my nearby Chrome case.
My arrangement resembles:
Code:
browsers: ['RemoteChrome'],
singleRun: true,
autoWatch: false,
hostname: getIpAddress('eth0', 'IPv4'), // On Kubernetes, the container's network is on eth0
port: getRandomPort(), // Random port is enough for now
browserNoActivityTimeout: 600000,
browserDisconnectTolerance: 5,
customLaunchers: {
    'RemoteChrome': {
        base: 'WebDriver',
        config: {
            hostname: 'selenium-hub.MY_COMPANY_DOMAIN.com',
            port: 80,
        },
        browserName: 'chrome'
    }
}

The logs for a successful build look like this I get is:

Code:
15:43:47  + ./node_modules/.bin/ng test --watch=false
15:43:48  Browserslist: caniuse-lite is outdated. Please run next command `npm update`
15:44:01  [32m10 01 2022 14:44:00.811:INFO [karma-server]: [39mKarma v4.1.0 server started at [URL unfurl="true"]http://0.0.0.0:51500/[/URL]
15:44:01  [32m10 01 2022 14:44:00.813:INFO [launcher]: [39mLaunching browsers RemoteChrome with concurrency unlimited
15:44:01  [32m10 01 2022 14:44:00.820:INFO [launcher]: [39mStarting browser chrome via Remote WebDriver
15:44:16  [32m10 01 2022 14:44:14.936:INFO [Chrome 94.0.4606 (Linux 0.0.0)]: [39mConnected on socket R0gwZjv8YroZjqsvAAAA with id 69976747
15:44:16  [33m10 01 2022 14:44:14.943:WARN [middleware:karma]: [39mInvalid file type (ts), defaulting to js.
15:44:24  Chrome 94.0.4606 (Linux 0.0.0): Executed 0 of 402 SUCCESS (0 secs / 0 secs)

But since the build started to fail I now get:

Code:
17:23:57  + ./node_modules/.bin/ng test --watch=false
17:23:59  Browserslist: caniuse-lite is outdated. Please run next command `npm update`
17:24:11  [32m10 01 2022 16:24:11.124:INFO [karma-server]: [39mKarma v4.1.0 server started at [URL unfurl="true"]http://0.0.0.0:46286/[/URL]
17:24:11  [32m10 01 2022 16:24:11.125:INFO [launcher]: [39mLaunching browsers RemoteChrome with concurrency unlimited
17:24:11  [32m10 01 2022 16:24:11.128:INFO [launcher]: [39mStarting browser chrome via Remote WebDriver
17:24:26  [32m10 01 2022 16:24:25.472:INFO [Chrome 94.0.4606 (Linux 0.0.0)]: [39mConnected on socket Ml6Xc9tjNamow3MKAAAA with id 46407971
17:24:26  [33m10 01 2022 16:24:25.480:WARN [middleware:karma]: [39mInvalid file type (ts), defaulting to js.
17:24:58  [33m10 01 2022 16:24:57.466:WARN [Chrome 94.0.4606 (Linux 0.0.0)]: [39mDisconnected (0 times)reconnect failed before timeout of 2000ms (ping timeout)
17:24:58  Chrome 94.0.4606 (Linux 0.0.0) ERROR
17:24:58    Disconnectedreconnect failed before timeout of 2000ms (ping timeout)

I have attempted the arrangement proposed here yet it doesn't work.
Note that my selenium centre point runs fine and dandy, I can ping it and show its centre point yield on the program.
Does anybody have insight into this issue?

Needed help in this to complete kubernetes certifications.
 
I would like to know how to run Windows software on Linux.

Please start a new thread for that question. Using someone else's thread for an unrelated question just causes confusion.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top