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

Failed to activate the omnisharp-atom package #1023

Closed
CarterWilde opened this issue Apr 7, 2018 · 22 comments
Closed

Failed to activate the omnisharp-atom package #1023

CarterWilde opened this issue Apr 7, 2018 · 22 comments

Comments

@CarterWilde
Copy link

  1. Start atom

Atom: 1.25.1 x64
Electron: 1.7.11
OS: Microsoft Windows 10 Home
Thrown From: omnisharp-atom package 0.31.2

Stack Trace

Failed to activate the omnisharp-atom package

At atom.grammars.startIdForScope is not a function

TypeError: atom.grammars.startIdForScope is not a function
    at grammarCb (/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
    at arrayEach (/packages/omnisharp-atom/node_modules/lodash/lodash.js:508:11)
    at forEach (/packages/omnisharp-atom/node_modules/lodash/lodash.js:9334:14)
    at OmniSharpAtom.activate (/packages/omnisharp-atom/dist/omnisharp-atom.js:153:30)
    at Package.activateNow (~/AppData/Local/atom/app-1.25.1/resources/app/src/package.js:230:33)
    at measure (~/AppData/Local/atom/app-1.25.1/resources/app/src/package.js:206:33)
    at Package.measure (~/AppData/Local/atom/app-1.25.1/resources/app/src/package.js:88:25)
    at activationPromise.Promise (~/AppData/Local/atom/app-1.25.1/resources/app/src/package.js:200:20)
    at Promise (<anonymous>)
    at Package.activate (~/AppData/Local/atom/app-1.25.1/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (~/AppData/Local/atom/app-1.25.1/resources/app/src/package-manager.js:695:42)
    at config.transactAsync (~/AppData/Local/atom/app-1.25.1/resources/app/src/package-manager.js:670:36)
    at Config.transactAsync (~/AppData/Local/atom/app-1.25.1/resources/app/src/config.js:862:28)
    at PackageManager.activatePackages (~/AppData/Local/atom/app-1.25.1/resources/app/src/package-manager.js:668:23)
    at PackageManager.activate (~/AppData/Local/atom/app-1.25.1/resources/app/src/package-manager.js:647:50)
    at loadStatePromise.loadState.then (~/AppData/Local/atom/app-1.25.1/resources/app/src/atom-environment.js:867:27)
    at <anonymous>

Commands

Non-Core Packages

atom-clock 0.1.16 
atom-dark-minimal-ui 0.5.8 
atom-ide-ui 0.9.4 
busy-signal 1.4.3 
city-lights-syntax 1.1.8 
city-lights-ui 1.3.3 
file-icons 2.1.18 
highlight-selected 0.13.1 
ide-csharp 0.6.2 
ide-json 0.2.1 
intentions 1.1.5 
language-cshtml 0.3.0 
language-sqf 0.3.0 
linter 2.2.0 
linter-ui-default 1.7.1 
minimap 4.29.8 
minimap-bookmarks 0.4.2 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-selection 4.5.0 
omnisharp-atom 0.31.2 
platformio-ide-terminal 2.8.1 
sass-autocompile 0.13.5 
teletype 0.12.0 
@tomuxmon
Copy link

tomuxmon commented Apr 9, 2018

same here on ubuntu 16.04:

TypeError: atom.grammars.startIdForScope is not a function at grammarCb (/home/tomuxmon/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35) at arrayEach (/home/tomuxmon/.atom/packages/omnisharp-atom/node_modules/lodash/lodash.js:508:11) at forEach (/home/tomuxmon/.atom/packages/omnisharp-atom/node_modules/lodash/lodash.js:9334:14) at OmniSharpAtom.activate (/home/tomuxmon/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:153:30) at Package.activateNow (/usr/share/atom/resources/app/src/package.js:230:33) at measure (/usr/share/atom/resources/app/src/package.js:206:33) at Package.measure (/usr/share/atom/resources/app/src/package.js:88:25) at activationPromise.Promise (/usr/share/atom/resources/app/src/package.js:200:20) at Promise (<anonymous>) at Package.activate (/usr/share/atom/resources/app/src/package.js:198:38) at PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:695:42) at /usr/share/atom/resources/app/node_modules/settings-view/lib/package-manager.js:491:35 at exit (/usr/share/atom/resources/app/node_modules/settings-view/lib/package-manager.js:128:22) at triggerExitCallback (/usr/share/atom/resources/app/src/buffered-process.js:267:15) at bufferStream (/usr/share/atom/resources/app/src/buffered-process.js:288:15) at Socket.stream.on (/usr/share/atom/resources/app/src/buffered-process.js:164:13) at emitOne (events.js:101:20) at Socket.emit (events.js:191:7) at Pipe._handle.close [as _onclose] (net.js:510:12)

@hoaihuongbk
Copy link

Same for Ubuntu 17.10

@dweslynch
Copy link

Same here, also win10, same version of everything - only non-core package is teletype

@CarterWilde
Copy link
Author

What build of windows are you on? I'm on build 16299 (Version 10.0.16299)

@Eyap53
Copy link

Eyap53 commented Apr 17, 2018

Same for me on Ubuntu 16.04 as well.

**Atom**: 1.25.0 x64
**Electron**: 1.7.11
**OS**: Ubuntu 16.04.4
**Thrown From**: [omnisharp-atom](https://github.com/OmniSharp/omnisharp-atom) package 0.31.2

Failed to activate the omnisharp-atom package

I got the same stack trace as tomuxmon, so i don't repaste it.

@ArnaudValensi
Copy link

Same for me on OSX.

@Maximegau
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.25.1 x64
Electron: 1.7.11
OS: Mac OS X 10.12.6
Thrown From: omnisharp-atom package 0.31.2

Stack Trace

Failed to activate the omnisharp-atom package

At atom.grammars.startIdForScope is not a function

TypeError: atom.grammars.startIdForScope is not a function
    at grammarCb (/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
    at arrayEach (/packages/omnisharp-atom/node_modules/lodash/lodash.js:508:11)
    at forEach (/packages/omnisharp-atom/node_modules/lodash/lodash.js:9334:14)
    at OmniSharpAtom.activate (/packages/omnisharp-atom/dist/omnisharp-atom.js:153:30)
    at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:230:33)
    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 (<anonymous>)
    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 /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/package-manager.js:491:35
    at exit (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/package-manager.js:128:22)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:267:15)
    at bufferStream (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:280:15)
    at Socket.stream.on (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:164:13)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:191:7)
    at Pipe._handle.close [as _onclose] (net.js:510:12)

Commands

  3x -1:14.5.0 core:backspace (input.hidden-input)

Non-Core Packages

lazy-unity-helper 0.1.0 
omnisharp-atom 0.31.2 
teletype 0.12.1 

@Eyap53
Copy link

Eyap53 commented Apr 24, 2018

Same issue as #1020

@tqtran7
Copy link

tqtran7 commented Apr 29, 2018

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.26.1 x64
Electron: 1.7.11
OS: Microsoft Windows 10 Pro
Thrown From: omnisharp-atom package 0.31.2

Stack Trace

Failed to activate the omnisharp-atom package

At atom.grammars.startIdForScope is not a function

TypeError: atom.grammars.startIdForScope is not a function
    at grammarCb (/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
    at arrayEach (/packages/omnisharp-atom/node_modules/lodash/lodash.js:516:11)
    at forEach (/packages/omnisharp-atom/node_modules/lodash/lodash.js:9342:14)
    at OmniSharpAtom.activate (/packages/omnisharp-atom/dist/omnisharp-atom.js:153:30)
    at Package.activateNow (<embedded>:72542:33)
    at measure (<embedded>:72518:33)
    at Package.measure (<embedded>:72400:25)
    at activationPromise.Promise (<embedded>:72512:20)
    at Promise (<anonymous>:null:null)
    at Package.activate (<embedded>:72510:38)
    at PackageManager.activatePackage (<embedded>:25755:42)
    at <embedded>:56239:35
    at exit (<embedded>:55876:22)
    at triggerExitCallback (<embedded>:130424:15)
    at ChildProcess.process.on (<embedded>:130454:15)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Commands

     -3:48.4.0 application:add-project-folder (div.tool-panel.tree-view)
     -3:13.6.0 core:confirm (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.9 
busy-signal 1.4.3 
intentions 1.1.5 
linter 2.0.0 
linter-eslint 8.4.0 
linter-ui-default 1.6.10 
omnisharp-atom 0.31.2 
platformio-ide-terminal 2.8.1 
todo-show 2.1.0 

@doctorgicu
Copy link

same here on: Linux Mint 18.3 Sylvia 64-bit

After installation i got:

atom.grammars.startIdForScope is not a function
Hide Stack Trace
TypeError: atom.grammars.startIdForScope is not a function
at grammarCb (/home/giuseppe/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:145:35)
at arrayEach (/home/giuseppe/.atom/packages/atom-beautify/node_modules/lodash/lodash.js:516:11)
at forEach (/home/giuseppe/.atom/packages/atom-beautify/node_modules/lodash/lodash.js:9342:14)
at OmniSharpAtom.activate (/home/giuseppe/.atom/packages/omnisharp-atom/dist/omnisharp-atom.js:153:30)
at Package.activateNow (/usr/share/atom/resources/app/src/package.js:230:33)
at measure (/usr/share/atom/resources/app/src/package.js:206:33)
at Package.measure (/usr/share/atom/resources/app/src/package.js:88:25)
at activationPromise.Promise (/usr/share/atom/resources/app/src/package.js:200:20)
at Promise ()
at Package.activate (/usr/share/atom/resources/app/src/package.js:198:38)
at PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:695:42)
at /usr/share/atom/resources/app/node_modules/settings-view/lib/package-manager.js:491:35
at exit (/usr/share/atom/resources/app/node_modules/settings-view/lib/package-manager.js:128:22)
at triggerExitCallback (/usr/share/atom/resources/app/src/buffered-process.js:267:15)
at bufferStream (/usr/share/atom/resources/app/src/buffered-process.js:288:15)
at Socket.stream.on (/usr/share/atom/resources/app/src/buffered-process.js:164:13)
at emitOne (events.js:101:20)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:510:12)

@Eyap53
Copy link

Eyap53 commented May 2, 2018

Solved thanks to @koxu1996 and @Skehmatics in #1020. Solution also posted in #1025.
Code :

replace l.140 by : var grammars = atom.grammars.textmateRegistry || atom.grammars;
and l.145 by : grammars.startIdForScope(grammar.scopeName);

@bgattet
Copy link

bgattet commented Jun 13, 2018

is the fix in ? It still does it for me

@CarterWilde
Copy link
Author

No, it still does it for me also.

@brundonsmith
Copy link

Same here, Windows 10

@NullVoxPopuli
Copy link

Same here: error still present, Ubuntu 18.04

@Gslaughl
Copy link

Gslaughl commented Jul 6, 2018

Same, Sierra 10.12.6

@takochako
Copy link

takochako commented Jul 9, 2018

Same. Windows 10, version 1709, build 16299.492. I don't know if it will be fixed though. The Omnisharp-Atom project looks like it's been abandoned since it's been over a year since the last release.

@CarterWilde
Copy link
Author

CarterWilde commented Jul 10, 2018

@takochako I looks like they have abandoned this project. The same thing happened with
omnisharp-sublime. The only one they still support seems to be omnisharp-vscode.

@SierraKoda
Copy link

SierraKoda commented Aug 28, 2018

@Eyap53 gave y'all the info. Will vouche. Works now after edit ~Parrot OS [Mate Structure]

@LloydNicholson
Copy link

Still doesn't work for me on MacOS.

@ro-tex
Copy link

ro-tex commented Oct 6, 2018

I used the solution by @Eyap53 with one addition.

Original solution:
Find omnisharp-atom.js in your ~/.atom dir and change line 140
from var grammars = atom.grammars;
to var grammars = atom.grammars.textmateRegistry || atom.grammars;.

Addition:
Change line 145
from atom.grammars.startIdForScope(grammar.scopeName);
to grammars.startIdForScope(grammar.scopeName);
Change line 154
from this.disposable.add(atom.grammars.onDidAddGrammar(grammarCb));
to this.disposable.add(grammars.onDidAddGrammar(grammarCb));

@Ultrahero
Copy link

I still have the issue: Arguments to CompositeDisposable.add must have a .dispose() method
This is the console:

    at assertDisposable (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:1189015)
    at CompositeDisposable.add (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:1189983)
    at Object.consumeProvider (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:161428)
    at Object.consumeProvider_2 (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:161126)
    at Provider.t.exports.Provider.provide (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:14:1034504)
    at ServiceHub.t.exports.ServiceHub.provide (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3024478)
    at Package.activateServices (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3032664)
    at Package.activateNow (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3029719)
    at measure (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3029043)
    at Package.measure (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3026674)
    at activationPromise.activationPromise.Promise (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3028903)
    at new Promise (<anonymous>)
    at Package.activate (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3028846)
    at PackageManager.activatePackage (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:378471)
    at n.forEach.e (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:373705)
    at Array.forEach (<anonymous>)
    at disabledPackagesSubscription.disabledPackagesSubscription.config.onDidChange (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:373689)
    at emitter.on (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:331211)
    at Function.simpleDispatch (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:1185469)
    at Emitter.emit (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:1186910)
    at Config.emitChangeEvent (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:333699)
    at Config.setRawValue (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:330939)
    at Config.set (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:326733)
    at Config.removeAtKeyPath (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:328756)
    at Package.enable (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:3026459)
    at PackageManager.enablePackage (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:11:371403)
    at HTMLButtonElement.enablementButtonClickHandler (C:\Users\user\AppData\Local\atom\app-1.32.0\resources\app\static\<embedded>:14:2933579)```

Does anyone know hot to solve this?

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