question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chrome hangs on new start

See original GitHub issue

When I start karma, it starts up a new Chrome instance (as expected). However, the Chrome instance hangs trying to load the page (eventually prompting me to either kill the tab or wait for it). Karma will time out and try to launch chrome again, before it eventually gives up and shuts down. However, I can copy the link that Karma is trying to open, and paste it in another instance of Chrome, and it loads up just fine.
So it seems that there is something wrong with how karma-chrome-launcher is starting up the Chrome instance.
Karma config:

// Karma configuration
// Generated on Tue Oct 13 2015 10:36:06 GMT-0400 (Eastern Daylight Time)

module.exports = function(config) {
  config.set({

    // base path that will be used to resolve all patterns (eg. files, exclude)
    basePath: 'wwwroot',


    // frameworks to use
    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
    frameworks: ['jspm','jasmine'],


    jspm: {
        loadFiles: [
            'src/**/*.js',
            'test/**/*.js'
        ],
        paths: {
            '*': '*.js'
        },
    },

    // list of files / patterns to load in the browser
    files: [
        'src/**/*.css'
    ],


    // list of files to exclude
    exclude: [
    ],


    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
        'src/**/*.js': ['babel']
    },
    'babelPreprocessor': {
        options: {
            sourceMap: 'inline',
            modules: 'system',
            moduleIds: false,
            //loose: "all",
            optional: [
              "es7.decorators",
              "es7.classProperties",
              "es7.asyncFunctions",
              "es7.functionBind",
            ]
        }
    },


    // test results reporter to use
    // possible values: 'dots', 'progress'
    // available reporters: https://npmjs.org/browse/keyword/karma-reporter
    reporters: ['progress'],


    // web server port
    port: 9876,


    // enable / disable colors in the output (reporters and logs)
    colors: true,


    // level of logging
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
    logLevel: config.LOG_INFO,


    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: true,


    // start these browsers
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
    browsers: ['Chrome'],


    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: false
  })
}

I don’t think it’s necessarily a problem with Karma, as I can use the Firefox launcher, and it works just fine. However, that could be coincidence…

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:7
  • Comments:8

github_iconTop GitHub Comments

4reactions
vdolekcommented, May 22, 2017

This happened to me when I was running the command from admin console. When running as current user it works.

0reactions
mmanelacommented, Aug 23, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix It When Chrome Keeps Freezing - Lifewire
How to Fix Chrome When It Freezes or Crashes · Close Chrome tabs. · Restart Chrome. · Quit other running apps and programs....
Read more >
Fix Chrome if it crashes or won't open - Computer
First: Try these common Chrome crash fixes · Close every tab except for the one that's showing the error message. · Quit other...
Read more >
Freezing when i open a new tab. : r/chrome - Reddit
FIXED: Go to Settings. All the way at the bottom click "Advanced" then keep scrolling down to "Reset and Cleanup" choose "Restore settings...
Read more >
Google Chrome Hangs When Opening
Issues with a Chrome installation that cause the browser to hang when starting can be caused by corrupt code, a problem with a...
Read more >
Why Does Google Chrome Keep Crashing, Freezing, or Not ...
When Chrome starts crashing or freezing, you should first try completely restarting it. To do so, click the three-dot Menu button at the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found