-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
TypeScript Service: canceled request with sequence number #15028
Comments
I can reproduce this reliably in my project. I turned on debugging in tsserver.js and it appears to be getting stuck in some kind of infinite loop. I suspect it is eventually terminating due to a stack overflow or something of the sort. I can't get the node debugger to print a full stack trace but every time I pause it in the bowels of the request I get something that looks like: #0 tsserver.js:29018:17 I will attach the version of tsserver.js that I am using (I had to change the extension to txt to make Github happy). The infinite loop is always in response to a quickinfo request. |
I also cannot reproduce this on 2.2.2 with the exact same behavior. I will try and narrow down the versions affected. |
Fails on 2.3.0, 2.3.1, and 2.3.2 so it definitely seems to be a result of changes added as part of 2.3. |
Dug up the stack trace a little and it seems to start here: #0 tsserver.js:33372:37 |
@westonpace Based on your stack trace, this looks like a long recursion in
@sandersn pointed out that this is similar to #15443, in that it only fails in ts2.3+, and (as of #15519) it only fails in services, not in batch compilation. Could you check that you're using |
I tried with |
For me the problem still occurs in However some kind of memory related issue is probable as I fail to create smaller repro projects but I do experience it in multiple larger projects. Edit:
|
@Pajn What version of VScode are you using? VSCode 1.13 fixed some cancellation issues |
@mjbvz I'm using a fully updated VSCode, version 1.13.1 |
To reiterate my comment in #15716 (comment), we are looking for a code sample that can reproduce this problem. It probably has to do with the particular symbol you are hovering over for quick info. |
I will try and take a look later this week.
…On Wed, Jul 12, 2017 at 12:16 PM Andy ***@***.***> wrote:
To reiterate my comment in #15716 (comment)
<#15716 (comment)>,
we are looking for a code sample that can reproduce this problem. It
probably has to do with the particular symbol you are hovering over for
quick info.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15028 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABnhXbYbJJs4E967isUFO2hVFYgFahxPks5sNQ1_gaJpZM4M0hXG>
.
|
react-apollo seems to be especially effected, nearly always when I ctrl+hover or go to definition on things from it, the TS server goes into this state.
It might not happen every time, but often. Try ctrl+hover on graphql (line 4) as well. |
Thanks @Pajn! It looks like in your case there is a problem with (alias) graphql<TResult = {}, TProps = {}, TChildProps = TProps & {
data?: (QueryProps & TResult) | undefined;
mutate?: ((opts: MutationOpts) => Promise<{
data: TResult;
loading: boolean;
networkStatus: NetworkStatus;
stale: boolean;
}>) | undefined;
}>(document: {
kind: "Document";
loc?: {
start: number;
end: number;
startToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
endToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
source: Source;
} | undefined;
definitions: ({
kind: "OperationDefinition";
loc?: {
start: number;
end: number;
startToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
endToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
source: Source;
} | undefined;
operation: "query" | "mutation" | "subscription";
name?: {
kind: "Name";
loc?: {
start: number;
end: number;
startToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
endToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
source: Source;
} | undefined;
value: string;
} | undefined;
variableDefinitions?: {
kind: "VariableDefinition";
loc?: {
start: number;
end: number;
startToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
endToken: {
kind: "<SOF>" | "<EOF>" | "!" | "$" | "(" | ")" | "..." | ":" | "=" | "@" | "[" | "]" | "{" | "|" | "}" | "Name" | "Int" | "Float" | "String" | "Comment";
start: number;
end: number;
line: number;
column: number;
value: string | undefined;
prev?: Token | undefined;
next?: Token | undefined;
};
source: Source;
} | undefined;
variable: {
kind: "Variable";
loc?: {
start: number;
... |
That sounds like the problem. I usually see this in big codebases and I usually prefer type to interface which would aggravate the problem. |
Fix is up in #17433. Would that be acceptable to close this issue? |
Most likely I would think so yes. I can try a nightly build when it has landed to verify, if there isn't a simple way to test it from the PR branch. |
closed by #17433. |
TypeScript Version: 2.2.2
This is a continuation of #10735.
I tried to create a repo but failed, however I have it happening in multiple larger projects so the bug is there but I can't say what is causing it.
I tried to capture a tssever log file as @mhegazy suggested but as soon as it happened, the tsserver destroyed it completely and filled it with null bytes.
Hexdump:
The none-null bytes reads as (the null bytes are between the Info rows):
This is the trace from vscode
tsserver.log when just having caused the bug but before tsserver hangs or crashed (before the request times out?)
https://gist.github.com/Pajn/706265d7f61e89bab5b3bcfe93ce068d
In this particular project it seems like I can reproduce it every time by doing go to definition in a specific JSX element.
The text was updated successfully, but these errors were encountered: