philipgiuliani / coverage

Shows the current test coverage of your project in Atom
MIT License
14 stars 3 forks source link

Failed to load the coverage package #18

Open seriema opened 8 years ago

seriema commented 8 years ago

Steps:

  1. Install the plugin
  2. See it crash: screenshot 2015-10-18 14 26 57

Atom Version: 1.0.19 System: Mac OS X 10.11 Thrown From: coverage package, v0.6.1

Stack Trace

Failed to load the coverage package

At Failed to execute 'registerElement' on 'Document': Registration failed for type 'coverage-table-row'. A type with that name is already registered.

Error: Failed to execute 'registerElement' on 'Document': Registration failed for type 'coverage-table-row'. A type with that name is already registered.
  at Error (native)
  at Object.<anonymous> (/Users/john-philipjohansson/.atom/packages/coverage/lib/table-row.coffee:58:27)
  at Object.<anonymous> (/Users/john-philipjohansson/.atom/packages/coverage/lib/table-row.coffee:1:1)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (/Users/john-philipjohansson/.atom/packages/coverage/lib/panel-view.coffee:1:12)
  at Object.<anonymous> (/Users/john-philipjohansson/.atom/packages/coverage/lib/panel-view.coffee:1:1)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (/Users/john-philipjohansson/.atom/packages/coverage/lib/coverage.coffee:4:13)
  at Object.<anonymous> (/Users/john-philipjohansson/.atom/packages/coverage/lib/coverage.coffee:1:1)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:761:34)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:192:28
  at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:169:15)
  at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:183:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:405:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:485:30)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:371:29
  at exit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:60:16)
  at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
  at ChildProcess.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:235:18)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:172:7)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

     -3:30.5.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -3:19.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -3:18.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:18.4.0 lcov-info:toggle (atom-text-editor.editor)
     -2:51.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:23.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:22.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:14.8.0 pane:show-next-item (atom-text-editor#coverage-gutter.pathToLCOV.editor.mini.is-focused)
     -1:14.1.0 pane:show-previous-item (atom-text-editor.editor.is-focused)
     -0:49 pane:show-next-item (atom-text-editor#coverage-gutter.pathToLCOV.editor.mini.is-focused)
     -0:47.5.0 pane:show-previous-item (atom-text-editor.editor.is-focused)
     -0:45.8.0 pane:show-next-item (div.settings-view.pane-item)
     -0:44.7.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:41.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:41.8.0 testcoverage:show (atom-text-editor.editor)
     -0:23.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "themes": [
      "atom-dark-ui",
      "monokai"
    ],
    "disabledPackages": [
      "atom-jshint",
      "js-refactor",
      "ionide-fsharp",
      "atom-fsharp",
      "lcov-info"
    ],
    "packagesWithKeymapsDisabled": []
  }
}

Installed Packages

# User
atom-beautify, v0.28.14
caniuse, v0.5.5
coverage, v0.6.1
editorconfig, v1.2.0
linter, v1.8.1
linter-csslint, v1.1.0
linter-jscs, v3.1.1
linter-jshint, v1.2.1
linter-less, v2.2.0
monokai, v0.18.0
refactor, v0.6.0
wakatime, v5.0.0
wordcount, v2.3.0

# Dev
refactor, v0.4.1
philipgiuliani commented 8 years ago

Looks like the package would have been loaded twice. Did a restart of the editor fix the problem? I will try to reproduce it.

seriema commented 8 years ago

I think so. But I can't toggle with the shortcut command that's shown in those settings, I need to run it with Atom's package runner.

philipgiuliani commented 8 years ago

ctrl-alt-c is not working for you? Maybe its conflicting with another package? Can you check what happens in the Key Binding Resolver? You can open it with cmd + ..

Thanks for your help!

seriema commented 8 years ago

I reinstalled and the keybindings work. I can't test the actual coverage data though since I don't use coverage.json. Was just curious and ended up with the error I reported. ^^

lslezak commented 8 years ago

It seems to be caused by a conflict with the lcov-info package. I have created a PR to fix this issue there (https://github.com/jacogr/atom-lcov-info/pull/35).

As a workaround you could try uninstalling the lcov-info package. (In the initial description it is listed in the disabledPackages section, maybe some parts are still loaded :question: :confused:)