Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"You need to include some adapter that implements __karma__.start method" error after upgrading to 4.4.0 #3385

Closed
dumbmatter opened this issue Oct 18, 2019 · 3 comments

Comments

@dumbmatter
Copy link

dumbmatter commented Oct 18, 2019

Expected behaviour

Upgrading to 4.4.0 would not break my tests :)

Actual behaviour

When I run Karma, I get output like this:

$ yarn test-e2e
yarn run v1.19.1
$ karma start karma.conf.js
18 10 2019 00:21:11.344:INFO [preprocessor.rollup]: Generating bundle for ./src/deion/test/mocha.js
18 10 2019 00:21:11.601:INFO [karma-server]: Karma v4.3.0 server started at http://0.0.0.0:9876/
18 10 2019 00:21:11.601:INFO [launcher]: Launching browsers ChromeHeadless, FirefoxHeadless with concurrency unlimited
18 10 2019 00:21:11.608:INFO [launcher]: Starting browser ChromeHeadless
18 10 2019 00:21:11.640:INFO [launcher]: Starting browser FirefoxHeadless
18 10 2019 00:21:15.057:INFO [preprocessor.rollup]: Generating bundle for ./src/deion/test/smoke.js
18 10 2019 00:21:18.023:INFO [HeadlessChrome 77.0.3865 (Linux 0.0.0)]: Connected on socket --mqw4d12gSG7YxqAAAA with id 3778021
HeadlessChrome 77.0.3865 (Linux 0.0.0) ERROR
  You need to include some adapter that implements __karma__.start method!


18 10 2019 00:21:18.732:INFO [Firefox 69.0.0 (Ubuntu 0.0.0)]: Connected on socket wIsMYYYdCUttV51NAAAB with id 85435786
Firefox 69.0.0 (Ubuntu 0.0.0) ERROR
  You need to include some adapter that implements __karma__.start method!


error Command failed with exit code 1.

Environment Details

  • Karma version (output of karma --version): 4.4.0
  • Relevant part of your karma.config.js file

I'm not sure, so here's all of it:

// tools/karmaConfig.js

const alias = require("rollup-plugin-alias");
const build = require("./buildFuncs");
const rollupConfig = require("./rollupConfig");

const files = ["src/deion/test/mocha.js", "src/deion/test/smoke.js"];

const sport = build.getSport();

const rollupConfigTemp = rollupConfig("test");
rollupConfigTemp.plugins.unshift(
    alias({
        entries: [
            {
                find: "smoke-test-overrides",
                replacement: `./../../${sport}/worker/index.js`,
            },
        ],
    }),
);

module.exports = {
    frameworks: ["mocha", "source-map-support"],

    files: files.map(pattern => {
        return {
            pattern,
            watched: false,
        };
    }),

    preprocessors: {
        "src/**/*.js": ["rollup"],
    },

    // http://stackoverflow.com/a/42379383/786644
    browserConsoleLogOptions: {
        terminal: true,
        level: "",
    },

    autoWatch: false,

    singleRun: true,

    rollupPreprocessor: {
        ...rollupConfigTemp,
        output: {
            format: "iife",
            indent: false,
            name: "bbgm",
            sourcemap: true,
        },
    },

    browserNoActivityTimeout: 15 * 60 * 1000, // 15 minutes
    browserDisconnectTimeout: 15 * 60 * 1000, // 15 minutes

    browsers: ["ChromeHeadless", "FirefoxHeadless"],
};
// karma.conf.js

const karmaConfig = require("./tools/karmaConfig");

module.exports = function(config) {
    config.set({
        ...karmaConfig,
        autoWatch: false,
        singleRun: true,
        browsers: ["ChromeHeadless", "FirefoxHeadless"],
    });
};

Steps to reproduce the behaviour

  1. Clone this repo https://github.com/dumbmatter/gm-games/
  2. Upgrade Karma from 4.3.0 to 4.4.0
  3. Run yarn install && yarn test-e2e

Additional info

I bisected the commits between v4.3.0 and v4.4.0 and found that this issue was introduced in commit 3ffcd83. I haven't looked into it any further than that.

@dumbmatter dumbmatter changed the title " "You need to include some adapter that implements __karma__.start method" error after upgrading to 4.4.0 Oct 18, 2019
@johnjbarton
Copy link
Contributor

Please retry without 'source-map-support' and then without 'rollup'. Maybe related to #3383

@johnjbarton
Copy link
Contributor

Please try 4.4.1

@dumbmatter
Copy link
Author

That fixed it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants