TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

Atom-Typescript error: Server is not running #1478

Closed AndyAlex closed 4 years ago

AndyAlex commented 5 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.32.2 x64 Electron: 2.0.9 OS: Mac OS X 10.12.6 Thrown From: atom-typescript package 12.7.1

Stack Trace

Atom-Typescript error: Server is not running

At Error: Server is not running

Error: Server is not running
    at TypescriptServiceClient.execute (/packages/atom-typescript/dist/client/client.js:86:19)
    at Promise.all.changes.reduceRight (/packages/atom-typescript/dist/main/typescriptBuffer.js:69:33)
    at Array.reduceRight (<anonymous>)
    at TypescriptBuffer.onDidStopChanging (/packages/atom-typescript/dist/main/typescriptBuffer.js:68:39)
    at TypescriptBuffer.subscriptions.add.buffer.onDidStopChanging.arg (/packages/atom-typescript/dist/main/typescriptBuffer.js:86:40)
    at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1186984)
    at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1188425)
    at TextBuffer.emitDidStopChangingEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:501813)
    at later (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:98316)

Commands

     -3:34.5.0 intentions:highlight (input.hidden-input)
  2x -3:34.4.0 editor:move-to-beginning-of-word (input.hidden-input)
     -3:32.5.0 core:move-down (input.hidden-input)
     -3:31.8.0 core:move-up (input.hidden-input)
     -3:31.4.0 core:move-right (input.hidden-input)
     -3:31.3.0 intentions:highlight (input.hidden-input)
  2x -3:31.1.0 editor:move-to-end-of-word (input.hidden-input)
     -3:30.4.0 intentions:highlight (input.hidden-input)
     -3:27.7.0 pane:show-previous-item (input.hidden-input)
     -3:25.7.0 core:move-left (input.hidden-input)
     -3:24 editor:move-to-end-of-screen-line (input.hidden-input)
 14x -3:23.6.0 core:backspace (input.hidden-input)
     -0:08.2.0 pane:show-previous-item (input.hidden-input)
     -0:07.2.0 pane:show-next-item (input.hidden-input)
     -0:06.7.0 core:paste (input.hidden-input)
     -0:06.1.0 core:undo (input.hidden-input)

Non-Core Packages

atom-typescript 12.7.1 
busy-signal 1.4.3 
emmet 2.4.3 
intentions 1.1.5 
linter 2.2.0 
linter-ui-default 1.7.1 
teletype 0.13.3 
lierdakil commented 5 years ago

I've pushed out a new version that should hopefully get rid of a race condition that could potentially lead to this error, but a bit more information could be helpful. Did you restart tsserver? Were there any other messages besides this one displayed?

AndyAlex commented 5 years ago

Crashes randomly. Cant tell if my Mac has something to do with it, but I can say it didn't happen so frequently before the latest update.

lierdakil commented 5 years ago

Thanks for providing some context. Albeit you didn't answer the second question, namely,

Were there any other messages besides this one displayed?

I'm particularly interested in 'TypeScript quit unexpectedly' or something to that tune, specifically the message details -- that might provide some insight into what's happening to the TypeScript server exactly.

Anyway, let us know if you still experience this particular issue in v12.7.2.

AyanGhatak commented 5 years ago

I too am getting this 12.7.3 version. Something was not running for when tried to v12.7.2. Whenever am trying to save one of tsx file.

I get this error:

TypeScript quit unexpectedly

terminated on signal: SIGBUS
Hide Stack Trace
Error: terminated on signal: SIGBUS
    at ChildProcess.cp.once (/Users/****/.atom/packages/atom-typescript/dist/client/client.js:134:19)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

Some loader runs in the staus bar, probably giving an indication of code compilation, once thats done, probably everything runs fine. Too many times clicking save or faster editing, crashes and doest restart unless quit and restarted explicitly.

lierdakil commented 5 years ago

@AyanGhatak, TypeScript server is getting killed by the OS with the signal used for hardware memory errors. So I'm vaguely suspecting a hardware problem there.

Anyway, tsserver is auto-restarted unless it crashes very often (which usually means it's stuck in a crash loop). Regardless, you can restart it manually by running typescript:restart-all-servers command from Atom.

Perhaps this was not the smartest choice, and instead deferring start-up until needed might've been a better option to avoid confusion. I'll think about it.

AndyAlex commented 5 years ago

So far, it's been stable for me. I'll report and attach visuals if I have any problems.

github-actions[bot] commented 4 years ago

This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days