-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Reloading extension host results in "Unable to open polyfills.js" error notification #105047
Comments
I cannot reproduce this on Windows. |
Hmm, I can't reproduce using the hello world extension either. That said, debugging shows a promise rejection with this message being thrown: ...which is highly unlikely to be something my extension is directly accessing. Call stack:
Since the first entry is grayed out, the second is automatically selected. Could this be related to the call stack's tree view item? Console entry:notificationsAlerts.ts:40 Unable to open 'polyfills.js': Unable to read file 'c:\Users\Matt\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\node_modules.asar\graceful-fs\polyfills.js' (Error: Unable to resolve non-existing file 'c:\Users\Matt\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\node_modules.asar\graceful-fs\polyfills.js'). onDidChangeNotification @ breadcrumbsModel.ts:307 (anonymous) @ breadcrumbsModel.ts:307 fire @ event.ts:584 addNotification @ notifications.ts:188 notify @ notificationService.ts:69 doHandleOpenEditorError @ editorGroupView.ts:1018 (anonymous) @ editorGroupView.ts:923 async function (async) (anonymous) @ editorGroupView.ts:923 doShowEditor @ editorGroupView.ts:923 doOpenEditor @ editorGroupView.ts:923 openEditor @ editorGroupView.ts:880 openEditor @ editorService.ts:509 openInEditor @ debugSource.ts:71 openInEditor @ debugModel.ts:350 focusStackFrame @ debugService.ts:753 n @ debugSession.ts:770 (anonymous) @ debugSession.ts:825 async function (async) (anonymous) @ debugSession.ts:770 fire @ event.ts:584 (anonymous) @ rawDebugSession.ts:123 processQueue @ abstractDebugAdapter.ts:152 async function (async) processQueue @ abstractDebugAdapter.ts:152 acceptMessage @ abstractDebugAdapter.ts:54 $acceptDAMessage @ mainThreadDebugService.ts:254 _doInvokeHandler @ rpcProtocol.ts:401 _invokeHandler @ rpcProtocol.ts:332 _receiveRequest @ rpcProtocol.ts:278 _receiveOneMessage @ rpcProtocol.ts:220 (anonymous) @ rpcProtocol.ts:93 fire @ event.ts:584 fire @ ipc.net.ts:412 _receiveMessage @ ipc.net.ts:746 (anonymous) @ ipc.net.ts:599 fire @ event.ts:584 acceptChunk @ ipc.net.ts:231 (anonymous) @ ipc.net.ts:157 t @ ipc.net.ts:822 emit @ events.js:223 addChunk @ _stream_readable.js:309 readableAddChunk @ _stream_readable.js:290 Readable.push @ _stream_readable.js:224 onStreamRead @ internal/stream_base_commons.js:181 |
I get this quite often while trying F5 our extension as well. Same error as the OP. |
Same here |
Version Infos:
The reproduce steps is same as @mattacosta said. My extension repository: https://github.com/tjx666/vscode-fe-helper |
Can you collect a trace log using the following instructions?
|
Thanks. It looks like you have pause on exception setup, and it's actually pausing on the error that you saw above (cc @sandy081 on that -- I think you're the right person?) I think the electron-shimmed fs lets us read files in the .asar, so we report |
You are right. Please let me know how can I help here. |
I'm getting this same issue on OSX 10.15.6 (19G2021) |
@sandy081 I think the thing for you would be to look at why that error is being thrown and avoid doing so 🙂 The task for me is to not have it open the "Unable to open 'polyfills.js': Unable to read file " editor, and instead open the file with correct contents. |
I'm facing the same issue. How can it be solved? |
I'm also getting this issue on ubuntu 18.04 with this extension https://github.com/boltex/leointeg (dev branch) Complete message is heres a screenshot: edit: specs below |
You can uncheck "uncaught exceptions" in the breakpoints view. Adding |
@connor4312 Is it possible to get the stack trace of the error here, it would be interesting to know where is this error being thrown. |
Here's the trace from a log someone posted above. Unfortunately it doesn't look like CDP gives us the async stack trace in this scenario...
|
This issue greatly affects my creative experience of vscode extension. |
@connor4312 I looked into the code that creates above directory and I see it is safely wrapped with try/catch block and handling errors. vscode/src/vs/workbench/api/node/extHostOutputService.ts Lines 85 to 98 in 558e362
I do not know of other places where we create exthost output channel dir. It would be great to get the stack trace to see where this error is coming from, otherwise it seems I am helpless. |
Not sure if it helps but I simplified line 88 and broke it down. |
Yea that code looks just fine 🤔 I think in the next release for extensionhost debugging I will probably add everything outside the cwd to skipFiles anyway. That would wallpaper over this and also let people use "All Exceptions" / "Caught Exceptions" breakpoints without breaking in all their other extensions or internal code. |
Makes sense. Let me know if there is anything to be done from my side? |
Sorry I created a duplicate issue. Having this same issue on 1.50.0 on windows. |
Looks fine, but it looks like this was hard to repro, so someone who was seeing this, please try to verify that it's fixed in VS Code Insiders. |
Issue Type: Bug
Steps to reproduce:
ctrl+r
to reload.VS Code version: Code - Insiders 1.49.0-insider (f694b07, 2020-08-19T05:47:42.278Z)
OS version: Windows_NT x64 10.0.19041
The text was updated successfully, but these errors were encountered: