Open flerxu opened 11 months ago
I am seeing this as well. Its happening in both Cod and Code Insiders. I have tried uninstalling and reinstalling both the polyglot extension and all of VS Code. Notebooks that used to work no longer work,
This is the error I am getting when trying to open a notebook that used to work.
Using dotnet configured on PATH Dotnet path: C:\Program Files\dotnet\dotnet.exe Activating C# + C# Dev Kit + C# IntelliCode... waiting for named pipe information from server... [stdout] {"pipeName":"\\\\.\\pipe\\809cf8e8-bb66-40e7-bd29-f3394060f9d1"} received named pipe information from server attempting to connect client to server... client has connected to server [Info - 8:50:51 PM] [Program] Language server initialized [Error - 8:50:51 PM] [LanguageServerHost] System.InvalidOperationException: didOpen received for vscode-notebook-cell:/c:/source/local machine configuration/datacenter/tst_ads_sql_notebook.ipynb#W1sZmlsZQ== which is already open. - line 106 at Roslyn.Utilities.Contract.Fail(String message, Int32 lineNumber) in /_/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Utilities/Contract.cs:line 154 at Microsoft.CodeAnalysis.LanguageServer.LspWorkspaceManager.StartTrackingAsync(Uri uri, SourceText documentText, String languageId, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Workspaces/LspWorkspaceManager.cs:line 106 at Microsoft.CodeAnalysis.LanguageServer.Handler.DocumentChanges.DidOpenHandler.HandleNotificationAsync(DidOpenTextDocumentParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Handler/DocumentChanges/DidOpenHandler.cs:line 42 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem
3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136
[Error - 8:50:51 PM] [LanguageServerHost] System.InvalidOperationException: didOpen received for vscode-notebook-cell:/c:/source/local machine configuration/datacenter/tst_ads_sqlnotebook.ipynb#W1sZmlsZQ== which is already open. - line 106
at Roslyn.Utilities.Contract.Fail(String message, Int32 lineNumber) in //src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Utilities/Contract.cs:line 154
at Microsoft.CodeAnalysis.LanguageServer.LspWorkspaceManager.StartTrackingAsync(Uri uri, SourceText documentText, String languageId, CancellationToken cancellationToken) in //src/Features/LanguageServer/Protocol/Workspaces/LspWorkspaceManager.cs:line 106
at Microsoft.CodeAnalysis.LanguageServer.Handler.DocumentChanges.DidOpenHandler.HandleNotificationAsync(DidOpenTextDocumentParams request, RequestContext context, CancellationToken cancellationToken) in //src/Features/LanguageServer/Protocol/Handler/DocumentChanges/DidOpenHandler.cs:line 42
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem
3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken)
at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue1.ProcessQueueAsync() in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 239 [Info - 8:50:51 PM] Error processing queue, shutting down [Error - 8:50:51 PM] Workspace diagnostic pull failed. Canceled: Canceled at s.handleFailedRequest (c:\Users\gmartin2\.vscode\extensions\ms-dotnettools.csharp-2.7.25-win32-x64\dist\extension.js:2:2316987) at c:\Users\gmartin2\.vscode\extensions\ms-dotnettools.csharp-2.7.25-win32-x64\dist\extension.js:2:2354399 at async g.pullWorkspaceAsync (c:\Users\gmartin2\.vscode\extensions\ms-dotnettools.csharp-2.7.25-win32-x64\dist\extension.js:2:2351707) [Error - 8:50:51 PM] The Microsoft.CodeAnalysis.LanguageServer server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
After running dotnet tool update --global Microsoft.dotnet-interactive
and restarting Code, my notebooks are working again!
I guess there must have been a problem with updating via Code, I don't know why though.
After running
dotnet tool update --global Microsoft.dotnet-interactive
and restarting Code, my notebooks are working again!I guess there must have been a problem with updating via Code, I don't know why though.
I have tried everything but none worked. After reinstalling Windows 11 , it worked.
In my case, the issue was related to Nuget. In the package source, I have multiple Nuget repos, some require authentication. Even if I try to update dotnet-interactive as @gmartinka mentioned, I would get an exception. The update tries to access the private Nuget repos, even if I set which repo should be used.
dotnet tool update --ignore-failed-sources --global Microsoft.dotnet-interactive --add-source https://api.nuget.org/v3/index.json
The solution: I've temporarily removed all custom Nuget repos from the NuGet.Config and rerun the update. In my case I just unchecked them in Rider.
C:\Users\<user>\AppData\Roaming\NuGet\NuGet.Config
update: I've added --ignore-failed-sources
argument to the command
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-update
I'm stuck at "Installing .NET Interactive version 1.0.446104", but I had version 1.0.460602 installed. I uninstalled it and installed the matching version, but I'm still stuck. I only have one NuGet source configured.
@BrianL-STCU Your VS Code install looks to be somewhat out of date. Are you able to update to the latest VS Code and Polyglot Notebooks extension versions, and install the .NET 8 SDK?
@jonsequitur keeping it up to date has become quite a hassle due to microsoft/winget-cli#3068. I didn't realize it had been two months already, but I got it updated, though unfortunately it hasn't helped.
The Extension Host output shows:
2023-12-08 16:25:13.438 [error] Activating extension ms-dotnettools.dotnet-interactive-vscode failed due to an error:
2023-12-08 16:25:13.438 [error] TypeError: Cannot read properties of undefined (reading 'workingDirectory')
at c:\Users\█████████\.vscode\extensions\ms-dotnettools.dotnet-interactive-vscode-1.0.4606020\out\src\vscode-common\extension.js:238:140
at Generator.next (<anonymous>)
at fulfilled (c:\Users\█████████\.vscode\extensions\ms-dotnettools.dotnet-interactive-vscode-1.0.4606020\out\src\vscode-common\extension.js:7:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Our decrypting firewall may be causing an issue with the download. Is there a way to manually install .NET Interactive in VSCode, since the automated step doesn't seem reliable in our environment? Or to reference the system installation which is already there?
The version it's trying to download has been updated, but it still never completes:
I just found that in mid-November, I ran into this same problem after installing the .NET 8 preview. Uninstalling it fixed this issue then, but of course now Polyglot Notebooks requires .NET 8.
I think I may have correlated the problem with our firewall. I'll report back if that turns out to be the problem. It could be that the download URL is very triggering to certain enterprise security.
Confirmed that was my problem.
I was having the same problem when VS Code tried to install dotnet-interactive. I then tried to install the tool using dotnet tool install command but got this error:
"Package Source Mapping is enabled, but no source found under the specified package ID: microsoft.dotnet-interactive. See the documentation for Package Source Mapping at https://aka.ms/nuget-package-source-mapping for more details."
I then looked for nuget.config on my PC and when i opened it (C:\Users{myUser}\AppData\Roaming\NuGet) I noticed that my file looked like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceMapping>
<packageSource key="company-internal-packages">
<package pattern="Polly" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="Microsoft.Extensions.Http.Polly" />
<package pattern="Polly.Core" />
<package pattern="Microsoft.Extensions.Diagnostics.Abstractions" />
<package pattern="OpenTelemetry.Api.ProviderBuilderExtensions" />
</packageSource>
</packageSourceMapping>
</configuration>
I don't know exactly why the file looked like this, but after changing the contents of the nuget package source to this, the dotnet tool managed to install the tool:
<packageSource key="nuget.org">
<package pattern="Microsoft.*" />
</packageSource>
Type: Question
Extension Log:
Modes:
App and Extension Info
dotNet Interactive extension version: 1.0.4461040 VS Code version: Code 1.83.0 (e7e037083ff4455cf320e344325dacb480062c3c, 2023-10-03T16:12:16.321Z) OS version: Windows_NT x64 10.0.22621Extension list
- GitHub.github-vscode-theme - ms-dotnettools.csdevkit - ms-dotnettools.csharp - ms-dotnettools.dotnet-interactive-vscode - ms-dotnettools.vscode-dotnet-runtime - ms-dotnettools.vscodeintellicode-csharp - ms-python.python - ms-python.vscode-pylance - ms-toolsai.jupyter - ms-toolsai.jupyter-keymap - ms-toolsai.jupyter-renderers - ms-toolsai.vscode-jupyter-cell-tags - ms-toolsai.vscode-jupyter-slideshow - ms-vscode.Theme-MaterialKit - SumitSaha.learn-with-sumit-themeSystem Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 x 2112)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.76GB (10.13GB free)| |Process Argv|--crash-reporter-id 62384e17-f9d1-4d78-b095-6b26fa04322a| |Screen Reader|no| |VM|0%|
A/B Experiments
``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263:30792226 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 282f8724:30602487 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 0bi6i642:30841073 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 copilotsettingc:30839828 synctok:30821570 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 pythonmhint1:30842940 dsvsc015:30845448 ```