Skip to content

Uncaught Error: This socket is closed #1222

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

Closed
techfano opened this issue Mar 23, 2017 · 6 comments · Fixed by #1243
Closed

Uncaught Error: This socket is closed #1222

techfano opened this issue Mar 23, 2017 · 6 comments · Fixed by #1243

Comments

@techfano
Copy link

techfano commented Mar 23, 2017

[Enter steps to reproduce:]

Only when I open this code in my atom editor

import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';

import { DCCCoreService } from '../dcc-utilities/dcc-core.service';

@Injectable()

export class DCCRestApiService {
    constructor(private _http: Http, private _dccCoreService: DCCCoreService) { 
    }

    execute(restApiName:string) {
        let url = this._dccCoreService.getBaseUrl() + '/' + restApiName;
        return this._http.get(url).map(response => response.json());
    }
}

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3
Thrown From: atom-typescript package 11.0.1

Stack Trace

Uncaught Error: This socket is closed

At events.js:160

Error: This socket is closed
    at Socket._writeGeneric (net.js:673:19)
    at Socket._write (net.js:725:8)
    at doWrite (_stream_writable.js:307:12)
    at writeOrBuffer (_stream_writable.js:293:5)
    at Socket.Writable.write (_stream_writable.js:220:11)
    at Socket.write (net.js:651:40)
    at Immediate.setImmediate (/packages/atom-typescript/dist/client/client.js:139:22)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)

Commands

Non-Core Packages

angular-2-typeScript-snippets 0.6.3 
atom-bootstrap3 1.2.12 
atom-typescript 11.0.1 
busy-signal 1.3.0 
intentions 1.1.2 
linter 2.1.0 
linter-ui-default 1.2.1 
@guncha
Copy link
Contributor

guncha commented Mar 23, 2017

What is your Typescript version? The code fragment might be killing the compiler.

@techfano
Copy link
Author

Well I restart atom and that error don't appear anymore

@ericmguimaraes
Copy link

Same here and it also stoped when restart atom.

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Mac OS X 10.12.2
Thrown From: atom-typescript package 11.0.1

Stack Trace

Uncaught Error: This socket is closed

At events.js:160

Error: This socket is closed
    at Socket._writeGeneric (net.js:673:19)
    at Socket._write (net.js:725:8)
    at doWrite (_stream_writable.js:307:12)
    at writeOrBuffer (_stream_writable.js:293:5)
    at Socket.Writable.write (_stream_writable.js:220:11)
    at Socket.write (net.js:651:40)
    at Immediate.setImmediate (/packages/atom-typescript/dist/client/client.js:139:22)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)

Commands

     -0:41.1.0 editor:newline (input.hidden-input)
     -0:40.4.0 core:move-down (input.hidden-input)
     -0:40.1.0 core:move-up (input.hidden-input)
     -0:39.7.0 editor:newline (input.hidden-input)
     -0:39.3.0 core:move-up (input.hidden-input)
     -0:39 core:move-down (input.hidden-input)
     -0:38.7.0 core:move-right (input.hidden-input)
     -0:38.4.0 core:backspace (input.hidden-input)
     -0:38 core:move-up (input.hidden-input)
     -0:37.6.0 snippets:next-tab-stop (input.hidden-input)
     -0:37.6.0 snippets:expand (input.hidden-input)
     -0:37.6.0 editor:indent (input.hidden-input)
     -0:37.2.0 snippets:next-tab-stop (input.hidden-input)
     -0:37.2.0 snippets:expand (input.hidden-input)
     -0:37.2.0 editor:indent (input.hidden-input)
     -0:36.6.0 core:save (input.hidden-input)

Non-Core Packages

atom-typescript 11.0.1 
latex 0.42.0 
linter 1.11.18 
linter-eslint 8.0.0 

@guncha
Copy link
Contributor

guncha commented Mar 25, 2017

Did you install any dependencies while Atom was open? atom-typescript looks up the Typescript compiler from your node_modules and starts a tsserver process and if it crashes, you'll see this error. That might happen when the dependencies are being changed, among other case. Either way, some better error handling is in order.

@ZuBB
Copy link

ZuBB commented Mar 27, 2017

got this almost immediately after issue with JSON that I have reported

@ZuBB
Copy link

ZuBB commented Mar 27, 2017

offtop seem like #1221 is about same..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants