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.

Always "serving (cached)" regardless of file changes

See original GitHub issue

I’m using coffee files for tests, Chrome 35, Karma 0.12.16, node 0.10.28.

DEBUG [plugin]: Loading karma-* from C:\Inetpub\marcos\node_modules
DEBUG [plugin]: Loading plugin C:\Inetpub\marcos\node_modules/karma-chrome-launcher.
DEBUG [plugin]: Loading plugin C:\Inetpub\marcos\node_modules/karma-coffee-preprocessor.
DEBUG [plugin]: Loading plugin C:\Inetpub\marcos\node_modules/karma-firefox-launcher.
DEBUG [plugin]: Loading plugin C:\Inetpub\marcos\node_modules/karma-mocha.
INFO [karma]: Karma v0.12.16 server started at http://127.0.0.1:9876/base/
INFO [launcher]: Starting browser Chrome
DEBUG [temp-dir]: Creating temp dir at F:\Users\Paulo\AppData\Local\Temp\karma-59450547

DEBUG [launcher]: F:\Program Files (x86)\Google\Chrome\Application\chrome.exe --user-data-dir=F:\Users\Paulo\AppData\Local\Temp\karma-59450547 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate http://127.0.0.1:9876/base/?id=59450547
DEBUG [watcher]: Excluded file "C:/Inetpub/marcos/test/client/js/services/cep.coffee"
DEBUG [watcher]: Excluded file "C:/Inetpub/marcos/test/client/js/services/collection.coffee"
DEBUG [watcher]: Excluded file "C:/Inetpub/marcos/test/client/js/services/getobject.coffee"
DEBUG [watcher]: Excluded file "C:/Inetpub/marcos/test/client/js/services/planner.coffee"
DEBUG [preprocessor.coffee]: Processing "C:/Inetpub/marcos/test/client/js/services/currencyStr.coffee".
DEBUG [preprocessor.coffee]: Processing "C:/Inetpub/marcos/test/client/js/services/errorlookup.coffee".
DEBUG [preprocessor.coffee]: Processing "C:/Inetpub/marcos/test/client/js/services/item.coffee".
DEBUG [preprocessor.coffee]: Processing "C:/Inetpub/marcos/test/client/js/services/length.coffee".
DEBUG [preprocessor.coffee]: Processing "C:/Inetpub/marcos/test/client/js/services/percentage.coffee".
DEBUG [watcher]: Resolved files:
        C:/Inetpub/marcos/node_modules/mocha/mocha.js
        C:/Inetpub/marcos/node_modules/karma-mocha/lib/adapter.js
        C:/Inetpub/marcos/javascripts/modernizr.js
        C:/Inetpub/marcos/bower_components/jquery/dist/jquery.js
        C:/Inetpub/marcos/bower_components/lodash/dist/lodash.js
        C:/Inetpub/marcos/bower_components/angular/angular.js
        C:/Inetpub/marcos/bower_components/angular-mocks/angular-mocks.js
        C:/Inetpub/marcos/bower_components/angular-i18n/angular-locale_pt-br.js
        C:/Inetpub/marcos/bower_components/angular-ui-utils/ui-utils.js
        C:/Inetpub/marcos/bower_components/magnific-popup/dist/jquery.magnific-popup.js
        C:/Inetpub/marcos/bower_components/bluebird/js/browser/bluebird.js
        C:/Inetpub/marcos/bower_components/chain-commander/lib/chain-commander.js
        C:/Inetpub/marcos/modules/phery/vendor/phery.js
        C:/Inetpub/marcos/javascripts/app.js
        C:/Inetpub/marcos/node_modules/expect.js/index.js
        C:/Inetpub/marcos/test/client/js/services/currencyStr.js
        C:/Inetpub/marcos/test/client/js/services/errorlookup.js
        C:/Inetpub/marcos/test/client/js/services/item.js
        C:/Inetpub/marcos/test/client/js/services/length.js
        C:/Inetpub/marcos/test/client/js/services/percentage.js
DEBUG [web-server]: serving: C:\Inetpub\marcos\node_modules\karma\static/client.html
DEBUG [web-server]: serving: C:\Inetpub\marcos\node_modules\karma\static/karma.js
DEBUG [web-server]: upgrade /base/socket.io/1/websocket/zrY12uEW88s1LPGrYfTM
DEBUG [proxy]: NOT upgrading proxyWebSocketRequest /base/socket.io/1/websocket/zrY12uEW88s1LPGrYfTM
DEBUG [karma]: A browser has connected on socket zrY12uEW88s1LPGrYfTM
INFO [Chrome 35.0.1916 (Windows 7)]: Connected on socket zrY12uEW88s1LPGrYfTM with id 5 9450547
DEBUG [launcher]: Chrome (id 59450547) captured in 3.039 secs
DEBUG [web-server]: serving: C:\Inetpub\marcos\node_modules\karma\static/context.html
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/node_modules/mocha/mocha.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/node_modules/karma-mocha/lib/adapter.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/javascripts/modernizr.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/jquery/dist/jquery.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/lodash/dist/lodash.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/angular/angular.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/angular-mocks/angular-mocks.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/angular-i18n/angular-locale_pt-br.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/angular-ui-utils/ui-utils.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/magnific-popup/dist/jquery.magnific-popup.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/bluebird/js/browser/bluebird.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/bower_components/chain-commander/lib/chain-commander.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/modules/phery/vendor/phery.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/javascripts/app.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/node_modules/expect.js/index.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/test/client/js/services/currencyStr.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/test/client/js/services/errorlookup.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/test/client/js/services/item.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/test/client/js/services/length.js
DEBUG [web-server]: serving (cached): C:/Inetpub/marcos/test/client/js/services/percentage.js
DEBUG [karma]: Run complete, exitting.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir F:\Users\Paulo\AppData\Local\Temp\karma-59450547

my config is the following:

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

    // base path, that will be used to resolve files and exclude
    basePath  : '../../../',

    // frameworks to use
    frameworks: ['mocha'],

    // list of files / patterns to load in the browser
    files     : [
      'javascripts/modernizr.js',
      'bower_components/jquery/dist/jquery.js',
      'bower_components/lodash/dist/lodash.js',
      'bower_components/angular/angular.js',
      'bower_components/angular-mocks/angular-mocks.js',
      'bower_components/angular-i18n/angular-locale_pt-br.js',
      'bower_components/angular-ui-utils/ui-utils.js',
      'bower_components/magnific-popup/dist/jquery.magnific-popup.js',
      'bower_components/bluebird/js/browser/bluebird.js',
      'bower_components/chain-commander/lib/chain-commander.js',
      'modules/phery/vendor/phery.js',
      'javascripts/app.js',
      'node_modules/expect.js/index.js',
      'test/client/js/**/*.coffee'
    ],

    // list of files to exclude
    exclude   : [
      'test/client/js/services/cep.coffee',
      'test/client/js/services/planner.coffee',
      'test/client/js/services/getobject.coffee',
      'test/client/js/services/collection.coffee'
    ],

    proxies       : { },

    // test results reporter to use
    // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
    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_DEBUG,

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

    browsers      : ['Chrome', 'Firefox'],

    captureTimeout: 60000,

    preprocessors: {
      '**/*.coffee': ['coffee']
    },

    coffeePreprocessor: {
      options: {
        sourceMap: true
      }
    },

    singleRun         : true
  });
};

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sjurbacommented, Jul 2, 2015

For me the fix was disabling Beautify on save for atom-beautify plugin: https://github.com/Glavin001/atom-beautify/issues/440

0reactions
unlightcommented, Dec 15, 2018

Same issue. Happens with karma@3. I’m running my tests using karma-webpack using alternative approach

I add to karma config to files: { pattern: 'src/spec.module.js', included: false, watched: true } No luck, karma logs that file (e.g. app.component.spec.ts) is changed, but it runs old (previous) tests. Rollbacked to karma@2 for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Turn on Cached Exchange Mode - Microsoft Support
To change whether shared folders or Public Folders are downloaded when Cached Exchange Mode is turned on, do the following: Click File >...
Read more >
How to force browsers to reload cached CSS and JS files?
The browser will be able to cache the CSS file, but when you make any changes to your CSS the browser will see...
Read more >
Cache-Control - HTTP - MDN Web Docs
If you want caches to always check for content updates while reusing stored content, no-cache is the directive to use. It does this...
Read more >
Prevent unnecessary network requests with the HTTP Cache
How can you avoid unnecessary network requests? The browser's HTTP Cache is your first line of defense. It's not necessarily the most ...
Read more >
Cache busting in ASP.NET - Mads Kristensen
It will keep serving the same cached version of the file for the next 365 days regardless of any changes you are making...
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