autocomplete-plus icon indicating copy to clipboard operation
autocomplete-plus copied to clipboard

Uncaught TypeError: Arguments to CompositeDisposable.add must have a .dispose() method

Open aasimsani opened this issue 7 years ago • 16 comments

Edit by @rsese to flesh out issue details

Description

There have been a number of "Failed to activate the X package" reports from different packages, some core and some community e.g. https://github.com/atom/autocomplete-atom-api/issues/31, https://github.com/atom/autocomplete-css/issues/95, https://github.com/atom/autocomplete-html/issues/94, https://github.com/James-Yu/Atom-LaTeX/issues/85.

An example stack trace from https://github.com/atom/autocomplete-html/issues/94#issue-364696604:

Failed to activate the autocomplete-html package

At Arguments to CompositeDisposable.add must have a .dispose() method

TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
    at assertDisposable (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/composite-disposable.js:74:19)
    at CompositeDisposable.module.exports.CompositeDisposable.add (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/composite-disposable.js:43:17)
    at Object.consumeProvider (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/autocomplete-plus/lib/main.js:89:27)
    at Object.consumeProvider_2 (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/autocomplete-plus/lib/main.js:62:23)
    at Provider.module.exports.Provider.provide (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/service-hub/lib/provider.js:34:58)
    at ServiceHub.module.exports.ServiceHub.provide (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/service-hub/lib/service-hub.js:30:26)
    at Package.activateServices (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:397:75)
    at Package.activateNow (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:233:20)
    at measure (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:206:33)
    at Package.measure (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:88:25)
    at activationPromise.Promise (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:200:20)
    at new Promise (<anonymous>)
    at Package.activate (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:696:42)
    at packagesToEnable.forEach.name (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:441:51)
    at Array.forEach (<anonymous>)
    at disabledPackagesSubscription.config.onDidChange (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:441:30)
    at emitter.on (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1053:22)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/emitter.js:27:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/emitter.js:156:34)
    at Config.emitChangeEvent (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1212:62)
    at Config.setRawValue (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1038:23)
    at Config.set (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:715:18)
    at Config.removeAtKeyPath (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:891:16)
    at Package.enable (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:75:30)
    at PackageManager.enablePackage (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:247:18)
    at HTMLButtonElement.enablementButtonClickHandler (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/settings-view/lib/package-card.js:362:31)

The error itself wasn't reproducible for a while until it was mentioned in https://github.com/atom/autocomplete-plus/issues/851#issuecomment-430998742 that you can reproduce with https://atom.io/packages/atom-latex.

Steps to Reproduce

  1. Install https://atom.io/packages/atom-latex.
  2. From Settings > Packages > atom-latex, disable and enable atom-latex

Expected behavior: [What you expect to happen]

For the package to disable and enable without error.

Actual behavior: [What actually happens]

Enabling the package throws this error:

Failed to activate the atom-latex package

At Arguments to CompositeDisposable.add must have a .dispose() method

TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
    at assertDisposable (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1175362)
    at CompositeDisposable.add (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1176330)
    at Object.consumeProvider (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:161712)
    at Object.consumeProvider_2 (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:161410)
    at Provider.t.exports.Provider.provide (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14:1029406)
    at ServiceHub.t.exports.ServiceHub.provide (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2927667)
    at Package.activateServices (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2935853)
    at Package.activateNow (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2932908)
    at measure (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2932232)
    at Package.measure (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2929863)
    at activationPromise.activationPromise.Promise (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2932092)
    at new Promise (<anonymous>)
    at Package.activate (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2932035)
    at PackageManager.activatePackage (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:382643)
    at n.forEach.e (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:377877)
    at Array.forEach (<anonymous>)
    at disabledPackagesSubscription.disabledPackagesSubscription.config.onDidChange (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:377861)
    at emitter.on (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:335380)
    at Function.simpleDispatch (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1171816)
    at Emitter.emit (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1173257)
    at Config.emitChangeEvent (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:337868)
    at Config.setRawValue (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:335108)
    at Config.set (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:330902)
    at Config.removeAtKeyPath (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:332925)
    at Package.enable (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:2929648)
    at PackageManager.enablePackage (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:375575)
    at HTMLButtonElement.enablementButtonClickHandler (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14:2919910)

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

First report seems to be this one with Atom 1.17.0 and it's been reported on both macOS and Windows.

Reproduced with the repro steps on macOS 10.12.6 with 1.34.0-nightly18.


Edit by @rsese to add full-er stack trace

Stack trace from https://github.com/atom/autocomplete-html/issues/94#issue-364696604:

Stack Trace

Failed to activate the autocomplete-html package

At Arguments to CompositeDisposable.add must have a .dispose() method

TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
    at assertDisposable (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/composite-disposable.js:74:19)
    at CompositeDisposable.module.exports.CompositeDisposable.add (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/composite-disposable.js:43:17)
    at Object.consumeProvider (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/autocomplete-plus/lib/main.js:89:27)
    at Object.consumeProvider_2 (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/autocomplete-plus/lib/main.js:62:23)
    at Provider.module.exports.Provider.provide (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/service-hub/lib/provider.js:34:58)
    at ServiceHub.module.exports.ServiceHub.provide (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/service-hub/lib/service-hub.js:30:26)
    at Package.activateServices (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:397:75)
    at Package.activateNow (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:233:20)
    at measure (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:206:33)
    at Package.measure (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:88:25)
    at activationPromise.Promise (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:200:20)
    at new Promise (<anonymous>)
    at Package.activate (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:696:42)
    at packagesToEnable.forEach.name (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:441:51)
    at Array.forEach (<anonymous>)
    at disabledPackagesSubscription.config.onDidChange (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:441:30)
    at emitter.on (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1053:22)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/emitter.js:27:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/emitter.js:156:34)
    at Config.emitChangeEvent (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1212:62)
    at Config.setRawValue (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1038:23)
    at Config.set (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:715:18)
    at Config.removeAtKeyPath (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:891:16)
    at Package.enable (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:75:30)
    at PackageManager.enablePackage (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:247:18)
    at HTMLButtonElement.enablementButtonClickHandler (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/settings-view/lib/package-card.js:362:31)

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.17.0 x64 Electron: 1.3.15 OS: Mac OS X 10.12.4 Thrown From: autocomplete-plus package 2.35.3

Stack Trace

Uncaught TypeError: Arguments to CompositeDisposable.add must have a .dispose() method

At /Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/composite-disposable.js:74

TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
    at assertDisposable (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/composite-disposable.js:74:1)
    at CompositeDisposable.module.exports.CompositeDisposable.add (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/composite-disposable.js:43:1)
    at requireAutocompleteManagerAsync (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/main.js:110:1)
    at Immediate.setImmediate (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/main.js:37:1)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)

Commands

     -7:44.3.0 core:save (input.hidden-input)
     -7:01.2.0 command-palette:toggle (input.hidden-input)
     -6:58.7.0 core:confirm (input.hidden-input)
     -6:58.7.0 settings-view:open (input.hidden-input)
  2x -6:47.5.0 core:backspace (input.hidden-input)
  2x -6:44.9.0 core:confirm (input.hidden-input)
  4x -6:09.4.0 core:move-left (input.hidden-input)
     -6:08.5.0 core:backspace (input.hidden-input)
     -6:07.9.0 core:confirm (input.hidden-input)
  2x -5:45.1.0 core:backspace (input.hidden-input)
     -5:44.5.0 core:confirm (input.hidden-input)
  8x -5:33.3.0 core:backspace (input.hidden-input)
  2x -5:30 core:confirm (input.hidden-input)
  2x -0:23.3.0 editor:newline (input.hidden-input)
 20x -0:21.1.0 core:backspace (input.hidden-input)
     -0:10.1.0 core:save (input.hidden-input)

Non-Core Packages

autoclose-html 0.23.0 
autocomplete-python 1.8.63 
black-ui 0.3.2 
busy-signal 1.4.1 
darkpython-syntax 0.5.0 
flask-snippets 0.3.3 
git-plus 7.8.0 
git-plus-toolbar 1.0.1 
hyperclick 0.0.40 
intentions 1.1.2 
kite 0.23.0 
language-babel 2.61.0 
linter 2.1.4 
linter-ui-default 1.5.4 
monokai 0.24.0 
monokai-dark 1.3.0 
now-syntax 0.2.4 
open-terminal-here 2.3.0 
platformio-ide-terminal 2.5.0 
python-debugger 0.2.0 
python-jedi 0.3.8 
react-snippets 0.7.2 
tool-bar 1.1.0 
you-complete-me 0.8.0 

aasimsani avatar May 19 '17 02:05 aasimsani

Hi @aasimsani, what were you doing when this exception occurred?

winstliu avatar May 22 '17 22:05 winstliu

I was trying to write some Babel code while running a web browser plugin.

On May 22, 2017 6:12 PM, "Wliu" [email protected] wrote:

HI @aasimsani https://github.com/aasimsani, what were you doing when this exception occurred?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom/autocomplete-plus/issues/851#issuecomment-303234203, or mute the thread https://github.com/notifications/unsubscribe-auth/ANhsrCSQFEv0Frcd6OHJONu24j9MkpYdks5r8gg4gaJpZM4NgAej .

aasimsani avatar May 22 '17 22:05 aasimsani

Is there any solution for that issue? I can only find duplicates and referenced issues but none has a solution :(

I can't activate autocomplete-plus, autocomplete-atom-api, autocomplete-css, autocomplete-html, autocomplete-snippets and autocomplete clang. All throwing the same error:

"Arguments to CompositeDisposable.add must have a .dispose() method TypeError: Arguments to CompositeDisposable.add must have a .dispose() method at assertDisposable (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/composite-disposable.js:74:19) at CompositeDisposable.module.exports.CompositeDisposable.add (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/composite-disposable.js:43:17) at Object.consumeProvider (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/main.js:89:27) at Object.consumeProvider_2 (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/main.js:62:23) at Provider.module.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app/node_modules/service-hub/lib/provider.js:34:58) at ServiceHub.module.exports.ServiceHub.consume (/Applications/Atom.app/Contents/Resources/app/node_modules/service-hub/lib/service-hub.js:50:24) at Package.activateServices (/Applications/Atom.app/Contents/Resources/app/src/package.js:405:79) at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:233:20) at measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:206:33) at Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:88:25) at activationPromise.Promise (/Applications/Atom.app/Contents/Resources/app/src/package.js:200:20) at Promise () at Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:198:38) at PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:695:42) at packagesToEnable.forEach.name (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:440:51) at Array.forEach (native) at disabledPackagesSubscription.config.onDidChange (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:440:30) at emitter.on (/Applications/Atom.app/Contents/Resources/app/src/config.js:1067:22) at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34) at Config.emitChangeEvent (/Applications/Atom.app/Contents/Resources/app/src/config.js:1226:62) at Config.setRawValue (/Applications/Atom.app/Contents/Resources/app/src/config.js:1052:23) at Config.set (/Applications/Atom.app/Contents/Resources/app/src/config.js:715:18) at Config.removeAtKeyPath (/Applications/Atom.app/Contents/Resources/app/src/config.js:905:16) at Package.enable (/Applications/Atom.app/Contents/Resources/app/src/package.js:75:30) at PackageManager.enablePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:246:18) at HTMLButtonElement.enablementButtonClickHandler (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/package-card.js:362:31)"

Using Atom 1.26.1 on macOS 10.13.4. Just the Core Packages installed and autocomplete-clang (uninstalling makes no difference). This error shows up when trying to activate any autocomplete package (even the core ones). autocomplete-clang isn't working at all.

nixmeer avatar May 07 '18 12:05 nixmeer

The issue is still open so it's not resolved yet @nixmeer and we also don't have steps to reproduce that work on our end. Did you just start seeing this error recently? And is it reproducible for you in safe mode?

rsese avatar May 08 '18 23:05 rsese

Yes, it is the same in safe mode.

I am using Atom for 4 weeks now. I tried to install and use autocomplete-clang. It installed successfully but didn't work. I have not seen any error notification back then. I used Atom just a little since then and used Matlab.

Last week I tried it again. I don't know how but now I see these red error logs. And I discovered that the core autocomplete packages throw the same error. Except if autocomplete-plus is disabled, then the error for all other autocomplete packages is "Cannot read property 'providerManager' of null".

I tried to disable all other core packages so none would be active and then enable the autocomplete-ones, which made no difference. When I re-enabled them (deleting them all from the disabledPackages list in config.cson), only the 5 autocomplete packages would throw that error.

I study electrical engineering, so I'm not deeply into it. Please tell me exactly what I need to do to get you the information you need. I would agree to use any Remote Desktop tool in order to let you figure out what's wrong in case you cannot reproduce it.

nixmeer avatar May 09 '18 06:05 nixmeer

@nixmeer can you try temporarily resetting to factory defaults?

https://flight-manual.atom.io/hacking-atom/sections/debugging/#reset-to-factory-defaults

rsese avatar May 09 '18 22:05 rsese

Does not make any difference.

nixmeer avatar May 10 '18 07:05 nixmeer

I'm facing this issue when enabling/disabling atom-latex repeatedly. Could you please reopen?

dionyziz avatar Oct 18 '18 12:10 dionyziz

@dionyziz - the issue hasn't been closed, it's still open.

I installed atom-latex and after installation I get the error reported in https://github.com/James-Yu/Atom-LaTeX/issues/85 (where I see the maintainers there point to this issue). Not sure if it will help, but I'll share this with the team.

rsese avatar Oct 18 '18 17:10 rsese

Thank you! :)

dionyziz avatar Oct 18 '18 17:10 dionyziz

In order to chase this down, we'll need a complete stack trace from the error. The original stack trace from the top of this issue is certain to not match what you're experiencing. Without the current stack trace, we won't be able to investigate this any further and will have to close this.

lee-dohm avatar Oct 23 '18 20:10 lee-dohm

Grabbed a stack trace from the latest duplicate https://github.com/atom/autocomplete-html/issues/94#issue-364696604, also added to issue body:


Stack Trace

Failed to activate the autocomplete-html package

At Arguments to CompositeDisposable.add must have a .dispose() method

TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
    at assertDisposable (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/composite-disposable.js:74:19)
    at CompositeDisposable.module.exports.CompositeDisposable.add (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/composite-disposable.js:43:17)
    at Object.consumeProvider (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/autocomplete-plus/lib/main.js:89:27)
    at Object.consumeProvider_2 (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/autocomplete-plus/lib/main.js:62:23)
    at Provider.module.exports.Provider.provide (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/service-hub/lib/provider.js:34:58)
    at ServiceHub.module.exports.ServiceHub.provide (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/service-hub/lib/service-hub.js:30:26)
    at Package.activateServices (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:397:75)
    at Package.activateNow (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:233:20)
    at measure (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:206:33)
    at Package.measure (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:88:25)
    at activationPromise.Promise (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:200:20)
    at new Promise (<anonymous>)
    at Package.activate (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:696:42)
    at packagesToEnable.forEach.name (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:441:51)
    at Array.forEach (<anonymous>)
    at disabledPackagesSubscription.config.onDidChange (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:441:30)
    at emitter.on (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1053:22)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/emitter.js:27:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/event-kit/lib/emitter.js:156:34)
    at Config.emitChangeEvent (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1212:62)
    at Config.setRawValue (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:1038:23)
    at Config.set (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:715:18)
    at Config.removeAtKeyPath (~/AppData/Local/atom/app-1.31.0/resources/app/src/config.js:891:16)
    at Package.enable (~/AppData/Local/atom/app-1.31.0/resources/app/src/package.js:75:30)
    at PackageManager.enablePackage (~/AppData/Local/atom/app-1.31.0/resources/app/src/package-manager.js:247:18)
    at HTMLButtonElement.enablementButtonClickHandler (~/AppData/Local/atom/app-1.31.0/resources/app/node_modules/settings-view/lib/package-card.js:362:31)

rsese avatar Oct 24 '18 00:10 rsese

Failed to activate the autocomplete-html package

I'm facing this issue when enabling/disabling autocomplete-html repeatedly.I did this because the plugin is not good at the time.

os:windows 10 64bit

Stack Trace:

Arguments to CompositeDisposable.add must have a .dispose() method

TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
    at assertDisposable (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:1175900)
    at CompositeDisposable.add (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:1176868)
    at Object.consumeProvider (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:161712)
    at Object.consumeProvider_2 (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:161410)
    at Provider.t.exports.Provider.provide (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:14:1030523)
    at ServiceHub.t.exports.ServiceHub.provide (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3011330)
    at Package.activateServices (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3019516)
    at Package.activateNow (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3016571)
    at measure (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3015895)
    at Package.measure (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3013526)
    at activationPromise.activationPromise.Promise (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3015755)
    at new Promise (<anonymous>)
    at Package.activate (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3015698)
    at PackageManager.activatePackage (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:382643)
    at n.forEach.e (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:377877)
    at Array.forEach (<anonymous>)
    at disabledPackagesSubscription.disabledPackagesSubscription.config.onDidChange (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:377861)
    at emitter.on (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:335380)
    at Function.simpleDispatch (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:1172354)
    at Emitter.emit (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:1173795)
    at Config.emitChangeEvent (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:337868)
    at Config.setRawValue (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:335108)
    at Config.set (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:330902)
    at Config.removeAtKeyPath (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:332925)
    at Package.enable (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:3013311)
    at PackageManager.enablePackage (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:11:375575)
    at HTMLButtonElement.enablementButtonClickHandler (C:\Users\Administrator\AppData\Local\atom\app-1.35.1\resources\app\static\<embedded>:14:2922366)

wakeya avatar Mar 21 '19 14:03 wakeya

Hi. Is there any advance in a solution for this issue? https://github.com/apercova/atom-path-intellisense package depends on autocomplete-plus and is having the same issue described in this thread.

Regards.

apercova avatar Jun 27 '19 02:06 apercova

I do not know if this is still relevant, but here's my workaround for this issue:

  • define dispose handler on the provider, ref: https://github.com/codota/tabnine-atom/blob/581a133901483a229901a8b60ea3c6d0e7e39b7c/lib/completion-provider.ts#L81
  • explicitly call dispose from the deactivate handler, ref: https://github.com/codota/tabnine-atom/blob/581a133901483a229901a8b60ea3c6d0e7e39b7c/lib/main.ts#L44

the workaround is based on the fact that the provider.dispose is overridden here: https://github.com/atom/autocomplete-plus/blob/d2a02b1fb7d228b2ea00065d6fe19f96f5731861/lib/provider-manager.js#L271

dimacodota avatar Oct 06 '21 07:10 dimacodota

Anyway, thank you very much

@.***

From: Dima Abramovich Date: 2021-10-06 15:27 To: atom/autocomplete-plus CC: wakeya; Comment Subject: Re: [atom/autocomplete-plus] Uncaught TypeError: Arguments to CompositeDisposable.add must have a .dispose() method (#851) I do not know if this is still relevant, but here's my workaround for this issue: define dispose handler on the provider, ref: https://github.com/codota/tabnine-atom/blob/581a133901483a229901a8b60ea3c6d0e7e39b7c/lib/completion-provider.ts#L81 explicitly call dispose from the deactivate handler, ref: https://github.com/codota/tabnine-atom/blob/581a133901483a229901a8b60ea3c6d0e7e39b7c/lib/main.ts#L44 the workaround is based on the fact that the provider.dispose is overridden here: https://github.com/atom/autocomplete-plus/blob/d2a02b1fb7d228b2ea00065d6fe19f96f5731861/lib/provider-manager.js#L271 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

wakeya avatar Oct 06 '21 08:10 wakeya