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

TypeError: Cannot read property 'shutdown' of undefined #81821

Closed
bpasero opened this issue Oct 2, 2019 · 11 comments · Fixed by #83788
Closed

TypeError: Cannot read property 'shutdown' of undefined #81821

bpasero opened this issue Oct 2, 2019 · 11 comments · Fixed by #83788
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug integration-test-failure terminal Integrated terminal issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Oct 2, 2019

From https://dev.azure.com/monacotools/Monaco/_build/results?buildId=59149&view=logs&j=a5e52b91-c83f-5429-4a68-c246fc63a4f7&t=a83823bd-5dbd-5313-d0d6-a425f162cca0&l=1185

Cannot read property 'shutdown' of undefined: TypeError: Cannot read property 'shutdown' of undefined
	at y.$acceptProcessShutdown (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:612:558)
	at f._doInvokeHandler (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:636:275)
	at f._invokeHandler (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:635:971)
	at f._receiveRequest (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:634:639)
	at f._receiveOneMessage (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:633:468)
	at _protocol.onMessage.e (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:631:691)
	at l.fire (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:50:519)
	at _.fire (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:181:274)
	at e.onMessage.e (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:788:104)
	at l.fire (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:50:519)
	at _.fire (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:181:274)
	at t.PersistentProtocol._receiveMessage (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:185:629)
	at _socketDisposables.push._socketReader.onMessage.e (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:182:824)
	at l.fire (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:50:519)
	at f.acceptChunk (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:178:588)
	at _register._socket.onData.e (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:177:958)
	at Socket.t (/Users/vsts/agent/2.155.1/work/1/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:187:68)
	at Socket.emit (events.js:182:13)
	at addChunk (_stream_readable.js:283:12)
	at readableAddChunk (_stream_readable.js:264:11)
	at Socket.Readable.push (_stream_readable.js:219:10)
	at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

@bpasero
Copy link
Member Author

bpasero commented Oct 2, 2019

Not sure if related, but there is also:

n.charCodeAt is not a function: TypeError: n.charCodeAt is not a function
  at e.onMessage.e (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:806:104)
   at l.fire (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:50:519)
   at _.fire (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:181:274)
   at t.PersistentProtocol._receiveMessage (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:185:629)
   at _socketDisposables.push._socketReader.onMessage.e (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:182:824)
   at l.fire (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:50:519)
   at p.acceptChunk (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:178:588)
   at _register._socket.onData.e (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:177:958)
   at Socket.t (/Users/vsts/agent/2.155.1/work/1/vscode-reh-darwin/out/vs/server/remoteExtensionHostProcess.js:187:68)
   at Socket.emit (events.js:182:13)
   at addChunk (_stream_readable.js:283:12)
   at readableAddChunk (_stream_readable.js:264:11)
   at Socket.Readable.push (_stream_readable.js:219:10)
   at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

@alexdima
Copy link
Member

alexdima commented Oct 2, 2019

@bpasero Do you have source maps with those stack traces? The first one (found via the unique $acceptProcessShutdown) is:

public $acceptProcessShutdown(id: number, immediate: boolean): void {
this._terminalProcesses[id].shutdown(immediate);
}

I cannot comment about the second stacktrace since I cannot pinpoint charCodeAt / fire... @bpasero we would need to convert those stack traces and then based on the result assign someone from the team...

@alexdima alexdima assigned Tyriar and unassigned alexdima Oct 2, 2019
@Tyriar
Copy link
Member

Tyriar commented Oct 2, 2019

n.charCodeAt is not a function: TypeError: n.charCodeAt is not a function

@alexandrudima I've been seeing this one on and off for months on web, I think it also showed up running the web smoke tests. Looks like a separate issue to the 'shutdown' one though.

@alexdima
Copy link
Member

alexdima commented Oct 2, 2019

Does it reproduce when running the smoke test from source? Because then we could get a stack trace and identify the owner :).

@bpasero
Copy link
Member Author

bpasero commented Oct 3, 2019

@alexandrudima the commit ID of that build seems to be 8eaec303ea9b12291540e729ad32b930169e67a4 and as such the sourcemap URI for workbench at least is: https://ticino.blob.core.windows.net/sourcemaps/8eaec303ea9b12291540e729ad32b930169e67a4/core/vs/workbench/workbench.desktop.main.js.map. I am not 100% sure about the URI for the extension host though, but probably similar.

@alexdima
Copy link
Member

alexdima commented Oct 3, 2019

Thanks for digging into that. Unfortunately the source map is not of good quality and cannot resolve the first stack element:

Deminified using https://github.com/alexandrudima/vscode-stack-beautifier

n.charCodeAt is not a function: TypeError: n.charCodeAt is not a function
  at 
  at call (./common/event.ts:580:15)
  at fire (./parts/ipc/common/ipc.net.ts:453:18)
  at fire (./parts/ipc/common/ipc.net.ts:733:20)
  at _receiveMessage (./parts/ipc/common/ipc.net.ts:592:72)
  at call (./common/event.ts:580:15)
  at fire (./parts/ipc/common/ipc.net.ts:239:20)
  at acceptChunk (./parts/ipc/common/ipc.net.ts:200:50)
  at _listener (./parts/ipc/node/ipc.net.ts:28:37)

@Tyriar
Copy link
Member

Tyriar commented Oct 3, 2019

I suspect the charCodeAt thing is probably my problem actually, I'll action this issue soon.

@Tyriar Tyriar added this to the September 2019 milestone Oct 3, 2019
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues labels Oct 3, 2019
@Tyriar Tyriar modified the milestones: September 2019, October 2019 Oct 3, 2019
@Tyriar Tyriar added integration-test-failure bug Issue identified by VS Code Team member as probable bug and removed bug Issue identified by VS Code Team member as probable bug labels Oct 25, 2019
@Tyriar Tyriar modified the milestones: October 2019, Backlog Oct 29, 2019
@Tyriar Tyriar modified the milestones: Backlog, October 2019 Oct 31, 2019
@connor4312
Copy link
Member

connor4312 commented Oct 31, 2019

I see the original issue and linked issues were are flakey integration tests. @Tyriar are there any particular steps we can take to verify your fix? Just run tests a few times and see if they pass?

@connor4312 connor4312 added the verification-steps-needed Steps to verify are needed for verification label Oct 31, 2019
@Tyriar
Copy link
Member

Tyriar commented Oct 31, 2019

@connor4312 probably can't repro it outside of the tests. I checked the build output for the PR and the message is gone, you can do a quick review of https://github.com/microsoft/vscode/pull/83788/files#diff-500e25740503223dd60ee4118d95d0a2, it should be impossible to get that error now because I'm using ?.

@connor4312 connor4312 added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Oct 31, 2019
@connor4312
Copy link
Member

Yea, looks good to me, I'll mark as verified

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug integration-test-failure terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants