{"id":18539212,"url":"https://github.com/jeanbza/git-karma-on-ubuntu-container","last_synced_at":"2026-04-24T16:02:35.143Z","repository":{"id":152874156,"uuid":"74496828","full_name":"jeanbza/git-karma-on-ubuntu-container","owner":"jeanbza","description":"Fully fledged karma setup that can run on Ubuntu containers.","archived":false,"fork":false,"pushed_at":"2016-12-02T22:46:25.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T02:36:46.276Z","etag":null,"topics":["chrome","karma","karma-chrome-launcher","ubuntu-container","ui-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeanbza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-11-22T17:24:22.000Z","updated_at":"2017-05-07T23:24:47.000Z","dependencies_parsed_at":"2023-11-06T13:20:45.907Z","dependency_job_id":"20b84617-7f7f-45b1-b653-a9da8bd219a6","html_url":"https://github.com/jeanbza/git-karma-on-ubuntu-container","commit_stats":null,"previous_names":["jeanbza/git-karma-on-ubuntu-container"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeanbza/git-karma-on-ubuntu-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanbza%2Fgit-karma-on-ubuntu-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanbza%2Fgit-karma-on-ubuntu-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanbza%2Fgit-karma-on-ubuntu-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanbza%2Fgit-karma-on-ubuntu-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeanbza","download_url":"https://codeload.github.com/jeanbza/git-karma-on-ubuntu-container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanbza%2Fgit-karma-on-ubuntu-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","karma","karma-chrome-launcher","ubuntu-container","ui-testing"],"created_at":"2024-11-06T19:47:00.679Z","updated_at":"2026-04-24T16:02:35.127Z","avatar_url":"https://github.com/jeanbza.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# karma-in-docker\n\n# Run locally\n\n1. `npm install`\n1. `./node_modules/.bin/webpack`\n1. `open index.html`\n\n# Run tests locally\n\n1. `npm install`\n1. `npm test`\n\n# Run tests in docker\n\n1. `npm install`\n1. `npm test`\n1. `docker build . -t karma-docker`\n1. `docker run -it -v ~/workspace/git-karma-on-ubuntu-container:/karma karma-docker`\n1. Run in container:\n\n    ```\n    service dbus restart\n    xvfb-run chromedriver \u0026\n    cd /karma\n    rm -rf node_modules\n    npm install\n    TEST_ENV=CI npm test\n    ```\n\n# What are the problems this repo is trying to solve?\n\n- Provide a basic karma + babel + react example that runs on docker containers\n- The [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher) hangs trying to start google-chrome (it does so directly; not through `chromedriver`). We don't know why this is - even with maximum logging (see below) we get no useful information\n- Running `google-chrome` through the [karma-script-launcher](https://github.com/karma-runner/karma-script-launcher) hangs - again, we were unable to find out why. We think this and the [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher) is related to Karma's use of [child_process.spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) [[1]](https://github.com/karma-runner/karma/blob/8e2cfab5e97033a17edbde412485d682d153d5d1/lib/launchers/process.js#L63) [[2]](https://github.com/karma-runner/karma/blob/8e2cfab5e97033a17edbde412485d682d153d5d1/lib/launchers/process.js#L141) [[3]](https://github.com/karma-runner/karma/blob/8e2cfab5e97033a17edbde412485d682d153d5d1/lib/launchers/process.js#L138)\n- [We know that chromedriver + acceptance tests work headlessly in a very similar container](http://engineering.pivotal.io/post/headless-ui-testing-with-go-agouti-and-chrome/) (again - the only different we see is that [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher) and co get run as a separate process via [child_process.spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options))\n\nSo...\n\nOur solution is to start chromedriver in its own thread and use the [karma-script-launcher](https://github.com/karma-runner/karma-script-launcher) JUST to make chromedriver (who is not living in the [child_process.spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) process) navigate to the page that [karma passes to our script](https://github.com/karma-runner/karma-script-launcher/blame/a501ba571a08f13346218900f50f844c967d650d/README.md#L10-L11)\n\n# Debugging\n\n- Add `--log-level debug` to your `test` script in `package.json` to get more karma logging\n    - Karma [suppresses the output of launchers](https://github.com/karma-runner/karma/blob/master/lib/launchers/process.js#L140-L148) (so you can not see why google-chrome is failing!)]\n- `chromedriver --verbose` is a good source of information\n- Karma doesn't print the output of your launcher (chrome, script, firefox, whatever) because of [this piece of code](https://github.com/karma-runner/karma/blob/8e2cfab5e97033a17edbde412485d682d153d5d1/lib/launchers/process.js#L140-L148). This doesn't seem to be configurable. You can replace that bit of code with:\n\n    ```\n    var spawnWithoutOutput = function () {\n      var proc = spawn.apply(null, arguments)\n      proc.stdout.pipe(process.stdout)\n      proc.stderr.pipe(process.stderr)\n\n      return proc\n    }\n\n    ProcessLauncher.call(launcher, spawnWithoutOutput, require('../temp_dir'), timer)\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanbza%2Fgit-karma-on-ubuntu-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeanbza%2Fgit-karma-on-ubuntu-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanbza%2Fgit-karma-on-ubuntu-container/lists"}