dotnet / install-scripts

MIT License
128 stars 68 forks source link

Install Script Fails to Install .NET 6 on WSL with Unbound Variable #420

Closed oraqlle closed 7 months ago

oraqlle commented 7 months ago

Describe the bug

.NET Install Tool cannot install new .NET for CMake extension on VSCode.

Log file

11/18/2023, 6:36:45 PM DotnetAcquisitionStatusRequested
6.0
a3bd4673d6d5ef6457fb8e08578accfdb13f047e37fc29a9fad2b00ad8701314

11/18/2023, 6:36:45 PM WebRequestSent
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json

11/18/2023, 6:36:45 PM DotnetVersionResolutionCompleted
6.0
6.0.25

11/18/2023, 6:36:45 PM DotnetAcquisitionStatusUndefined
6.0.25~x64

11/18/2023, 6:36:45 PM DotnetCommandSucceeded
acquireRuntimeStatus

11/18/2023, 6:36:45 PM DotnetRuntimeAcquisitionStarted
a3bd4673d6d5ef6457fb8e08578accfdb13f047e37fc29a9fad2b00ad8701314

11/18/2023, 6:36:45 PM DotnetAcquisitionRequested
6.0
a3bd4673d6d5ef6457fb8e08578accfdb13f047e37fc29a9fad2b00ad8701314

11/18/2023, 6:36:45 PM WebRequestSent
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json

11/18/2023, 6:36:45 PM DotnetVersionResolutionCompleted
6.0
6.0.25

11/18/2023, 6:36:45 PM DotnetInstallKeyCreatedEvent
The requested version 6.0.25 is now marked under the install key: 6.0.25~x64.

11/18/2023, 6:36:45 PM DotnetAcquisitionPartialInstallation
6.0.25~x64

11/18/2023, 6:36:45 PM DotnetUninstallAllStarted

11/18/2023, 6:36:45 PM DotnetAcquisitionDeletion
/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet

11/18/2023, 6:36:45 PM SuppressedAcquisitionError
Failed to chmod +x on .NET folder /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet when marked for deletion.
Error
 ENOENT: no such file or directory, chmod '/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet'
 Error: ENOENT: no such file or directory, chmod '/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet'
        at Object.chmodSync (node:fs:1936:3)
        at Object.chmodSync (/home/user/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/node_modules/graceful-fs/polyfills.js:263:21)
        at h.removeFolderRecursively (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:15163)
        at h.<anonymous> (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:6161)
        at Generator.next (<anonymous>)
        at /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5315
        at new Promise (<anonymous>)
        at r (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5060)
        at h.uninstallAll (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:6031)
        at h.<anonymous> (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:10526)
        at Generator.next (<anonymous>)
        at /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5315
        at new Promise (<anonymous>)
        at r (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5060)
        at h.checkForPartialInstalls (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:10321)
        at h.<anonymous> (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:8916)
        at Generator.next (<anonymous>)
        at /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5315
        at new Promise (<anonymous>)
        at r (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5060)
        at h.acquireCore (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:8877)
        at h.<anonymous> (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:8430)
        at Generator.next (<anonymous>)
        at /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5315
        at new Promise (<anonymous>)
        at r (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5060)
        at h.acquire (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:7534)
        at h.<anonymous> (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:6754)
        at Generator.next (<anonymous>)
        at /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5315
        at new Promise (<anonymous>)
        at r (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:5060)
        at h.acquireRuntime (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:6708)
        at /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:839094
        at Generator.next (<anonymous>)
        at s (/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:836644)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

11/18/2023, 6:36:46 PM DotnetAcquisitionStarted
6.0.25~x64
6.0.25
a3bd4673d6d5ef6457fb8e08578accfdb13f047e37fc29a9fad2b00ad8701314

11/18/2023, 6:36:46 PM WebRequestSent
https://dot.net/v1/dotnet-install.sh

11/18/2023, 6:36:46 PM DotnetFileWriteRequestEvent
Request to write
2023-11-18T07:36:46.413Z
c672655faee49e355c4527631ab4b9e14d8315ba024839e39eb01fa9a9b5c202

11/18/2023, 6:36:46 PM DotnetLockAttemptingAcquireEvent
Lock Acquisition request to begin.
2023-11-18T07:36:46.414Z
48259292d62d18aaf1415c86ccd7a7d59727f24c31ca085f4a7848464da7551f
c672655faee49e355c4527631ab4b9e14d8315ba024839e39eb01fa9a9b5c202

11/18/2023, 6:36:46 PM DotnetUninstallAllCompleted

11/18/2023, 6:36:46 PM DotnetLockAcquiredEvent
Lock Acquired.
2023-11-18T07:36:46.772Z
48259292d62d18aaf1415c86ccd7a7d59727f24c31ca085f4a7848464da7551f
c672655faee49e355c4527631ab4b9e14d8315ba024839e39eb01fa9a9b5c202

11/18/2023, 6:36:46 PM DotnetFileWriteRequestEvent
File content is an exact match, not writing file.
2023-11-18T07:36:46.774Z
c672655faee49e355c4527631ab4b9e14d8315ba024839e39eb01fa9a9b5c202

11/18/2023, 6:36:46 PM DotnetLockReleasedEvent
Lock about to be released.
2023-11-18T07:36:46.774Z
48259292d62d18aaf1415c86ccd7a7d59727f24c31ca085f4a7848464da7551f
c672655faee49e355c4527631ab4b9e14d8315ba024839e39eb01fa9a9b5c202

11/18/2023, 6:36:46 PM DotnetInstallScriptAcquisitionCompleted

11/18/2023, 6:36:49 PM DotnetAcquisitionScriptOutput
6.0.25~x64
 dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Calling: machine_has curl
dotnet-install: Calling: calculate_vars
dotnet-install: Calling: get_normalized_architecture_from_architecture x64
dotnet-install: Normalized architecture: 'x64'.
dotnet-install: Calling: get_normalized_os
dotnet-install: Calling: get_current_os_name
dotnet-install: Calling: get_linux_platform_name
dotnet-install: Normalized OS: 'linux'.
dotnet-install: Calling: get_normalized_quality
dotnet-install: Normalized quality: ''.
dotnet-install: Calling: get_normalized_channel LTS
dotnet-install: Normalized channel: 'LTS'.
dotnet-install: Calling: get_normalized_product dotnet
dotnet-install: Normalized product: 'dotnet-runtime'.
dotnet-install: Calling: resolve_installation_path /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64
dotnet-install: InstallRoot: '/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64'.
dotnet-install: Calling: get_normalized_architecture_for_specific_sdk_version 6.0.25 LTS x64
dotnet-install: Calling: get_current_os_name
dotnet-install: Calling: get_linux_platform_name
dotnet-install: Calling: get_specific_version_from_version https://dotnetcli.azureedge.net/dotnet LTS x64 6.0.25
dotnet-install: Calling: get_specific_product_version https://dotnetcli.azureedge.net/dotnet 6.0.25
dotnet-install: Calling: get_specific_product_version_url https://dotnetcli.azureedge.net/dotnet 6.0.25 true
dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: get_specific_product_version_url https://dotnetcli.azureedge.net/dotnet 6.0.25 false
dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/productVersion.txt
dotnet-install: Checking for the existence of https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: machine_has curl
dotnet-install: specific_version=6.0.25
dotnet-install: Calling: construct_download_link https://dotnetcli.azureedge.net/dotnet LTS x64 6.0.25 linux
dotnet-install: Calling: get_specific_product_version https://dotnetcli.azureedge.net/dotnet 6.0.25
dotnet-install: Calling: get_specific_product_version_url https://dotnetcli.azureedge.net/dotnet 6.0.25 true
dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: get_specific_product_version_url https://dotnetcli.azureedge.net/dotnet 6.0.25 false
dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/productVersion.txt
dotnet-install: Checking for the existence of https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: machine_has curl
dotnet-install: Constructed primary named payload URL: https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/dotnet-runtime-curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)6.0.25-linux-x64.tar.gz
dotnet-install: Calling: construct_legacy_download_link https://dotnetcli.azureedge.net/dotnet LTS x64 6.0.25
dotnet-install: Calling: get_legacy_os_name
dotnet-install: Calling: get_legacy_os_name_from_platform ubuntu.22.04
dotnet-install: Distribution specific OS name and version could not be detected: UName = Linux
dotnet-install: Cound not construct a legacy_download_link; omitting...
dotnet-install: Calling: is_dotnet_package_installed /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64 shared/Microsoft.NETCore.App curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)6.0.25
dotnet-install: Calling: combine_paths /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64 shared/Microsoft.NETCore.App
dotnet-install: combine_paths: root_path=/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64
dotnet-install: combine_paths: child_path=shared/Microsoft.NETCore.App
dotnet-install: Calling: combine_paths /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/shared/Microsoft.NETCore.App curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)6.0.25
dotnet-install: combine_paths: root_path=/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/shared/Microsoft.NETCore.App
dotnet-install: combine_paths: child_path=curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)6.0.25
dotnet-install: is_dotnet_package_installed: dotnet_package_path=/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/shared/Microsoft.NETCore.App/curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)6.0.25
dotnet-install: Calling: get_specific_version_from_version https://dotnetbuilds.azureedge.net/public LTS x64 6.0.25
dotnet-install: Calling: get_specific_product_version https://dotnetbuilds.azureedge.net/public 6.0.25
dotnet-install: Calling: get_specific_product_version_url https://dotnetbuilds.azureedge.net/public 6.0.25 true
dotnet-install: Constructed productVersion link: https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: get_specific_product_version_url https://dotnetbuilds.azureedge.net/public 6.0.25 false
dotnet-install: Constructed productVersion link: https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/productVersion.txt
dotnet-install: Checking for the existence of https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: machine_has curl
dotnet-install: Checking for the existence of https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/productVersion.txt
dotnet-install: Calling: machine_has curl
dotnet-install: Failed to get the version using productVersion.txt file. Download link will be parsed instead.
dotnet-install: Calling: get_product_specific_version_from_download_link  6.0.25
dotnet-install: specific_version=6.0.25
dotnet-install: Calling: construct_download_link https://dotnetbuilds.azureedge.net/public LTS x64 6.0.25 linux
dotnet-install: Calling: get_specific_product_version https://dotnetbuilds.azureedge.net/public 6.0.25
dotnet-install: Calling: get_specific_product_version_url https://dotnetbuilds.azureedge.net/public 6.0.25 true
dotnet-install: Constructed productVersion link: https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: get_specific_product_version_url https://dotnetbuilds.azureedge.net/public 6.0.25 false
dotnet-install: Constructed productVersion link: https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/productVersion.txt
dotnet-install: Checking for the existence of https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/runtime-productVersion.txt
dotnet-install: Calling: machine_has curl
dotnet-install: Checking for the existence of https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/productVersion.txt
dotnet-install: Calling: machine_has curl
dotnet-install: Failed to get the version using productVersion.txt file. Download link will be parsed instead.
dotnet-install: Calling: get_product_specific_version_from_download_link  6.0.25
dotnet-install: Constructed primary named payload URL: https://dotnetbuilds.azureedge.net/public/Runtime/6.0.25/dotnet-runtime-6.0.25-linux-x64.tar.gz
dotnet-install: Calling: construct_legacy_download_link https://dotnetbuilds.azureedge.net/public LTS x64 6.0.25
dotnet-install: Calling: get_legacy_os_name
dotnet-install: Calling: get_legacy_os_name_from_platform ubuntu.22.04
dotnet-install: Distribution specific OS name and version could not be detected: UName = Linux
dotnet-install: Cound not construct a legacy_download_link; omitting...
dotnet-install: Calling: is_dotnet_package_installed /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64 shared/Microsoft.NETCore.App 6.0.25
dotnet-install: Calling: combine_paths /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64 shared/Microsoft.NETCore.App
dotnet-install: combine_paths: root_path=/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64
dotnet-install: combine_paths: child_path=shared/Microsoft.NETCore.App
dotnet-install: Calling: combine_paths /home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/shared/Microsoft.NETCore.App 6.0.25
dotnet-install: combine_paths: root_path=/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/shared/Microsoft.NETCore.App
dotnet-install: combine_paths: child_path=6.0.25
dotnet-install: is_dotnet_package_installed: dotnet_package_path=/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/shared/Microsoft.NETCore.App/6.0.25
dotnet-install: Generated 10 links.
dotnet-install: Link 0: primary, curl:, https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/dotnet-runtime-curl:
dotnet-install: Link 1: primary, /usr/local/lib/libcurl.so.4:, /usr/local/lib/libcurl.so.4:

11/18/2023, 6:36:49 PM DotnetAcquisitionScriptOutput
6.0.25~x64
STDERR:  /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable

11/18/2023, 6:36:49 PM DotnetAcquisitionInstallError
Command failed: "/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64" -Version 6.0.25 -Verbose -Runtime dotnet -Architecture x64
/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable

6.0.25~x64
Error
Error: Command failed: "/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64" -Version 6.0.25 -Verbose -Runtime dotnet -Architecture x64
/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable

        at ChildProcess.exithandler (node:child_process:420: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)

11/18/2023, 6:36:49 PM DotnetCommandFailed
.NET Acquisition Failed: Installation failed: Error: Command failed: "/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64" -Version 6.0.25 -Verbose -Runtime dotnet -Architecture x64
/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable

acquire
Error
Error: .NET Acquisition Failed: Installation failed: Error: Command failed: "/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/home/user/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64" -Version 6.0.25 -Verbose -Runtime dotnet -Architecture x64
/home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable

        at /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:8501

11/18/2023, 6:36:49 PM DotnetRuntimeAcquisitionTotalSuccessEvent
6.0
6.0.25~x64
a3bd4673d6d5ef6457fb8e08578accfdb13f047e37fc29a9fad2b00ad8701314

Other Info:

Reproduction Steps

Occurs on VSCode startup

Expected behavior

Successfully installs new .NET

Exceptions & Errors

Extension Version: 1.0.0

Error Message: .NET Acquisition Failed: Installation failed: Error: Command failed: "/home/anonymous/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/home/anonymous/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64" -Version 6.0.25 -Verbose -Runtime dotnet -Architecture x64 /home/anonymous/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable

Error Stack: Error: .NET Acquisition Failed: Installation failed: Error: Command failed: "/home/anonymous/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/home/anonymous/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64" -Version 6.0.25 -Verbose -Runtime dotnet -Architecture x64 /home/anonymous/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable at /home/anonymous/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/extension.js:2:8501

Further technical details

nagilson commented 7 months ago

Thank you for reporting this issue. It looks like this is a problem on the dotnet install script, STDERR: /home/user/.vscode-server/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.0/dist/install scripts/dotnet-install.sh: line 1329: link_types[$link_index]: unbound variable

We have all of the output of the script captured in our log now so hope that helps. Thank you @oraqlle for providing this log, I will forward it along to the correct team :)

nagilson commented 7 months ago

cc @baronfel for where we should forward this?

baronfel commented 7 months ago

cc @MichalPavlik / @YuliiaKovalova

YuliiaKovalova commented 7 months ago

Hi everyone, Thank you for reporting the issue. Usually "link_types[$link_index]: unbound variable" happens when akams links can't be successfully resolved for the specified params (version, architecture, etc). We definitely should improve logging on this type of error.

@rbhanda, I can see from the logs that for LTS we resolved 6.0.25 version - is it expected? get_specific_version_from_version https://dotnetcli.azureedge.net/dotnet LTS x64 6.0.25 cc: @leecow

leecow commented 7 months ago

This is not expected. The Sdk/LTS/latest.version file and aka.ms/dotnet/lts/dotnet-sdk-linux-x64.tar.gz are pointing to 8.0.100.

YuliiaKovalova commented 7 months ago

@oraqlle , could you check if this issue is still relevant for you? The underlying problem seems to be already resolved.

oraqlle commented 7 months ago

@YuliiaKovalova, I am still getting the error. However, it appears to only attempt to download .NET in a directory containing a CMake project. I believe the download is triggered by the VSCode extensions for CMake as it is my understanding that .NET is used by these extensions.

nagilson commented 7 months ago

Oraqlle's understanding is correct, based on the log above, it seems to be using the latest install script as well, at least the one that is hosted on the downloads page.

YuliiaKovalova commented 7 months ago

Hi @oraqlle,

I was able to spot a relevant error, it's related to this line in the logs: dotnet-install: Constructed primary named payload URL: https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.25/dotnet-runtime-curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)6.0.25-linux-x64.tar.gz curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl) Please check this link to address it: https://stackoverflow.com/questions/30017397/error-curl-usr-local-lib-libcurl-so-4-no-version-information-available-requ

YuliiaKovalova commented 7 months ago

Close the issue since the root cause was found.

Please free to reopen if it is still relevant to you.