dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
135 stars 249 forks source link

Error acquiring .NET! v7.0.11 #1374

Open SpyPower opened 11 months ago

SpyPower commented 11 months ago

Describe the bug

booting up the vscode, i get the following error Error acquiring .NET! v7.0.11

Please attach log file(s) here if you have any:

9/13/2023, 8:01:41 AM DotnetAcquisitionStatusRequested
7.0
ms-dotnettools.csharp

9/13/2023, 8:01:41 AM WebRequestSent
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json

9/13/2023, 8:01:41 AM DotnetVersionResolutionCompleted
7.0
7.0.11

9/13/2023, 8:01:41 AM DotnetAcquisitionStatusUndefined
7.0.11

9/13/2023, 8:01:41 AM DotnetCommandSucceeded
acquireRuntimeStatus

9/13/2023, 8:01:41 AM DotnetRuntimeAcquisitionStarted

9/13/2023, 8:01:41 AM DotnetAcquisitionRequested
7.0
ms-dotnettools.csharp

9/13/2023, 8:01:41 AM WebRequestSent
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json

9/13/2023, 8:01:41 AM DotnetVersionResolutionCompleted
7.0
7.0.11

9/13/2023, 8:01:41 AM DotnetAcquisitionPartialInstallation
7.0.11

9/13/2023, 8:01:41 AM DotnetAcquisitionDeletion
/home/sp/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11

9/13/2023, 8:01:42 AM DotnetAcquisitionStarted
7.0.11

9/13/2023, 8:01:42 AM WebRequestSent
https://dot.net/v1/dotnet-install.sh

9/13/2023, 8:01:46 AM WebRequestError
Error
Please ensure that you are online: Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function
Error: Please ensure that you are online: Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function
    at t.WebRequestWorker.<anonymous> (/home/sp/.vscode/extensions/vscode-dotnet-runtime-library/dist/Utils/WebRequestWorker.js:154:42)
    at Generator.throw (<anonymous>)
    at a (/home/sp/.vscode/extensions/vscode-dotnet-runtime-library/dist/Utils/WebRequestWorker.js:6:64)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

9/13/2023, 8:01:46 AM DotnetInstallScriptAcquisitionError
Error
Please ensure that you are online: Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function
Error: Please ensure that you are online: Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function
    at t.WebRequestWorker.<anonymous> (/home/sp/.vscode/extensions/vscode-dotnet-runtime-library/dist/Utils/WebRequestWorker.js:154:42)
    at Generator.throw (<anonymous>)
    at a (/home/sp/.vscode/extensions/vscode-dotnet-runtime-library/dist/Utils/WebRequestWorker.js:6:64)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

9/13/2023, 8:01:46 AM DotnetFallbackInstallScriptUsed

9/13/2023, 8:01:46 AM DotnetAcquisitionScriptOuput
7.0.11
STDERR: /bin/sh: 1: /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

9/13/2023, 8:01:47 AM DotnetAcquisitionInstallError
Command failed: "/home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sp/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet
/bin/sh: 1: /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

7.0.11
Error
Error: Command failed: "/home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sp/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet
/bin/sh: 1: /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

    at ChildProcess.exithandler (node:child_process:431:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:513:28)
    at Pipe.<anonymous> (node:net:322:12)

9/13/2023, 8:01:47 AM DotnetCommandFailed
.NET Acquisition Failed: Installation failed: Error: Command failed: "/home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sp/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet
/bin/sh: 1: /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

acquire
Error
Error: .NET Acquisition Failed: Installation failed: Error: Command failed: "/home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sp/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet
/bin/sh: 1: /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

    at /home/sp/.vscode/extensions/vscode-dotnet-runtime-library/dist/Acquisition/DotnetCoreAcquisitionWorker.js:90:27

Extension Version: 1.0.0 Error Message: .NET Acquisition Failed: Installation failed: Error: Command failed: "/home/anonymous/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/anonymous/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet /bin/sh: 1: /home/anonymous/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

Error Stack: Error: .NET Acquisition Failed: Installation failed: Error: Command failed: "/home/anonymous/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/anonymous/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet /bin/sh: 1: /home/anonymous/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

at /home/anonymous/.vscode/extensions/vscode-dotnet-runtime-library/dist/Acquisition/DotnetCoreAcquisitionWorker.js:90:27

Other Info:

The file install /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install does not exist in that folder. The contents are

$ ll /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/
total 3372
drwxrwxr-x 3 sp sp    4096 Sep  4 08:21  ./
drwxrwxr-x 4 sp sp    4096 Sep  4 08:21  ../
-rw-rw-r-- 1 sp sp      97 Sep  4 08:21  DotnetCoreAcquistionId.d.ts
-rw-rw-r-- 1 sp sp     621 Sep  4 08:21  DotnetCoreAcquistionId.js
-rw-rw-r-- 1 sp sp     187 Sep  4 08:21  DotnetCoreAcquistionId.js.map
-rw-rw-r-- 1 sp sp     216 Sep  4 08:21  extension.d.ts
-rw-rw-r-- 1 sp sp  915768 Sep  4 08:21  extension.js
-rw-rw-r-- 1 sp sp     393 Sep  4 08:21  extension.js.LICENSE.txt
-rw-rw-r-- 1 sp sp 2500308 Sep  4 08:21  extension.js.map
drwxrwxr-x 2 sp sp    4096 Sep  4 08:21 'install scripts'/

Errors the extension may have encountered have likely been added to your terminal or VS Code windows. Please paste it/them here and describe what happened and the problem you are facing.

Downloading the .NET Runtime.
Downloading .NET version(s) 7.0.11 ....... Error!
Please ensure that you are online: Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function

Still downloading .NET version(s) 7.0.11 ... Error!
Please ensure that you are online: Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function

Still downloading .NET version(s) 7.0.11 ... Error!
Failed to download .NET 7.0.11:
Command failed: "/home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sp/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet
/bin/sh: 1: /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

 Error!
.NET Acquisition Failed: Installation failed: Error: Command failed: "/home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sp/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11" -Version 7.0.11 -Runtime dotnet
/bin/sh: 1: /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2/dist/install scripts/dotnet-install.sh: Permission denied

Further technical details

Commit: 6509174151d557a81c9d0b5f8a5a1e9274db5585
Date: 2023-09-08T08:41:36.199Z
Electron: 25.8.0
ElectronBuildId: 23503258
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.4.6-76060406-generic
SpyPower commented 11 months ago

I have completely removed the folder /home/sp/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.7.2 and then reloaded vscode. Some extensions where not please by that and I was prompted to install this extension again. after a couple more reloads, no errors.

is this a single (my) case or is this something that could be reproduced?

nagilson commented 11 months ago

Thank you for your well-detailed report. :smile: Well, you are hitting a few issues at the same time unfortunately...

The first issue I believe we will soon fix in 1.7.3 which is the file permissions issue due to a race condition. As long as chmod works on your os, which it should because it's a ubuntu child os, it should be good. Also explains why it worked once and not the other time.

The split issue I'm confused by. Normally you see that in node <16 where .split() is not supported, but you are using node 18. I haven't seen that one before.

doxxx commented 5 months ago

I'm having a similar issue in WSL Ubuntu 22.04, where the dotnet-install.sh file does not have the executable bit set.

doxxx commented 5 months ago

Is it possibly copying the extension files from my Windows host into the WSL filesystem and not redownloading it? That would explain the lack of executable bit.

doxxx commented 5 months ago

I'm also getting the split is not a function error.