×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Karma test fails to connect to launched 'chrome' instance

Karma test fails to connect to launched 'chrome' instance

Karma test fails to connect to launched 'chrome' instance

(OP)
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 http://0.0.0.0:51500/
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 http://0.0.0.0:46286/
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.

RE: Karma test fails to connect to launched 'chrome' instance

Quote:

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close