Skip to content
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

Uncaught SyntaxError: Unexpected end of input #2470

Closed
vscodeerrors opened this issue Jan 27, 2016 · 6 comments
Closed

Uncaught SyntaxError: Unexpected end of input #2470

vscodeerrors opened this issue Jan 27, 2016 · 6 comments
Assignees
Labels
error-telemetry VS Code - Issues generated by telemetry verified Verification succeeded
Milestone

Comments

@vscodeerrors
Copy link

Issue Id: 3c0f493a-37c5-196b-ce04-755343aba4db

Versions
- 0.10.6-release
- dfc08dc
Stack
SyntaxError: Unexpected end of input
at Object.parse (native)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L129:21 (V8Protocol.dispatch)](https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/workbench/parts/debug/node/v8Protocol.ts#L129:21 %28V8Protocol.dispatch%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L108:11 (V8Protocol.handleData)](https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/workbench/parts/debug/node/v8Protocol.ts#L108:11 %28V8Protocol.handleData%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L63:8 (V8Protocol.connect)](https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/workbench/parts/debug/node/v8Protocol.ts#L63:8 %28V8Protocol.connect%29)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at Pipe.onread (net.js:523:20)

@vscodeerrors vscodeerrors added the error-telemetry VS Code - Issues generated by telemetry label Jan 27, 2016
@weinand
Copy link
Contributor

weinand commented Feb 3, 2016

@isidorn Most likely this occurs if the debug-adapter is terminated while still sending data. The debug UI should catch exceptions thrown in the JSON parse and terminate the debug session. I expect that the debug session in many cases is already in the process of being shut down (and has actually terminated the debug adapter in the first place).

@weinand weinand assigned isidorn and unassigned weinand Feb 3, 2016
@isidorn
Copy link
Contributor

isidorn commented Feb 3, 2016

@weinand I can do that, though terminating a session just because JSON parse fails might be a bit too harsh, no? This could produce weird behavior for other adapter which might be in development and are sending broken jsons. Shouldn't we just ignore the event if we think the debug adapter is going down anyways.

@isidorn
Copy link
Contributor

isidorn commented Feb 5, 2016

@weinand just to remind you about this.

@isidorn isidorn added this to the Feb 2016 milestone Feb 5, 2016
@weinand
Copy link
Contributor

weinand commented Feb 5, 2016

@isidorn right, when the session is going down anyways, we can ignore the exception. In other cases, we should let the error ripple up and terminate the session with a corresponding error message. We should then self-host on this and get a feel for how often that happens. If it happens too often, we can disable that behaviour in the product. Just silently ignoring the exception in all cases is a bit dangerous...

@isidorn isidorn closed this as completed in 578d067 Feb 5, 2016
@isidorn
Copy link
Contributor

isidorn commented Feb 5, 2016

Makes sense, I have pushed it so we try it out. I append stopping debug adapter at the end so it is more clear to the user what is going on

screen shot 2016-02-05 at 12 25 25

@weinand
Copy link
Contributor

weinand commented Feb 5, 2016

👍🏽

@isidorn isidorn added the verified Verification succeeded label Feb 26, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
error-telemetry VS Code - Issues generated by telemetry verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants