bartosz-antosik / vscode-spellright

Multilingual, Offline and Lightweight Spellchecker for Visual Studio Code
Other
360 stars 37 forks source link

Failed to activate the extension #446

Open Alecton4 opened 3 years ago

Alecton4 commented 3 years ago

I installed the extension today without any configuration. And the Log(Extension Host) shows the following error:

[2021-08-11 20:47:23.150] [exthost] [error] Activating extension ban.spellright failed due to an error:
[2021-08-11 20:47:23.151] [exthost] [error] TypeError: Cannot read property 'Spellchecker' of null
    at Object.<anonymous> (d:\yzhao\.vscode\extensions\ban.spellright-3.0.60\lib\bindings.js:46:25)
    at Module.u._compile (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\loader.js:4:1248)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Function.o._load (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:105:27791)
    at Function.E._load (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:105:24509)
    at Function.a._load (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:95:59194)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at v (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\loader.js:4:694)
    at Object.<anonymous> (d:\yzhao\.vscode\extensions\ban.spellright-3.0.60\src\spellright.js:18:18)
    at Module.u._compile (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\loader.js:4:1248)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Function.o._load (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:105:27791)
    at Function.E._load (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:105:24509)
    at Function.a._load (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:95:59194)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at v (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\loader.js:4:694)
    at activate (d:\yzhao\.vscode\extensions\ban.spellright-3.0.60\src\extension.js:21:24)
    at Function._callActivateOptional (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:14382)
    at Function._callActivate (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:14051)
    at c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:12203
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 2)
    at async Promise.all (index 0)

And my system environment is:

Version: 1.55.2 (system setup)
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:35:57.887Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19043

Thank you very much.

crystalfp commented 3 years ago

I had a similar problem, but was generated because I was using "en" in "spellright.language" and "en-US" in "spellright.languageContextByClass": {"typescript": {"comments": ["en-US"]}}, Hope it helps.

... But still does not spellcheck my typescript comments.

Alecton4 commented 3 years ago

I had a similar problem, but was generated because I was using "en" in "spellright.language" and "en-US" in "spellright.languageContextByClass": {"typescript": {"comments": ["en-US"]}}, Hope it helps.

... But still does not spellcheck my typescript comments.

Thanks. I updated my code from 1.55.2 to the latest 1.59.0 version and the extension seems to work properly.

But Log(Extension Host) still gives error as below:

[2021-08-12 09:12:25.235] [exthost] [error] ReferenceError: SpellRight is not defined
    at Object.deactivate (d:\yzhao\.vscode\extensions\ban.spellright-3.0.60\src\extension.js:44:5)
    at v._deactivate (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:11286)
    at c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:10000
    at Array.map (<anonymous>)
    at v.deactivateAll (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:9988)
    at P.terminate (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:725)
    at h (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:104:32088)
    at Socket.<anonymous> (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:104:29731)
    at Socket.emit (events.js:327:22)
    at Pipe.<anonymous> (net.js:673:12)
[2021-08-12 09:12:25.236] [exthost] [error] TypeError: Cannot read property 'dispose' of null
    at SpellRight.dispose (d:\yzhao\.vscode\extensions\ban.spellright-3.0.60\src\spellright.js:67:26)
    at l (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:14:4943)
    at v._deactivate (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:11421)
    at c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:10000
    at Array.map (<anonymous>)
    at v.deactivateAll (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:9988)
    at P.terminate (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:725)
    at h (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:104:32088)
    at Socket.<anonymous> (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:104:29731)
    at Socket.emit (events.js:327:22)
    at Pipe.<anonymous> (net.js:673:12)
[2021-08-12 09:12:25.236] [exthost] [error] Error: Encountered errors while disposing of store. Errors: [TypeError: s.dispose is not a function, TypeError: s.dispose is not a function]
    at l (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:14:5019)
    at v._deactivate (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:11421)
    at c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:10000
    at Array.map (<anonymous>)
    at v.deactivateAll (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:9988)
    at P.terminate (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:725)
    at h (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:104:32088)
    at Socket.<anonymous> (c:\Program_Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:104:29731)
    at Socket.emit (events.js:327:22)
    at Pipe.<anonymous> (net.js:673:12)

My new system environment is:

Version: 1.59.0 (system setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.19043
dcrobertson01 commented 3 years ago

I cannot get it to work either. Where can I check for the configuration mentioned above? I can't find anything like that.

Also, the docs say "Spell Right cannot automatically match the dictionary name with system locale settings when using Hunspell dictionaries hence at first run dictionary has to be selected manually (e.g from status bar)."

I don't see anything in the status bar that would let me select a dictionary.

Running on Kubuntu.

sedme0 commented 3 years ago

I had a very similar issue. The issue for me was that I was running an old version of Spell Right (v3.0.56) because that's the latest version that's in the Open VSX Registry. Downloading and installing the VSIX for v3.0.60 directly from the Visual Studio Marketplace seems to have fixed all of my problems.