errata-ai / vale-atom

An Atom client for Vale Server.
https://atom.io/packages/vale-server
MIT License
5 stars 1 forks source link

Vale 1.9 update error: Uncaught TypeError: Cannot read property 'split' of undefined #4

Closed brest-amzn closed 3 years ago

brest-amzn commented 3 years ago

I updated to Vale 1.9 after opening this ticket. https://github.com/errata-ai/vale-server/issues/43

Vale installs and launches, but I now get an error in Atom

error2

Atom: 1.53.0 x64 Electron: 6.1.12 OS: Microsoft Windows 10 Enterprise Thrown From: vale-server package 1.7.1

Stack Trace

Uncaught TypeError: Cannot read property 'split' of undefined

At C:\Users\brestivo\.atom\packages\vale-server\lib\init.coffee:20

TypeError: Cannot read property 'split' of undefined
    at handleJSON (/packages/vale-server/lib/init.coffee:20:26)
    at Request._callback (/packages/vale-server/lib/init.coffee:161:27)
    at Request.self.callback (/packages/vale-server/node_modules/request/request.js:185:22)
    at Request.emit (events.js:200:13)
    at /packages/vale-server/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:200:13)
    at /packages/vale-server/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:288:20)
    at IncomingMessage.emit (events.js:205:15)
    at endReadableNT (_stream_readable.js:1154:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)

Commands

 12x -4:50.4.0 intentions:highlight (input.hidden-input)
     -4:49.6.0 settings-view:open (input.hidden-input)
     -4:42.4.0 core:confirm (input.hidden-input)
     -4:36.4.0 core:save (div.package-detail)
     -4:34 intentions:highlight (input.hidden-input)
     -4:34 core:save (input.hidden-input)

Non-Core Packages

atom-live-server 2.3.0 
atomic-vale 1.9.0 
busy-signal 2.0.1 
copy-find-results 0.2.0 
devmind-beautifier 1.3.0 
duplicate-removal 0.1.3 
emmet 2.4.3 
gfm-pdf 0.3.5 
intentions 1.1.5 
jsonlint 1.1.4 
line-ending-converter 1.3.2 
linter 2.3.1 
linter-just-say-no 0.7.5 
linter-markdown 5.2.11 
linter-proselint 3.3.0 
linter-spell 0.15.0 
linter-ui-default 1.8.1 
linter-write-good 0.9.3 
markdown-preview-enhanced 0.18.5 
markdown-to-html 0.5.0 
mr-markdown-pdf 1.6.0 
pandoc-convert 1.1.1 
pandoc-pdf 0.1.0 
platformio-ide-terminal 2.10.0 
pp-markdown 0.0.2 
pretty-json 2.1.2 
split-diff 1.6.1 
status-stats-jbrains 0.6.0 
test undefined 
toggle-gutter 0.3.4 
vale-server 1.7.1 
jdkato commented 3 years ago

Does this happen only on certain file types? I'm having a hard time reproducing the error.

brest-amzn commented 3 years ago

It is happening on all file types (.md, html, txt). It's also occurring for more than one of us, so it's not just me.

jdkato commented 3 years ago

Are you using Compatibility or Command Line (new in v1.9) Mode?

brest-amzn commented 3 years ago

I was using Compatibility mode in previous versions. I noticed this is now gone from the "General Tab". I tried switching my mode in the new menu included in the task bar. However, I am still getting the error on all three options " Server Mode, Compatibility Mode, and Command line"

jdkato commented 3 years ago

I pushed a new release of the Atom package. I don't expect that it'll fix your issue, but I think it should make it easier to understand what's happening.

My guess is that this is related to upgrading the underlying Vale version (the CLI tool), which is now more explicit about configuration errors.

jdkato commented 3 years ago

Quick update here: The latest release:

brest-amzn commented 3 years ago

Thanks. The update provided an error that stated it was having problems finding the directory that the vocab file is in. However, I could not figure out exactly how to fix it, as everything seemed fine when I looked through my directory.

The error went away when I created a new config file with the "add" button on the "projects" page. I simply copied and pasted in my config values from the previous config file one and it started working (not sure what the issue is, since I did not change anything in the file).

brest-amzn commented 3 years ago

I realize now it's being caused by this parameter at the top. Removing it fixes the error. Project = "[my-value]".