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

Apple silicon(m1) version run node cause err: Extension host terminated unexpectedly #110931

Closed
vast-z opened this issue Nov 19, 2020 · 13 comments
Closed
Assignees
Labels
🍎 si Issues related to apple silicon confirmed Issue has been confirmed by VS Code Team member debug Debug viewlet, configurations, breakpoints, adapter issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@vast-z
Copy link

vast-z commented Nov 19, 2020

  • VSCode Version: insider(apple arm experience)
  • OS Version: mac os big sur

Steps to Reproduce:

  1. write a js script
  2. press F5 run with Nodejs,then cause this error

Does this issue occur when all extensions are disabled?: Yes.

@weinand
Copy link
Contributor

weinand commented Nov 19, 2020

/needsMoreInfo

@weinand
Copy link
Contributor

weinand commented Nov 19, 2020

Please provide reproducible steps:

  • How does the JS program and your launch.json look like?
  • Screenshot of the error.

@vast-z
Copy link
Author

vast-z commented Nov 19, 2020

Thank you very much for your reply. After I restart vscode, "Extension host terminated unexpectedly" will no longer pop up in the lower right corner, but the js program still cannot be executed, auto exit. It also cannot be used for debugging. The terminal is running well.
select run with nodejs
debug fail, run auto exit
use terminal run

@weinand weinand assigned connor4312 and unassigned weinand Nov 19, 2020
@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues and removed info-needed Issue requires more information from poster labels Nov 19, 2020
@connor4312
Copy link
Member

Can you collect some logs? That should show us the complete error which is truncated in the call stack view.

/jsDebugLogs

@vast-z
Copy link
Author

vast-z commented Nov 20, 2020

Thank you very much for your reply. Is this the debug information?
debug trace

@connor4312
Copy link
Member

Indeed, unfortunately not many more details there

Error: hash.bundle.js process unexpectedly exited
at t.Hasher.send (extension.js:22:34881)
at t.Hasher.verifyFile (extension.js:22:34710)
at Object.t.checkContentHash (extension.js:1:58595)
at new I (extension.js:1:61505)
at F.addSource (extension.js:1:69494)

I don't have an Apple Si device to test on but will see if I can find one to remote into

@vast-z
Copy link
Author

vast-z commented Nov 20, 2020

thank you for your help. If necessary, I can provide the device remotely for debugging..

@deepak1556 deepak1556 added 🍎 si Issues related to apple silicon confirmed Issue has been confirmed by VS Code Team member and removed info-needed Issue requires more information from poster labels Nov 20, 2020
@connor4312
Copy link
Member

connor4312 commented Nov 20, 2020

This looks like https://bugs.chromium.org/p/chromium/issues/detail?id=1150060 -- we use wasm in several areas in the debugger, including the hash.bundle.js. Source map parsing using wasm as well and happens in the main thread, which is why you might be seeing a crash there.

@connor4312 connor4312 added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Nov 20, 2020
@richiksc
Copy link

richiksc commented Nov 22, 2020

This might have been fixed by nodejs/node#35986. Many people were reporting issues with wasm causing crashes on Apple Silicon, V8 released some fixes, and Node cherry-picked them and merged them into master on Nov 12. They haven't published these changes as a release yet, however, even as of v15.2.1 which was released on November 16th. VSCode could either wait for an upstream release or cherry-pick these changes from upstream Node for the debugger.

Edit: this issue nodejs/node#36160 pointed me to the aforementioned pull request, because they also mentioned wasm as the source of their test failure.

@vast-z
Copy link
Author

vast-z commented Nov 26, 2020

I found that in the latest version, this problem seems to have been solved, thank you very much for the people who worked on this

@deepak1556
Copy link
Contributor

deepak1556 commented Nov 27, 2020

Yes latest update a31f124 with newer electron runtime 11.0.3 fixes loading of wasm modules. Thanks for confirming.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🍎 si Issues related to apple silicon confirmed Issue has been confirmed by VS Code Team member debug Debug viewlet, configurations, breakpoints, adapter issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

6 participants
@deepak1556 @weinand @connor4312 @richiksc @vast-z and others