I'm trying to set up a multiplatform project to bu...
# javascript
e
I'm trying to set up a multiplatform project to build on a macOS box on Travis CI and started seeing the following JS failures:
Copy code
19 01 2020 20:45:29.838:INFO [karma-server]: Karma v4.4.1 server started at <http://0.0.0.0:9876/>
19 01 2020 20:45:29.842:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
19 01 2020 20:45:29.848:INFO [launcher]: Starting browser Chrome
19 01 2020 20:46:29.967:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
19 01 2020 20:46:31.977:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
19 01 2020 20:46:34.018:WARN [launcher]: Chrome was not killed by SIGKILL in 2000 ms, continuing.

java.lang.IllegalStateException: command '/Users/travis/.gradle/nodejs/node-v10.15.3-darwin-x64/bin/node' exited with errors (exit code: 1)
I started with the following configuration:
Copy code
kotlin {
  js {
    nodejs()
    browser()
  }
}
which AFAIK uses headless Chrome by default, and later changed to this without much luck:
Copy code
kotlin {
  js {
    nodejs()
    browser {
      testTask {
        useKarma {
          useChrome()
        }
      }
    }
  }
}
I'm unable to reproduce the issue locally. Has anyone had similar failures and managed to work around them?
f
I had a similar issue with
CircleCI
. I fixed it using a docker image with Google Chrome installed. I think you can solve this installing Google Chrome in your TravisCI environment.
s
Hi! Yeah, the issue here is that currently the test runner doesn’t parse the karma CLI output to provide a nicer error message (see https://youtrack.jetbrains.com/issue/KT-31663#focus=streamItem-27-3507782.0-0), so yes, the error stems from not having Chrome installed – currently it’s “bring your own browser” 😉. Support for auto-downloading Chrome is discussed here: https://youtrack.jetbrains.com/issue/KT-32075 There is however an issue already existing @Ilya Goncharov [JB] – Do we already have plans / an issue for improving this error message? 🙂
e
Oh, got it, thanks folks! Going to try installing Chrome and will report back.
Installing Chrome with homebrew did the job for me, thanks again!
😎 1
👌🏼 1
j
I've just run into this issue too and was wondering if there was anything that could be done to fix it by not running the tests in Chrome? We're using Kotlin for non-UI code so it seems excessive for our use case to download Chrome each time
e
You should be able to just remove the
browser()
instruction